Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c15367e

Browse filesBrowse 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
Copy full SHA for c15367e

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎src/Symfony/Component/DependencyInjection/Container.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Container.php
+2-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.