File tree 4 files changed +28
-2
lines changed
src/Knp/DictionaryBundle/Resources/config
4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Knp\DictionaryBundle\Dictionary\DictionaryRegistry;
4
+ use Knp\DictionaryBundle\KnpDictionaryBundle;
5
+ use Pedrotroller\Symfony\IntegrationChecker\ConfigurableKernel;
6
+ use Symfony\Component\DependencyInjection\ContainerBuilder;
7
+ use Symfony\Component\HttpKernel\KernelInterface;
8
+ use Webmozart\Assert\Assert;
9
+
10
+ $test = function (KernelInterface $kernel) {
11
+ if (false === $kernel->getContainer()->get('knp_dictionary.registry') instanceof DictionaryRegistry) {
12
+ throw new Exception('Service "knp_dictionary.registry" unavailable.');
13
+ }
14
+ };
15
+
16
+ return function (ConfigurableKernel $kernel) use ($test) {
17
+ $container = new ContainerBuilder();
18
+
19
+ $kernel
20
+ ->setContainerBuilder($container)
21
+ ->addBundle(new KnpDictionaryBundle())
22
+ ->afterBoot($test)
23
+ ;
24
+ };
Original file line number Diff line number Diff line change @@ -23,3 +23,4 @@ before_script:
23
23
script :
24
24
- rm phpspec.yml
25
25
- vendor/bin/phpspec -n -fpretty run
26
+ - vendor/bin/symfony-integration-checker check
Original file line number Diff line number Diff line change 29
29
"fzaninotto/faker" : " ~1.3" ,
30
30
"leanphp/phpspec-code-coverage" : " ^4.0" ,
31
31
"pedrotroller/php-cs-custom-fixer" : " ^2.6" ,
32
+ "pedrotroller/symfony-integration-checker" : " ~2.0.0" ,
32
33
"phpspec/phpspec" : " ~4.0" ,
33
34
"phpspec/prophecy" : " >=1.7.2" ,
34
35
"sebastian/comparator" : " ~1.2.4" ,
Original file line number Diff line number Diff line change 27
27
<tag name =" knp_dictionary.factory" />
28
28
</service >
29
29
30
- <service id =" knp_dictionary.dictionary.dictionary_registry" class =" Knp\DictionaryBundle\Dictionary\DictionaryRegistry" />
30
+ <service id =" knp_dictionary.dictionary.dictionary_registry" class =" Knp\DictionaryBundle\Dictionary\DictionaryRegistry" public = " true " />
31
31
32
32
<service id =" knp_dictionary.dictionary.value_transformer.constant_transformer" class =" Knp\DictionaryBundle\Dictionary\ValueTransformer\ConstantTransformer" />
33
33
56
56
<argument type =" service" id =" knp_dictionary.registry" />
57
57
</service >
58
58
59
- <service id =" knp_dictionary.registry" alias =" knp_dictionary.dictionary.dictionary_registry" />
59
+ <service id =" knp_dictionary.registry" alias =" knp_dictionary.dictionary.dictionary_registry" public = " true " />
60
60
</services >
61
61
</container >
You can’t perform that action at this time.
0 commit comments