Skip to content

Commit b1865a1

Browse files
author
Olivier Dolbeau
authored
Merge pull request #358 from Nyholm/extractor20
Use extractor 2.0
2 parents 53df870 + cae38c4 commit b1865a1

File tree

7 files changed

+19
-46
lines changed

7 files changed

+19
-46
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ matrix:
2424

2525
# Test with lowest dependencies
2626
- php: 7.2
27-
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
27+
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
2828

2929
# Test the latest stable release
3030
- php: 7.3
@@ -51,7 +51,7 @@ before_install:
5151
- if ! [ -z "$SYMFONY_VERSION" ]; then composer config extra.symfony.require "${SYMFONY_VERSION}"; fi;
5252

5353
install:
54-
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
54+
- composer update ${COMPOSER_FLAGS} --prefer-dist --prefer-stable --no-interaction
5555

5656
script:
5757
- composer validate --strict --no-check-lock

DependencyInjection/TranslationExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function load(array $configs, ContainerBuilder $container): void
5252
$this->handleConfigNode($container, $config);
5353

5454
if ($config['webui']['enabled']) {
55+
$loader->load('webui.yml');
5556
$this->enableWebUi($container, $config);
5657
} else {
5758
$container->setParameter('php_translation.webui.enabled', false);
@@ -83,7 +84,6 @@ public function load(array $configs, ContainerBuilder $container): void
8384
}
8485

8586
$loader->load('console.yml');
86-
$loader->load('controllers.yml');
8787
}
8888

8989
/**

Resources/config/edit_in_place.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
services:
2+
Translation\Bundle\Controller\EditInPlaceController:
3+
autowire: true
4+
autoconfigure: true
5+
public: true
6+
arguments:
7+
- '@Translation\Bundle\Service\StorageManager'
8+
- '@Translation\Bundle\Service\CacheClearer'
9+
- '@Symfony\Component\Validator\Validator\ValidatorInterface'
10+
211
php_translation.edit_in_place.response_listener:
312
class: Translation\Bundle\EventListener\EditInPlaceResponseListener
413
tags:
@@ -31,4 +40,3 @@ services:
3140
- ~
3241
tags:
3342
- { name: 'twig.extension' }
34-

Resources/config/extractors.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,7 @@ services:
7373
- { name: 'php_translation.visitor', type: 'php' }
7474

7575
# Twig Visitors:
76-
php_translation.extractor.twig.factory:
77-
class: Translation\Extractor\Visitor\Twig\TwigVisitorFactory
78-
public: false
79-
80-
php_translation.extractor.twig.visitor.twig:
81-
class: Translation\Bundle\Twig\Visitor\DummyTwigVisitor
82-
factory: ["@php_translation.extractor.twig.factory", create]
76+
php_translation.extractor.twig.factory.twig:
77+
class: Translation\Extractor\Visitor\Twig\TwigVisitor
8378
tags:
84-
- { name: 'php_translation.visitor', type: 'twig' }
79+
- { name: 'php_translation.visitor', type: 'twig' }
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
services:
2-
Translation\Bundle\Controller\EditInPlaceController:
3-
autowire: true
4-
public: true
5-
tags: ['container.service_subscriber']
6-
arguments:
7-
- '@Translation\Bundle\Service\StorageManager'
8-
- '@Translation\Bundle\Service\CacheClearer'
9-
- '@Symfony\Component\Validator\Validator\ValidatorInterface'
10-
112
Translation\Bundle\Controller\WebUIController:
123
autowire: true
4+
autoconfigure: true
135
public: true
14-
tags: ['container.service_subscriber']
156
arguments:
167
- '@Translation\Bundle\Service\ConfigurationManager'
178
- '@Translation\Bundle\Catalogue\CatalogueFetcher'

Twig/Visitor/DummyTwigVisitor.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"symfony/intl": "^3.4 || ^4.3 || ^5.0",
2020

2121
"php-translation/symfony-storage": "^2.0",
22-
"php-translation/extractor": "^1.6",
22+
"php-translation/extractor": "^2.0",
2323
"nyholm/nsa": "^1.1",
24-
"twig/twig": "^1.42 || ^2.11"
24+
"twig/twig": "^2.11 || ^3.0"
2525
},
2626
"require-dev": {
2727
"symfony/phpunit-bridge": "^4.4 || ^5.0",
@@ -56,6 +56,7 @@
5656
"test": "vendor/bin/phpunit",
5757
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml Tests/Unit"
5858
},
59+
"minimum-stability": "dev",
5960
"extra": {
6061
"branch-alias": {
6162
"dev-master": "0.10-dev"

0 commit comments

Comments
 (0)