-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
DependencyInjectionFeatureGood first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)Help wantedIssues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
Description
As run into an issue #31745 I come with an idea of adding a new type for arguments called abstract
. The idea is to have a better error message when a compilerpass need to replace an argument and it did not happened.
Example
For example the translator.default
service:
symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml
Lines 10 to 13 in 9934252
<service id="translator.default" class="Symfony\Bundle\FrameworkBundle\Translation\Translator"> | |
<argument /> <!-- translation loaders locator --> | |
<argument type="service" id="translator.formatter" /> | |
<argument>%kernel.default_locale%</argument> |
has a argument which need to be replaced. So service definition would look like the following:
<service id="translator.default" class="Symfony\Bundle\FrameworkBundle\Translation\Translator">
<argument type="abstract">Should be defined by TranslatorPass</argument>
<!-- ... -->
So when there exist an abstract argument it should error with e.g. Argument "0" is not replaced for service "translator.default" yet: Should be defined by TranslatorPass
.
fancyweb, Matts, ovrflo, PabloKowalczyk, apfelbox and 8 more
Metadata
Metadata
Assignees
Labels
DependencyInjectionFeatureGood first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)Help wantedIssues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)