From 3c732b67b88b71caa686e46d7d910963f654a98c Mon Sep 17 00:00:00 2001 From: Stijn Vrolijk Date: Tue, 29 Sep 2015 09:23:53 +0200 Subject: [PATCH 1/6] Add basic translation management interface --- app/AppKernel.php | 2 + app/Resources/translations/messages.en.xliff | 76 ++++++++++++++++++++ app/Resources/translations/messages.fr.xliff | 76 ++++++++++++++++++++ app/Resources/translations/messages.nl.xliff | 76 ++++++++++++++++++++ app/config/config.yml | 17 +++++ app/config/routing_dev.yml | 5 ++ composer.json | 1 + 7 files changed, 253 insertions(+) create mode 100644 app/Resources/translations/messages.en.xliff create mode 100644 app/Resources/translations/messages.fr.xliff create mode 100644 app/Resources/translations/messages.nl.xliff diff --git a/app/AppKernel.php b/app/AppKernel.php index ad2d8ac..baa1be6 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -17,6 +17,8 @@ public function registerBundles() new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), + new JMS\DiExtraBundle\JMSDiExtraBundle($this), + new JMS\AopBundle\JMSAopBundle(), new JMS\I18nRoutingBundle\JMSI18nRoutingBundle(), new JMS\TranslationBundle\JMSTranslationBundle(), new Mopa\Bundle\BootstrapBundle\MopaBootstrapBundle(), diff --git a/app/Resources/translations/messages.en.xliff b/app/Resources/translations/messages.en.xliff new file mode 100644 index 0000000..2f69d44 --- /dev/null +++ b/app/Resources/translations/messages.en.xliff @@ -0,0 +1,76 @@ + + + +
+ + The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. +
+ + + Controller/Tests/DatePickerController.php + Ok + Ok + + + Resources/views/base.html.twig + core.interface.backToTop + core.interface.backToTop + + + Resources/views/base.html.twig + Resources/views/empty.html.twig + core.warnings.oldBrowser + core.warnings.oldBrowser + + + views/Form/fields.html.twig + datepicker.pickDate + datepicker.pickDate + + + Resources/views/dialogs.html.twig + dialogs.buttons.cancel + dialogs.buttons.cancel + + + Resources/views/dialogs.html.twig + dialogs.buttons.ok + dialogs.buttons.ok + + + Resources/views/base.html.twig + Resources/views/empty.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + dialogs.close + dialogs.close + + + Resources/views/base.html.twig + search.forms.buttons.search + search.forms.buttons.search + + + Resources/views/base.html.twig + search.forms.placeholders.term + search.forms.placeholders.term + + + Resources/views/base.html.twig + user.header.actions.logout + user.header.actions.logout + + + Resources/views/base.html.twig + user.header.actions.settings + user.header.actions.settings + + +
+
diff --git a/app/Resources/translations/messages.fr.xliff b/app/Resources/translations/messages.fr.xliff new file mode 100644 index 0000000..c406b6d --- /dev/null +++ b/app/Resources/translations/messages.fr.xliff @@ -0,0 +1,76 @@ + + + +
+ + The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. +
+ + + Controller/Tests/DatePickerController.php + Ok + Ok + + + Resources/views/base.html.twig + core.interface.backToTop + core.interface.backToTop + + + Resources/views/base.html.twig + Resources/views/empty.html.twig + core.warnings.oldBrowser + core.warnings.oldBrowser + + + views/Form/fields.html.twig + datepicker.pickDate + datepicker.pickDate + + + Resources/views/dialogs.html.twig + dialogs.buttons.cancel + dialogs.buttons.cancel + + + Resources/views/dialogs.html.twig + dialogs.buttons.ok + dialogs.buttons.ok + + + Resources/views/base.html.twig + Resources/views/empty.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + dialogs.close + dialogs.close + + + Resources/views/base.html.twig + search.forms.buttons.search + search.forms.buttons.search + + + Resources/views/base.html.twig + search.forms.placeholders.term + search.forms.placeholders.term + + + Resources/views/base.html.twig + user.header.actions.logout + user.header.actions.logout + + + Resources/views/base.html.twig + user.header.actions.settings + user.header.actions.settings + + +
+
diff --git a/app/Resources/translations/messages.nl.xliff b/app/Resources/translations/messages.nl.xliff new file mode 100644 index 0000000..28f2afa --- /dev/null +++ b/app/Resources/translations/messages.nl.xliff @@ -0,0 +1,76 @@ + + + +
+ + The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. +
+ + + Controller/Tests/DatePickerController.php + Ok + Ok + + + Resources/views/base.html.twig + core.interface.backToTop + core.interface.backToTop + + + Resources/views/base.html.twig + Resources/views/empty.html.twig + core.warnings.oldBrowser + core.warnings.oldBrowser + + + views/Form/fields.html.twig + datepicker.pickDate + datepicker.pickDate + + + Resources/views/dialogs.html.twig + dialogs.buttons.cancel + dialogs.buttons.cancel + + + Resources/views/dialogs.html.twig + dialogs.buttons.ok + dialogs.buttons.ok + + + Resources/views/base.html.twig + Resources/views/empty.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + Resources/views/notifications.html.twig + dialogs.close + dialogs.close + + + Resources/views/base.html.twig + search.forms.buttons.search + search.forms.buttons.search + + + Resources/views/base.html.twig + search.forms.placeholders.term + search.forms.placeholders.term + + + Resources/views/base.html.twig + user.header.actions.logout + user.header.actions.logout + + + Resources/views/base.html.twig + user.header.actions.settings + user.header.actions.settings + + +
+
diff --git a/app/config/config.yml b/app/config/config.yml index 1e23154..718a437 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -111,3 +111,20 @@ swiftmailer: host: "%mailer_host%" username: "%mailer_user%" password: "%mailer_password%" + +# Translation configuration +jms_translation: + configs: + app: + dirs: [%kernel.root_dir%, %kernel.root_dir%/../src] + output_dir: %kernel.root_dir%/Resources/translations + ignored_domains: [routes] + excluded_names: ["*TestCase.php", "*Test.php", "DefaultMenuListener.php"] + excluded_dirs: [cache, data, logs] + extractors: [jms_i18n_routing] + +services: + twig.text_extension: + class: Twig_Extensions_Extension_Text + tags: + - name: twig.extension diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml index 67fb6f6..be7b907 100644 --- a/app/config/routing_dev.yml +++ b/app/config/routing_dev.yml @@ -17,3 +17,8 @@ _main: sumo_coders_example_bundle: resource: "@SumoCodersFrameworkExampleBundle/Resources/config/routing.yml" prefix: /example + +JMSTranslationBundle_ui: + resource: @JMSTranslationBundle/Controller/ + type: annotation + prefix: /_trans diff --git a/composer.json b/composer.json index d6cdb55..5c391ce 100644 --- a/composer.json +++ b/composer.json @@ -36,6 +36,7 @@ "jms/translation-bundle": "^1.1", "knplabs/knp-menu-bundle": "^2.1", "tijsverkoyen/css-to-inline-styles": "^2.0", + "jms/di-extra-bundle": "1.6.*", "sumocoders/framework-error-bundle": "^3.0", "sumocoders/framework-user-bundle": "^3.0", From 2c0091e14f695446b8c7ef225f56e8b50ab1e13b Mon Sep 17 00:00:00 2001 From: Stijn Vrolijk Date: Tue, 29 Sep 2015 10:29:36 +0200 Subject: [PATCH 2/6] Add translation page to menu --- .../EventListener/MenuListener.php | 30 +++++++++++++++++++ .../Resources/config/services.yml | 7 +++++ .../Resources/translations/messages.en.yml | 1 + 3 files changed, 38 insertions(+) create mode 100644 src/SumoCoders/FrameworkCoreBundle/EventListener/MenuListener.php diff --git a/src/SumoCoders/FrameworkCoreBundle/EventListener/MenuListener.php b/src/SumoCoders/FrameworkCoreBundle/EventListener/MenuListener.php new file mode 100644 index 0000000..df3e841 --- /dev/null +++ b/src/SumoCoders/FrameworkCoreBundle/EventListener/MenuListener.php @@ -0,0 +1,30 @@ +getMenu(); + + if ($this->getSecurityAuthorizationChecker()->isGranted('ROLE_ADMIN')) { + $menuItem = $event->getFactory()->createItem( + 'navigation.translations', + array( + 'route' => 'jms_translation_index', + ) + ); + $menuItem->setLinkAttributes( + array( + 'class' => 'menu-item', + ) + ); + + $menu->addChild($menuItem); + } + } +} diff --git a/src/SumoCoders/FrameworkCoreBundle/Resources/config/services.yml b/src/SumoCoders/FrameworkCoreBundle/Resources/config/services.yml index 7612933..67389b2 100644 --- a/src/SumoCoders/FrameworkCoreBundle/Resources/config/services.yml +++ b/src/SumoCoders/FrameworkCoreBundle/Resources/config/services.yml @@ -67,3 +67,10 @@ services: - [setDefaultReplyTo, ["%mailer_default_reply_to_email%", "%mailer_default_reply_to_name%"]] - [setDefaultTo, ["%mailer_default_to_email%", "%mailer_default_to_name%"]] + framework.menu_listener: + class: SumoCoders\FrameworkCoreBundle\EventListener\MenuListener + arguments: + - @security.authorization_checker + - @security.token_storage + tags: + - { name: kernel.event_listener, event: framework_core.configure_menu, method: onConfigureMenu } diff --git a/src/SumoCoders/FrameworkCoreBundle/Resources/translations/messages.en.yml b/src/SumoCoders/FrameworkCoreBundle/Resources/translations/messages.en.yml index 2b8c300..f0b8435 100644 --- a/src/SumoCoders/FrameworkCoreBundle/Resources/translations/messages.en.yml +++ b/src/SumoCoders/FrameworkCoreBundle/Resources/translations/messages.en.yml @@ -110,6 +110,7 @@ header: overview: overview navigation: + translations: translations titles: possible_actions: possible actions showHideMenu: show/hide menu From 0f9e88cb8b279ee0655d2c4a31a7cda6b10f3e20 Mon Sep 17 00:00:00 2001 From: Stijn Vrolijk Date: Tue, 29 Sep 2015 11:26:19 +0200 Subject: [PATCH 3/6] Add translations template to our interface --- .../views/Translate/index.html.twig | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 app/Resources/JMSTranslationBundle/views/Translate/index.html.twig diff --git a/app/Resources/JMSTranslationBundle/views/Translate/index.html.twig b/app/Resources/JMSTranslationBundle/views/Translate/index.html.twig new file mode 100644 index 0000000..7f82ea6 --- /dev/null +++ b/app/Resources/JMSTranslationBundle/views/Translate/index.html.twig @@ -0,0 +1,111 @@ +{% extends "SumoCodersFrameworkCoreBundle::base.html.twig" %} + +{% block header_title %} +

+ {{ 'navigation.translations'|trans|capitalize }} +

+{% endblock %} + +{% block javascripts %} + {{ parent() }} + + +{% endblock %} + +{% block main %} + +
+ + + + + +
+ + {% if isWriteable is sameas(false) %} +
+ The translation file "{{ file }}" is not writable. +
+ {% endif %} + + {% if "xliff" != format %} +
+ Due to limitations of the different loaders/dumpers, some features are unfortunately limited to the XLIFF format. + +

+ + However, you can easily convert your existing translation files to the XLIFF format by running:
+ php app/console translation:extract {{ selectedLocale }} --config={{ selectedConfig }} --output-format=xliff +
+ {% endif %} + +

Available Messages

+ + {% if newMessages is not empty %} +

New Messages

+ {% include "JMSTranslationBundle:Translate:messages.html.twig" with {"messages": newMessages} %} + {% endif %} + + {% if existingMessages is not empty %} +

Existing Messages

+ {% include "JMSTranslationBundle:Translate:messages.html.twig" with {"messages": existingMessages} %} + {% endif %} + +{% endblock %} From 6715c2dc264a00c254225d880ddbb34cc56f4ea6 Mon Sep 17 00:00:00 2001 From: Stijn Vrolijk Date: Tue, 29 Sep 2015 13:13:38 +0200 Subject: [PATCH 4/6] Improve layout --- .../views/Translate/index.html.twig | 97 +++++++++++-------- .../views/Translate/messages.html.twig | 60 ++++++++++++ 2 files changed, 118 insertions(+), 39 deletions(-) create mode 100644 app/Resources/JMSTranslationBundle/views/Translate/messages.html.twig diff --git a/app/Resources/JMSTranslationBundle/views/Translate/index.html.twig b/app/Resources/JMSTranslationBundle/views/Translate/index.html.twig index 7f82ea6..5bc13d0 100644 --- a/app/Resources/JMSTranslationBundle/views/Translate/index.html.twig +++ b/app/Resources/JMSTranslationBundle/views/Translate/index.html.twig @@ -25,6 +25,7 @@ type: 'POST', headers: {'X-HTTP-METHOD-OVERRIDE': 'PUT'}, data: {'_method': 'PUT', 'message': $(this).val()}, + dataType: 'html', error: function() { $(self).parent().prepend('
Translation could not be saved
'); }, @@ -59,53 +60,71 @@ {% block main %} +
- - - - - +
+
+ +
+ +
+ +
+ +
+ +
+
+
- {% if isWriteable is sameas(false) %} -
- The translation file "{{ file }}" is not writable. -
- {% endif %} + {% if isWriteable is sameas(false) %} +
+ The translation file "{{ file }}" is not writable. +
+ {% endif %} - {% if "xliff" != format %} -
- Due to limitations of the different loaders/dumpers, some features are unfortunately limited to the XLIFF format. + {% if "xliff" != format %} +
+ Due to limitations of the different loaders/dumpers, some features are unfortunately limited to the XLIFF format. -

+

- However, you can easily convert your existing translation files to the XLIFF format by running:
- php app/console translation:extract {{ selectedLocale }} --config={{ selectedConfig }} --output-format=xliff -
- {% endif %} + However, you can easily convert your existing translation files to the XLIFF format by running:
+ php app/console translation:extract {{ selectedLocale }} --config={{ selectedConfig }} --output-format=xliff +
+ {% endif %} -

Available Messages

+
+
+

Available Messages

+
+
- {% if newMessages is not empty %} -

New Messages

- {% include "JMSTranslationBundle:Translate:messages.html.twig" with {"messages": newMessages} %} - {% endif %} + {% if newMessages is not empty %} +
+
+

New Messages

+ {% include "JMSTranslationBundle:Translate:messages.html.twig" with {"messages": newMessages} %} +
+
+ {% endif %} - {% if existingMessages is not empty %} -

Existing Messages

- {% include "JMSTranslationBundle:Translate:messages.html.twig" with {"messages": existingMessages} %} - {% endif %} + {% if existingMessages is not empty %} +

Existing Messages

+ {% include "JMSTranslationBundle:Translate:messages.html.twig" with {"messages": existingMessages} %} + {% endif %} {% endblock %} diff --git a/app/Resources/JMSTranslationBundle/views/Translate/messages.html.twig b/app/Resources/JMSTranslationBundle/views/Translate/messages.html.twig new file mode 100644 index 0000000..978af4e --- /dev/null +++ b/app/Resources/JMSTranslationBundle/views/Translate/messages.html.twig @@ -0,0 +1,60 @@ +
+
+
ID
+
+
+
Translation
+
+
+
Additional Information
+
+
+ From 5255c9f2b574c859e9aa5e95d82dbd71be9d0c0b Mon Sep 17 00:00:00 2001 From: stijnvrolijk Date: Tue, 7 Jun 2016 15:58:58 +0200 Subject: [PATCH 5/6] Update the JMSDiExtraBundle --- composer.json | 2 +- composer.lock | 227 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 222 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 5c391ce..19f5289 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "jms/translation-bundle": "^1.1", "knplabs/knp-menu-bundle": "^2.1", "tijsverkoyen/css-to-inline-styles": "^2.0", - "jms/di-extra-bundle": "1.6.*", + "jms/di-extra-bundle": "^1.7", "sumocoders/framework-error-bundle": "^3.0", "sumocoders/framework-user-bundle": "^3.0", diff --git a/composer.lock b/composer.lock index 4fd5dca..d396b38 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "db29e00614ded6157b51227da96b1467", - "content-hash": "19647745fea04e590e1bd7b2f63fcf7a", + "hash": "35130a8c9dc716543dfb8a258b02f5ba", + "content-hash": "6940c7b001ee137df87881220f55e33a", "packages": [ { "name": "dbtlr/php-airbrake", @@ -1004,12 +1004,12 @@ "source": { "type": "git", "url": "https://github.com/FriendsOfSymfony/FOSUserBundle.git", - "reference": "88f84f631ee7859c069cf98b475c679e90b16b22" + "reference": "d1fccc6335b74beca94525551cacc06b256ed261" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/16b04c49af05dd3fb381e4abe04f0e5e231ac76d", - "reference": "88f84f631ee7859c069cf98b475c679e90b16b22", + "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/d1fccc6335b74beca94525551cacc06b256ed261", + "reference": "d1fccc6335b74beca94525551cacc06b256ed261", "shasum": "" }, "require": { @@ -1065,7 +1065,7 @@ "keywords": [ "User management" ], - "time": "2016-03-04 13:20:42" + "time": "2016-05-27 12:14:43" }, { "name": "incenteev/composer-parameter-handler", @@ -1210,6 +1210,169 @@ ], "time": "2014-01-12 16:20:24" }, + { + "name": "jms/aop-bundle", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/JMSAopBundle.git", + "reference": "78000d007e74283cc564a58e184d7f62548ad394" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/JMSAopBundle/zipball/78000d007e74283cc564a58e184d7f62548ad394", + "reference": "78000d007e74283cc564a58e184d7f62548ad394", + "shasum": "" + }, + "require": { + "jms/cg": "^1.1", + "php": ">=5.3.9", + "symfony/framework-bundle": "^2.3|^3.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^2.7" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "JMS\\AopBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Adds AOP capabilities to Symfony2", + "keywords": [ + "annotations", + "aop" + ], + "time": "2015-12-09 16:30:46" + }, + { + "name": "jms/cg", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/cg-library.git", + "reference": "0af1113c7409b8636c5244bbae10b2e0ff792e9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/cg-library/zipball/0af1113c7409b8636c5244bbae10b2e0ff792e9c", + "reference": "0af1113c7409b8636c5244bbae10b2e0ff792e9c", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-0": { + "CG\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Toolset for generating PHP code", + "keywords": [ + "code generation" + ], + "time": "2015-09-13 08:54:43" + }, + { + "name": "jms/di-extra-bundle", + "version": "1.7.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/JMSDiExtraBundle.git", + "reference": "27c3fc7150550ccc0731290b2c1ceb57449f909d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/JMSDiExtraBundle/zipball/27c3fc7150550ccc0731290b2c1ceb57449f909d", + "reference": "27c3fc7150550ccc0731290b2c1ceb57449f909d", + "shasum": "" + }, + "require": { + "jms/aop-bundle": "~1.1", + "jms/metadata": "~1.0", + "php": "~5.3|~7.0", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/finder": "~2.3|~3.0", + "symfony/framework-bundle": "~2.3|~3.0", + "symfony/http-kernel": "^2.3.24|~3.0", + "symfony/process": "~2.3|~3.0", + "symfony/routing": "~2.3|~3.0" + }, + "require-dev": { + "doctrine/doctrine-bundle": "~1.5", + "doctrine/orm": "~2.3", + "jms/security-extra-bundle": "~1.0", + "phpcollection/phpcollection": ">=0.2,<0.3-dev", + "sensio/framework-extra-bundle": "~2.0|~3.0", + "symfony/browser-kit": "~2.3|~3.0", + "symfony/class-loader": "~2.3|~3.0", + "symfony/form": "~2.3|~3.0", + "symfony/phpunit-bridge": "~2.7", + "symfony/security-bundle": "~2.3", + "symfony/twig-bundle": "~2.3|~3.0", + "symfony/validator": "~2.3|~3.0", + "symfony/yaml": "~2.3|~3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "JMS\\DiExtraBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Allows to configure dependency injection using annotations", + "homepage": "http://jmsyst.com/bundles/JMSDiExtraBundle", + "keywords": [ + "annotations", + "dependency injection" + ], + "time": "2016-04-18 22:27:09" + }, { "name": "jms/i18n-routing-bundle", "version": "2.0.0", @@ -1266,6 +1429,58 @@ ], "time": "2015-12-01 23:14:47" }, + { + "name": "jms/metadata", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/metadata.git", + "reference": "22b72455559a25777cfd28c4ffda81ff7639f353" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353", + "reference": "22b72455559a25777cfd28c4ffda81ff7639f353", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "doctrine/cache": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Metadata\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache" + ], + "authors": [ + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh", + "role": "Developer of wrapped JMSSerializerBundle" + } + ], + "description": "Class/method/property metadata management in PHP", + "keywords": [ + "annotations", + "metadata", + "xml", + "yaml" + ], + "time": "2014-07-12 07:13:19" + }, { "name": "jms/translation-bundle", "version": "1.1.0", From d93ef365df725913c09ae7c91b5611c375eefb94 Mon Sep 17 00:00:00 2001 From: stijnvrolijk Date: Tue, 7 Jun 2016 17:27:29 +0200 Subject: [PATCH 6/6] Move the twig extensions service to the first service key --- app/config/config.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index 718a437..f4ab39b 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -7,6 +7,11 @@ services: fos_user.doctrine_registry: alias: doctrine + twig.extension.text: + class: Twig_Extensions_Extension_Text + tags: + - { name: twig.extension } + # Framework configuration framework: translator: { fallback: "%locale%" } @@ -122,9 +127,3 @@ jms_translation: excluded_names: ["*TestCase.php", "*Test.php", "DefaultMenuListener.php"] excluded_dirs: [cache, data, logs] extractors: [jms_i18n_routing] - -services: - twig.text_extension: - class: Twig_Extensions_Extension_Text - tags: - - name: twig.extension