File tree Expand file tree Collapse file tree 7 files changed +49
-6
lines changed
Resources/config/container Expand file tree Collapse file tree 7 files changed +49
-6
lines changed Original file line number Diff line number Diff line change 1+ /Tests export-ignore
2+ /phpstan.neon export-ignore
3+ /phpcs.xml.dist export-ignore
4+ /phpcs.xml export-ignore
5+ /.gitignore export-ignore
6+ /.travis.yml export-ignore
Original file line number Diff line number Diff line change 1515 <argument key =" $codeGeneratorListeners" type =" collection" >
1616 <argument type =" service" id =" TheCodingMachine\TDBM\Bundle\Utils\SymfonyCodeGeneratorListener" />
1717 </argument >
18+ <argument key =" $cache" type =" service" id =" tdbm.cache" ></argument >
1819 </service >
1920
21+ <service id =" tdbm.cache" class =" Doctrine\Common\Cache\FilesystemCache" >
22+ <argument >%kernel.project_dir%/var/cache/tdbm</argument >
23+ </service >
24+
25+
26+ <service id =" tdbm.cacheclearer" class =" TheCodingMachine\TDBM\Bundle\Utils\DoctrineCacheClearer" >
27+ <argument type =" service" id =" tdbm.cache" />
28+ <tag name =" kernel.cache_clearer" />
29+ </service >
30+
2031 <service id =" TheCodingMachine\TDBM\ConfigurationInterface" alias =" TheCodingMachine\TDBM\Configuration" >
2132 </service >
2233
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ services:
1313
1414 # makes classes in src/ available to be used as services
1515 # this creates a service per class whose id is the fully-qualified class name
16- TheCodingMachine\Graphqlite \Bundle\Tests\Fixtures\ :
16+ TheCodingMachine\TDBM \Bundle\Tests\Fixtures\ :
1717 resource : ' ../*'
1818 exclude : ' ../{Entities}'
1919
Original file line number Diff line number Diff line change 44
55use PHPUnit \Framework \TestCase ;
66use Symfony \Component \HttpFoundation \Request ;
7- use TheCodingMachine \GraphQLite \Schema ;
87use TheCodingMachine \TDBM \TDBMService ;
98
109class FunctionalTest extends TestCase
Original file line number Diff line number Diff line change 1010use Symfony \Component \DependencyInjection \ContainerBuilder ;
1111use Symfony \Component \HttpKernel \Kernel ;
1212use Symfony \Component \Routing \RouteCollectionBuilder ;
13- use TheCodingMachine \Graphqlite \Bundle \GraphqliteBundle ;
1413use TheCodingMachine \TDBM \Bundle \TdbmBundle ;
15- use TheCodingMachine \TDBM \Bundle \TdbmGraphqlBundle ;
1614
1715class TdbmTestingKernel extends Kernel
1816{
Original file line number Diff line number Diff line change 1+ <?php
2+
3+
4+ namespace TheCodingMachine \TDBM \Bundle \Utils ;
5+
6+ use Doctrine \Common \Cache \FlushableCache ;
7+ use Symfony \Component \HttpKernel \CacheClearer \CacheClearerInterface ;
8+
9+ class DoctrineCacheClearer implements CacheClearerInterface
10+ {
11+ /**
12+ * @var FlushableCache
13+ */
14+ private $ cache ;
15+
16+ public function __construct (FlushableCache $ cache )
17+ {
18+ $ this ->cache = $ cache ;
19+ }
20+
21+ /**
22+ * Clears any caches necessary.
23+ */
24+ public function clear ($ cacheDir )
25+ {
26+ $ this ->cache ->flushAll ();
27+ }
28+ }
Original file line number Diff line number Diff line change 2424 "php" : " >=7.1" ,
2525 "thecodingmachine/tdbm" : " ~5.1.0" ,
2626 "doctrine/doctrine-bundle" : " ^1.9 || ^2" ,
27- "doctrine/orm" : " ^1 || ^2"
27+ "doctrine/orm" : " ^1 || ^2" ,
28+ "symfony/http-kernel" : " ^4.1.9 || ^5"
2829 },
2930 "require-dev" : {
3031 "roave/security-advisories" : " dev-master" ,
3435 "phpstan/phpstan-shim" : " ^0.11.4"
3536 },
3637 "scripts" : {
37- "phpstan" : " phpstan analyse TdbmBundle.php DependencyInjection/ Resources/ -c phpstan.neon --level=7 --no-progress"
38+ "phpstan" : " phpstan analyse TdbmBundle.php DependencyInjection/ Resources/ Utils/ -c phpstan.neon --level=7 --no-progress"
3839 },
3940 "autoload" : {
4041 "psr-4" : {
You can’t perform that action at this time.
0 commit comments