File tree 2 files changed +6
-28
lines changed
2 files changed +6
-28
lines changed Original file line number Diff line number Diff line change @@ -2481,10 +2481,6 @@ middleware and *only* include your own:
2481
2481
Middleware for Doctrine
2482
2482
~~~~~~~~~~~~~~~~~~~~~~~
2483
2483
2484
- .. versionadded :: 1.11
2485
-
2486
- The following Doctrine middleware was introduced in DoctrineBundle 1.11.
2487
-
2488
2484
If you use Doctrine in your app, a number of optional middleware exist that you
2489
2485
may want to use:
2490
2486
Original file line number Diff line number Diff line change @@ -25,14 +25,12 @@ You can modify this file to add custom logic:
25
25
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
26
26
}
27
27
28
- + if (isset($_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'])) {
29
- + // executes the "php bin/console cache:clear" command
30
- + passthru(sprintf(
31
- + 'APP_ENV=%s php "%s/../bin/console" cache:clear --no-warmup',
32
- + $_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'],
33
- + __DIR__
34
- + ));
35
- + }
28
+ + // executes the "php bin/console cache:clear" command
29
+ + passthru(sprintf(
30
+ + 'APP_ENV=%s php "%s/../bin/console" cache:clear --no-warmup',
31
+ + $_ENV['APP_ENV'],
32
+ + __DIR__
33
+ + ));
36
34
37
35
.. note ::
38
36
@@ -49,21 +47,5 @@ You can modify this file to add custom logic:
49
47
<!-- ... -->
50
48
</phpunit >
51
49
52
- Now, you can update the ``phpunit.xml.dist `` file to declare the custom
53
- environment variable introduced to ``tests/bootstrap.php ``:
54
-
55
- .. code-block :: xml
56
-
57
- <!-- phpunit.xml.dist -->
58
- <?xml version =" 1.0" encoding =" UTF-8" ?>
59
- <phpunit >
60
- <php >
61
- <env name =" BOOTSTRAP_CLEAR_CACHE_ENV" value =" test" />
62
- <!-- ... -->
63
- </php >
64
-
65
- <!-- ... -->
66
- </phpunit >
67
-
68
50
Now, when running ``vendor/bin/phpunit ``, the cache will be cleared
69
51
automatically by the bootstrap file before running all tests.
You can’t perform that action at this time.
0 commit comments