From 00c3d1cb9785badaf5a9135660108f93439645e6 Mon Sep 17 00:00:00 2001 From: Tchama Date: Mon, 3 Aug 2020 21:15:03 +0200 Subject: [PATCH] sf4, fix errors with report bundle, adapt new config yaml directory --- DependencyInjection/ChillReportExtension.php | 12 ++++++------ DependencyInjection/Configuration.php | 4 ++-- Resources/translations/messages.fr.yml | 3 +-- Resources/translations/messages.nl.yml | 3 +-- Resources/config/routing.yml => config/routes.yaml | 0 .../config/services.yml => config/services.yaml | 0 .../services/controller.yaml | 0 .../export.yml => config/services/export.yaml | 0 .../fixtures.yml => config/services/fixtures.yaml | 2 +- .../config/validation.yml => config/validation.yaml | 0 10 files changed, 11 insertions(+), 13 deletions(-) rename Resources/config/routing.yml => config/routes.yaml (100%) rename Resources/config/services.yml => config/services.yaml (100%) rename Resources/config/services/controller.yml => config/services/controller.yaml (100%) rename Resources/config/services/export.yml => config/services/export.yaml (100%) rename Resources/config/services/fixtures.yml => config/services/fixtures.yaml (67%) rename Resources/config/validation.yml => config/validation.yaml (100%) diff --git a/DependencyInjection/ChillReportExtension.php b/DependencyInjection/ChillReportExtension.php index 54d09580c..359017020 100644 --- a/DependencyInjection/ChillReportExtension.php +++ b/DependencyInjection/ChillReportExtension.php @@ -25,11 +25,11 @@ class ChillReportExtension extends Extension implements PrependExtensionInterfac $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); - $loader->load('services.yml'); - $loader->load('services/fixtures.yml'); - $loader->load('services/export.yml'); - $loader->load('services/controller.yml'); + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config')); + $loader->load('services.yaml'); + $loader->load('services/fixtures.yaml'); + $loader->load('services/export.yaml'); + $loader->load('services/controller.yaml'); } /** @@ -75,7 +75,7 @@ class ChillReportExtension extends Extension implements PrependExtensionInterfac $container->prependExtensionConfig('chill_main', array( 'routing' => array( 'resources' => array( - '@ChillReportBundle/Resources/config/routing.yml' + '@ChillReportBundle/config/routes.yaml' ) ) )); diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index e9c959146..2b3b75672 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -17,8 +17,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('chill_report'); + $treeBuilder = new TreeBuilder('chill_report'); + $rootNode = $treeBuilder->getRootNode('chill_report'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index 6ea3a2600..5bfd3f75a 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -14,7 +14,6 @@ Date: Date User: Utilisateur 'Report type': 'Type de rapport' 'View the report': "Voir le rapport" -'Update the report': "Mettre à jour le rapport" Report data: Données du rapport 'Report view : %name%': 'Rapport : %name%' Report: Rapport @@ -38,7 +37,7 @@ No report registered for this person.: Aucun rapport pour cette personne. '%total% reports matching the search "%pattern%"': '{0} Aucun rapport ne correspond à la recherche "%pattern%" | {1} Un rapport correspond à la recherche "%pattern%" | ]1,Inf]%total% rapports correspondent à la recherche "%pattern%"' #timeline -'%user% has filled a %report_label% report': %user% a ajouté un rapport '%report_label%' +'%user% has filled a %report_label% report': "%user% a ajouté un rapport '%report_label%'" #roles CHILL_REPORT_UPDATE: Modifier les rapports diff --git a/Resources/translations/messages.nl.yml b/Resources/translations/messages.nl.yml index adabc1d1c..54bd178ff 100644 --- a/Resources/translations/messages.nl.yml +++ b/Resources/translations/messages.nl.yml @@ -14,7 +14,6 @@ Date: Datum User: Gebruiker 'Report type': 'Soort of verslag' 'View the report': "Bekijk de consultatiegegevens" -'Update the report': "Update van de consultatiegegevens" #Flash messages 'Success : report created!': "De consultatiegegevens zijn correct ingevuld!" @@ -29,4 +28,4 @@ User: Gebruiker 'You are going to leave a page with unsubmitted data. Are you sure you want to leave ?': 'U bent aan te vertrekken een pagina die veranderdt datas behoudt. Bent u er zeker van dat u wil vertrekken ?' #timeline -'%user% has filled a %report_label% report on %date%': %user% heeft een rapport '%report_label%' toegevoegd om %date% +'%user% has filled a %report_label% report on %date%': "%user% heeft een rapport '%report_label%' toegevoegd om %date%" diff --git a/Resources/config/routing.yml b/config/routes.yaml similarity index 100% rename from Resources/config/routing.yml rename to config/routes.yaml diff --git a/Resources/config/services.yml b/config/services.yaml similarity index 100% rename from Resources/config/services.yml rename to config/services.yaml diff --git a/Resources/config/services/controller.yml b/config/services/controller.yaml similarity index 100% rename from Resources/config/services/controller.yml rename to config/services/controller.yaml diff --git a/Resources/config/services/export.yml b/config/services/export.yaml similarity index 100% rename from Resources/config/services/export.yml rename to config/services/export.yaml diff --git a/Resources/config/services/fixtures.yml b/config/services/fixtures.yaml similarity index 67% rename from Resources/config/services/fixtures.yml rename to config/services/fixtures.yaml index dfb34ddc4..6362bbfe7 100644 --- a/Resources/config/services/fixtures.yml +++ b/config/services/fixtures.yaml @@ -1,4 +1,4 @@ services: Chill\ReportBundle\DataFixtures\ORM\: - resource: ../../../DataFixtures/ORM + resource: ../../DataFixtures/ORM tags: [ 'doctrine.fixture.orm' ] \ No newline at end of file diff --git a/Resources/config/validation.yml b/config/validation.yaml similarity index 100% rename from Resources/config/validation.yml rename to config/validation.yaml