Skip to content

Commit c15367e

Browse files
minor #49377 [DependencyInjection] Add doc for RUNTIME_EXCEPTION_ON_INVALID_REFERENCE behavior (alamirault)
This PR was merged into the 5.4 branch. Discussion ---------- [DependencyInjection] Add doc for `RUNTIME_EXCEPTION_ON_INVALID_REFERENCE` behavior | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> While working on documentation of container behaviors symfony/symfony-docs#17903, I saw `RUNTIME_EXCEPTION_ON_INVALID_REFERENCE` was not documented Commits ------- 308e59e [DependencyInjection] Add doc for RUNTIME_EXCEPTION_ON_INVALID_REFERENCE behavior
2 parents a9c2bce + 308e59e commit c15367e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ class_exists(ArgumentServiceLocator::class);
3636
* The container can have four possible behaviors when a service
3737
* does not exist (or is not initialized for the last case):
3838
*
39-
* * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception (the default)
39+
* * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception at compilation time (the default)
4040
* * NULL_ON_INVALID_REFERENCE: Returns null
4141
* * IGNORE_ON_INVALID_REFERENCE: Ignores the wrapping command asking for the reference
4242
* (for instance, ignore a setter if the service does not exist)
4343
* * IGNORE_ON_UNINITIALIZED_REFERENCE: Ignores/returns null for uninitialized services or invalid references
44+
* * RUNTIME_EXCEPTION_ON_INVALID_REFERENCE: Throws an exception at runtime
4445
*
4546
* @author Fabien Potencier <fabien@symfony.com>
4647
* @author Johannes M. Schmitt <schmittjoh@gmail.com>

0 commit comments

Comments
 (0)