From 3002756420de0d34be30b76a1e8f8234dcd7a636 Mon Sep 17 00:00:00 2001 From: pedro Date: Mon, 30 Apr 2018 13:57:47 +0200 Subject: [PATCH] Fix registry accessibility with SF v4.0.8 Reproduce bug Fix problem --- .symfony_checker | 24 +++++++++++++++++++ .travis.yml | 1 + composer.json | 1 + .../Resources/config/dictionary.xml | 4 ++-- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .symfony_checker diff --git a/.symfony_checker b/.symfony_checker new file mode 100644 index 00000000..85905884 --- /dev/null +++ b/.symfony_checker @@ -0,0 +1,24 @@ +getContainer()->get('knp_dictionary.registry') instanceof DictionaryRegistry) { + throw new Exception('Service "knp_dictionary.registry" unavailable.'); + } +}; + +return function (ConfigurableKernel $kernel) use ($test) { + $container = new ContainerBuilder(); + + $kernel + ->setContainerBuilder($container) + ->addBundle(new KnpDictionaryBundle()) + ->afterBoot($test) + ; +}; diff --git a/.travis.yml b/.travis.yml index 9e893dd8..6fb3dbb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,3 +23,4 @@ before_script: script: - rm phpspec.yml - vendor/bin/phpspec -n -fpretty run + - vendor/bin/symfony-integration-checker check diff --git a/composer.json b/composer.json index edca451b..a3ab0a6b 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "fzaninotto/faker": "~1.3", "leanphp/phpspec-code-coverage": "^4.0", "pedrotroller/php-cs-custom-fixer": "^2.6", + "pedrotroller/symfony-integration-checker": "~2.0.0", "phpspec/phpspec": "~4.0", "phpspec/prophecy": ">=1.7.2", "sebastian/comparator": "~1.2.4", diff --git a/src/Knp/DictionaryBundle/Resources/config/dictionary.xml b/src/Knp/DictionaryBundle/Resources/config/dictionary.xml index 4cbe51e0..1dce7660 100644 --- a/src/Knp/DictionaryBundle/Resources/config/dictionary.xml +++ b/src/Knp/DictionaryBundle/Resources/config/dictionary.xml @@ -27,7 +27,7 @@ - + @@ -56,6 +56,6 @@ - +