Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #17323 [DependencyInjection] Deprecate unsupported attributes…
…/elements for alias (Ener-Getick) This PR was squashed before being merged into the 3.1-dev branch (closes #17323). Discussion ---------- [DependencyInjection] Deprecate unsupported attributes/elements for alias | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #17256 | License | MIT Following #17133, this PR deprecates using unsupported keywords on alias definition. For example the following examples will trigger deprecations: ```xml <?xml version="1.0" encoding="utf-8"?> <container> <services> <service id="bar" alias="foo" class="Foo"> <tag name="foo.bar" /> </service> </services> </container> ``` ```yml services: bar: alias: foo parent: quz ``` Commits ------- 49eb65c [DependencyInjection] Deprecate unsupported attributes/elements for alias
- Loading branch information
Showing
6 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...fony/Component/DependencyInjection/Tests/Fixtures/xml/legacy_invalid_alias_definition.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<service id="foo" class="Foo" /> | ||
|
||
<service id="bar" alias="foo" class="Foo"> | ||
<tag name="foo.bar" /> | ||
<factory service="foobar" method="getBar" /> | ||
</service> | ||
</services> | ||
</container> |
5 changes: 5 additions & 0 deletions
5
...ony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy_invalid_alias_definition.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
foo: | ||
alias: bar | ||
factory: foo | ||
parent: quz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters