Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DependencyInjection/BazingaJsTranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Definition\Processor;

Expand All @@ -22,9 +22,9 @@ public function load(array $configs, ContainerBuilder $container): void
$configuration = new Configuration($container->getParameter('kernel.debug'));
$config = $processor->processConfiguration($configuration, $configs);

$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
$loader->load('controllers.xml');
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yaml');
$loader->load('controllers.yaml');

$container
->getDefinition('bazinga.jstranslation.controller')
Expand Down
22 changes: 0 additions & 22 deletions Resources/config/controllers.xml

This file was deleted.

16 changes: 16 additions & 0 deletions Resources/config/controllers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
parameters:
bazinga.jstranslation.controller.class: Bazinga\Bundle\JsTranslationBundle\Controller\Controller

services:
bazinga.jstranslation.controller:
class: '%bazinga.jstranslation.controller.class%'
public: true
arguments:
- '@translator'
- '@twig'
- '@bazinga.jstranslation.translation_finder'
- '%kernel.cache_dir%/bazinga-js-translation'
- '%kernel.debug%'
- ~ # fallback (locale)
- ~ # default domain
- ~ # http cache time
30 changes: 0 additions & 30 deletions Resources/config/services.xml

This file was deleted.

31 changes: 31 additions & 0 deletions Resources/config/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
parameters:
bazinga.jstranslation.translation_finder.class: Bazinga\Bundle\JsTranslationBundle\Finder\TranslationFinder
bazinga.jstranslation.translation_dumper.class: Bazinga\Bundle\JsTranslationBundle\Dumper\TranslationDumper

services:
bazinga.jstranslation.translation_finder:
class: '%bazinga.jstranslation.translation_finder.class%'
public: true
arguments:
- [] # all resource files paths from the framework bundle

bazinga.jstranslation.translation_dumper:
class: '%bazinga.jstranslation.translation_dumper.class%'
public: true
arguments:
- '@twig'
- '@bazinga.jstranslation.translation_finder'
- '@filesystem'
- ~ # fallback (locale)
- ~ # default domain
- ~ # active locales
- ~ # active domains

bazinga.jstranslation.dump_command:
class: Bazinga\Bundle\JsTranslationBundle\Command\DumpCommand
public: true
arguments:
- '@bazinga.jstranslation.translation_dumper'
- '%kernel.project_dir%'
tags:
- { name: console.command, command: 'bazinga:js-translation:dump' }
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
],
"require": {
"php": ">=7.4",
"symfony/framework-bundle": "~4.4|~5.0|~6.0|~7.0",
"symfony/finder": "~4.4|~5.0|~6.0|~7.0",
"symfony/console": "~4.4|~5.0|~6.0|~7.0",
"symfony/intl": "~4.4|~5.0|~6.0|~7.0",
"symfony/translation": "~4.4|~5.0|~6.0|~7.0",
"symfony/twig-bundle": "~4.4|~5.0|~6.0|~7.0"
"symfony/framework-bundle": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/finder": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/console": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/intl": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/translation": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/twig-bundle": "~4.4|~5.0|~6.0|~7.0|~8.0"
},
"require-dev": {
"symfony/asset": "~4.4|~5.0|~6.0|~7.0",
"symfony/filesystem": "~4.4|~5.0|~6.0|~7.0",
"symfony/yaml": "~4.4|~5.0|~6.0|~7.0",
"symfony/browser-kit": "~4.4|~5.0|~6.0|~7.0",
"symfony/phpunit-bridge": "^5.0|^6.0|~7.0",
"symfony/asset": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/filesystem": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/yaml": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/browser-kit": "~4.4|~5.0|~6.0|~7.0|~8.0",
"symfony/phpunit-bridge": "^5.0|^6.0|~7.0|~8.0",
"phpunit/phpunit": "^4.8|~5.7|~6.5|~8"
},
"replace": {
Expand Down