From 4ab3705a0cd6ace83192a4f850f24f53b2cdcff2 Mon Sep 17 00:00:00 2001 From: dellamowica Date: Fri, 28 Jul 2023 09:30:11 +0200 Subject: [PATCH 1/3] Fix wrong env variable name --- testing/bootstrap.rst | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/testing/bootstrap.rst b/testing/bootstrap.rst index c075552a9e3..55d567df6aa 100644 --- a/testing/bootstrap.rst +++ b/testing/bootstrap.rst @@ -25,14 +25,12 @@ You can modify this file to add custom logic: (new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); } - + if (isset($_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'])) { - + // executes the "php bin/console cache:clear" command - + passthru(sprintf( - + 'APP_ENV=%s php "%s/../bin/console" cache:clear --no-warmup', - + $_ENV['BOOTSTRAP_CLEAR_CACHE_ENV'], - + __DIR__ - + )); - + } + + // executes the "php bin/console cache:clear" command + + passthru(sprintf( + + 'APP_ENV=%s php "%s/../bin/console" cache:clear --no-warmup', + + $_ENV['APP_ENV'], + + __DIR__ + + )); .. note:: @@ -48,22 +46,3 @@ You can modify this file to add custom logic: > - -Now, you can update the ``phpunit.xml.dist`` file to declare the custom -environment variable introduced to ``tests/bootstrap.php``: - -.. code-block:: xml - - - - - - - - - - - - -Now, when running ``vendor/bin/phpunit``, the cache will be cleared -automatically by the bootstrap file before running all tests. From a09f0203ab4400c03c75bb15cfc4f255d19018b2 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 10 Aug 2023 17:54:57 +0200 Subject: [PATCH 2/3] Readd paragraph --- testing/bootstrap.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testing/bootstrap.rst b/testing/bootstrap.rst index 55d567df6aa..59fc289f0be 100644 --- a/testing/bootstrap.rst +++ b/testing/bootstrap.rst @@ -46,3 +46,6 @@ You can modify this file to add custom logic: > + +Now, when running ``vendor/bin/phpunit``, the cache will be cleared +automatically by the bootstrap file before running all tests. From 12cd1daae5a439593c0cafe1429b3b7e30ef12f7 Mon Sep 17 00:00:00 2001 From: MWJeff Date: Fri, 11 Aug 2023 10:45:19 +0200 Subject: [PATCH 3/3] Prefer placing services before query parameters --- doctrine.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doctrine.rst b/doctrine.rst index 866301f50aa..4e5b786b554 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -539,7 +539,7 @@ and injected by the dependency injection container:: class ProductController extends AbstractController { #[Route('/product/{id}', name: 'product_show')] - public function show(int $id, ProductRepository $productRepository): Response + public function show(ProductRepository $productRepository, int $id): Response { $product = $productRepository ->find($id);