File tree 7 files changed +49
-6
lines changed
Resources/config/container
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 15
15
<argument key =" $codeGeneratorListeners" type =" collection" >
16
16
<argument type =" service" id =" TheCodingMachine\TDBM\Bundle\Utils\SymfonyCodeGeneratorListener" />
17
17
</argument >
18
+ <argument key =" $cache" type =" service" id =" tdbm.cache" ></argument >
18
19
</service >
19
20
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
+
20
31
<service id =" TheCodingMachine\TDBM\ConfigurationInterface" alias =" TheCodingMachine\TDBM\Configuration" >
21
32
</service >
22
33
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ services:
13
13
14
14
# makes classes in src/ available to be used as services
15
15
# 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\ :
17
17
resource : ' ../*'
18
18
exclude : ' ../{Entities}'
19
19
Original file line number Diff line number Diff line change 4
4
5
5
use PHPUnit \Framework \TestCase ;
6
6
use Symfony \Component \HttpFoundation \Request ;
7
- use TheCodingMachine \GraphQLite \Schema ;
8
7
use TheCodingMachine \TDBM \TDBMService ;
9
8
10
9
class FunctionalTest extends TestCase
Original file line number Diff line number Diff line change 10
10
use Symfony \Component \DependencyInjection \ContainerBuilder ;
11
11
use Symfony \Component \HttpKernel \Kernel ;
12
12
use Symfony \Component \Routing \RouteCollectionBuilder ;
13
- use TheCodingMachine \Graphqlite \Bundle \GraphqliteBundle ;
14
13
use TheCodingMachine \TDBM \Bundle \TdbmBundle ;
15
- use TheCodingMachine \TDBM \Bundle \TdbmGraphqlBundle ;
16
14
17
15
class TdbmTestingKernel extends Kernel
18
16
{
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 24
24
"php" : " >=7.1" ,
25
25
"thecodingmachine/tdbm" : " ~5.1.0" ,
26
26
"doctrine/doctrine-bundle" : " ^1.9 || ^2" ,
27
- "doctrine/orm" : " ^1 || ^2"
27
+ "doctrine/orm" : " ^1 || ^2" ,
28
+ "symfony/http-kernel" : " ^4.1.9 || ^5"
28
29
},
29
30
"require-dev" : {
30
31
"roave/security-advisories" : " dev-master" ,
34
35
"phpstan/phpstan-shim" : " ^0.11.4"
35
36
},
36
37
"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"
38
39
},
39
40
"autoload" : {
40
41
"psr-4" : {
You can’t perform that action at this time.
0 commit comments