You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, if you are using PHP 8.0 or later, you can use the PHP attribute ``#[When]`` to tell that a class should only be registered as services in some environments :
487
+
488
+
.. configuration-block::
489
+
490
+
.. code-block:: php-attributes
491
+
492
+
use Symfony\Component\DependencyInjection\Attribute\When;
493
+
494
+
#[When(env: 'dev')]
495
+
class SomeClass
496
+
{
497
+
// ...
498
+
}
499
+
500
+
// you can apply more than one attribute to the same class:
0 commit comments