From 6cbb60d13f75da6d9b6c6d60555ea119df79b5c0 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sat, 4 Oct 2014 16:30:34 +0200 Subject: [ticket/12620] Adds a yaml config file PHPBB3-12620 --- phpBB/config/default/container/services_twig.yml | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 phpBB/config/default/container/services_twig.yml (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml new file mode 100644 index 0000000000..fc5f9ba6a1 --- /dev/null +++ b/phpBB/config/default/container/services_twig.yml @@ -0,0 +1,43 @@ +parameters: + core.template.cache_path: %core.root_path%cache/%core.environment%/twig/ + +services: + template.twig.environment: + class: phpbb\template\twig\environment + arguments: + - @config + - @path_helper + - @service_container + - %core.template.cache_path% + - @ext.manager + - @template.twig.loader + + template.twig.lexer: + class: phpbb\template\twig\lexer + arguments: + - @template.twig.environment + + template.twig.loader: + class: phpbb\template\twig\loader + + template.twig.extensions.collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: twig.extension } + + template.twig.extensions.phpbb: + class: phpbb\template\twig\extension + arguments: + - @template_context + - @user + tags: + - { name: twig.extension } + + template.twig.extensions.routing: + class: Symfony\Bridge\Twig\Extension\RoutingExtension + arguments: + - @router + tags: + - { name: twig.extension } -- cgit v1.2.1 From 6850169095f099d8fd9f3886e60237134c77ddb4 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sat, 22 Nov 2014 12:33:45 +0100 Subject: [ticket/13266] Enable the debug extension in the development environment PHPBB3-13266 --- phpBB/config/default/container/services_twig.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index fc5f9ba6a1..25382a95a1 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -41,3 +41,6 @@ services: - @router tags: - { name: twig.extension } + + template.twig.extensions.debug: + class: Twig_Extension_Debug -- cgit v1.2.1 From 4bdef6fd21a5dcab455b0cd1ee2652de606929c3 Mon Sep 17 00:00:00 2001 From: MateBartus Date: Thu, 12 Mar 2015 00:25:00 +0100 Subject: [ticket/13697] Moving filesystem related functions to filesystem service * Moving filesystem service to \phpbb\filesystem namespace * Wraping Symfony's Filesystem component * Moving filesystem related functions from includes/functions.php into \phpbb\filesystem\filesystem Functions moved (and deprecated): - phpbb_chmod - phpbb_is_writable - phpbb_is_absolute - phpbb_own_realpath - phpbb_realpath * Adding interface for filesystem service PHPBB3-13697 --- phpBB/config/default/container/services_twig.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 25382a95a1..5d7bf0eff3 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -19,6 +19,8 @@ services: template.twig.loader: class: phpbb\template\twig\loader + arguments: + - @filesystem template.twig.extensions.collection: class: phpbb\di\service_collection -- cgit v1.2.1 From 9a99c9e4b10eba614517e335527c332761b473a4 Mon Sep 17 00:00:00 2001 From: MateBartus Date: Wed, 29 Apr 2015 01:00:13 +0200 Subject: [ticket/13762] Replace user service with lang in twig extension PHPBB3-13762 --- phpBB/config/default/container/services_twig.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 5d7bf0eff3..6b54311f41 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -33,7 +33,7 @@ services: class: phpbb\template\twig\extension arguments: - @template_context - - @user + - @language tags: - { name: twig.extension } -- cgit v1.2.1 From f821130c3a4a22efd491aaad962cc84a82dde56a Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 25 Nov 2014 17:04:15 +0100 Subject: [ticket/12632] Add twig.debug and twig.auto_reload in config.yml PHPBB3-13206 PHPBB3-12632 --- phpBB/config/default/container/services_twig.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 6b54311f41..6214adfac6 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -11,6 +11,7 @@ services: - %core.template.cache_path% - @ext.manager - @template.twig.loader + - [] template.twig.lexer: class: phpbb\template\twig\lexer -- cgit v1.2.1 From 51376a43919cba7a5037edb7cc31f18b5950437b Mon Sep 17 00:00:00 2001 From: Nicofuma Date: Mon, 4 May 2015 23:50:16 +0200 Subject: [ticket/13638] Inject $filesystem in \phpbb\template\asset PHPBB3-13638 --- phpBB/config/default/container/services_twig.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 6b54311f41..9ab004731e 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -6,6 +6,7 @@ services: class: phpbb\template\twig\environment arguments: - @config + - @filesystem - @path_helper - @service_container - %core.template.cache_path% -- cgit v1.2.1 From 7b301e22f32e9209bb4e3ea17a5637a84a4ef908 Mon Sep 17 00:00:00 2001 From: MateBartus Date: Fri, 1 May 2015 19:04:21 +0200 Subject: [ticket/13804] Make template's user dependency optional PHPBB3-13804 --- phpBB/config/default/container/services_twig.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 9ab004731e..d8e1ae0769 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -47,3 +47,18 @@ services: template.twig.extensions.debug: class: Twig_Extension_Debug + + template: + class: phpbb\template\twig\twig + arguments: + - @path_helper + - @config + - @template_context + - @template.twig.environment + - %core.template.cache_path% + - @user + - @template.twig.extensions.collection + - @ext.manager + + template_context: + class: phpbb\template\context -- cgit v1.2.1 From 8e5e954438b232f4ce7aec6a5db3d52b974c07a8 Mon Sep 17 00:00:00 2001 From: Nicofuma Date: Sun, 22 Feb 2015 23:36:27 +0100 Subject: [ticket/13645] Move the feeds to controllers PHPBB3-13645 --- phpBB/config/default/container/services_twig.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 2799892376..4132be49fa 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -40,9 +40,9 @@ services: - { name: twig.extension } template.twig.extensions.routing: - class: Symfony\Bridge\Twig\Extension\RoutingExtension + class: phpbb\template\twig\extension\routing arguments: - - @router + - @routing.helper tags: - { name: twig.extension } -- cgit v1.2.1 From d9d89cad94eada62e900a012046b8d45c5aa3129 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 7 Dec 2015 13:11:22 -0800 Subject: [ticket/14247] Use quotes around @ and % strings in YAML PHPBB3-14247 --- phpBB/config/default/container/services_twig.yml | 44 ++++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 4132be49fa..2dbf444e0c 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -1,48 +1,48 @@ parameters: - core.template.cache_path: %core.root_path%cache/%core.environment%/twig/ + core.template.cache_path: '%core.root_path%cache/%core.environment%/twig/' services: template.twig.environment: class: phpbb\template\twig\environment arguments: - - @config - - @filesystem - - @path_helper - - @service_container - - %core.template.cache_path% - - @ext.manager - - @template.twig.loader + - '@config' + - '@filesystem' + - '@path_helper' + - '@service_container' + - '%core.template.cache_path%' + - '@ext.manager' + - '@template.twig.loader' - [] template.twig.lexer: class: phpbb\template\twig\lexer arguments: - - @template.twig.environment + - '@template.twig.environment' template.twig.loader: class: phpbb\template\twig\loader arguments: - - @filesystem + - '@filesystem' template.twig.extensions.collection: class: phpbb\di\service_collection arguments: - - @service_container + - '@service_container' tags: - { name: service_collection, tag: twig.extension } template.twig.extensions.phpbb: class: phpbb\template\twig\extension arguments: - - @template_context - - @language + - '@template_context' + - '@language' tags: - { name: twig.extension } template.twig.extensions.routing: class: phpbb\template\twig\extension\routing arguments: - - @routing.helper + - '@routing.helper' tags: - { name: twig.extension } @@ -52,14 +52,14 @@ services: template: class: phpbb\template\twig\twig arguments: - - @path_helper - - @config - - @template_context - - @template.twig.environment - - %core.template.cache_path% - - @user - - @template.twig.extensions.collection - - @ext.manager + - '@path_helper' + - '@config' + - '@template_context' + - '@template.twig.environment' + - '%core.template.cache_path%' + - '@user' + - '@template.twig.extensions.collection' + - '@ext.manager' template_context: class: phpbb\template\context -- cgit v1.2.1 From 56c2caf6c0778c0da48fe0ac688c893777b89ee4 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Wed, 23 Mar 2016 22:48:58 +0100 Subject: [ticket/14555] Uniformize cache directory usages PHPBB3-14555 --- phpBB/config/default/container/services_twig.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 2dbf444e0c..dc08d65e1a 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -1,5 +1,5 @@ parameters: - core.template.cache_path: '%core.root_path%cache/%core.environment%/twig/' + core.template.cache_path: '%core.cache_dir%twig/' services: template.twig.environment: -- cgit v1.2.1 From 5cdbef860de6eccbf1ad62390668acc7fbccb46a Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Wed, 23 Mar 2016 11:26:30 +0100 Subject: [ticket/13616] Uses symfony/proxy-manager-bridge to lazy load twig lexer PHPBB3-13616 --- phpBB/config/default/container/services_twig.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index dc08d65e1a..3ca6d62c07 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -8,14 +8,16 @@ services: - '@config' - '@filesystem' - '@path_helper' - - '@service_container' - '%core.template.cache_path%' - '@ext.manager' - '@template.twig.loader' - [] + calls: + - [setLexer, ['@template.twig.lexer']] template.twig.lexer: class: phpbb\template\twig\lexer + lazy: true arguments: - '@template.twig.environment' -- cgit v1.2.1 From 633bbc9c6d42785233ea10165a081c7c32795d1c Mon Sep 17 00:00:00 2001 From: rxu Date: Wed, 11 Jan 2017 22:50:50 +0700 Subject: [ticket/14990] Add core events to the Twig environment PHPBB3-14990 --- phpBB/config/default/container/services_twig.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 3ca6d62c07..132b1a3df8 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -12,6 +12,7 @@ services: - '@ext.manager' - '@template.twig.loader' - [] + - '@dispatcher' calls: - [setLexer, ['@template.twig.lexer']] -- cgit v1.2.1 From fcc8e155ec309669bebbf6e0370cecfe64c95193 Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 16 Apr 2017 20:53:59 +0700 Subject: [ticket/14990] Move dispatcher object to the front of the options array PHPBB3-14990 --- phpBB/config/default/container/services_twig.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/config/default/container/services_twig.yml') diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 132b1a3df8..a9b5b6d4cd 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -11,8 +11,8 @@ services: - '%core.template.cache_path%' - '@ext.manager' - '@template.twig.loader' - - [] - '@dispatcher' + - [] calls: - [setLexer, ['@template.twig.lexer']] -- cgit v1.2.1