-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection][Routing][Serializer][Validator] Deprecate XML configuration format #60568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 7.4
Are you sure you want to change the base?
Conversation
2169ea4
to
c5c98cb
Compare
c5c98cb
to
e7849d9
Compare
f21defc
to
d725030
Compare
Let's wait on the discussion on the issue to know what should actually be deprecated. This PR deprecates a lot more than what was mentioned in the issue it fixes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Some test cases need some love.
public function testInlineServicesAreNotCandidates() | ||
{ | ||
$this->expectUserDeprecationMessage('Since symfony/dependency-injection 7.4: XML configuration format is deprecated, use YAML or PHP instead.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we rewrite this to use another format instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test looks like it’s XML specific: #24491
@@ -32,6 +33,8 @@ | |||
|
|||
class XmlDumperTest extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side question: do we want to keep the xml dumper?
it's used by some external tools AFAIK, so likely yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have commands loading such XML dumps, like debug:container
. Not sure what we should do about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #60597 which might set us free from this concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the XML dump of the container is used by every static analysis Symfony Plugin I know, including PHPStan, PhpStorm's Symfony plugin and Psalm. I don't think we can get rid of it (especially considering PhpStorm's plugin isn't written in PHP so probably can't parse the PHP serialized data nicely).
src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
Outdated
Show resolved
Hide resolved
ded957c
to
55ac82e
Compare
703118b
to
8a4b6ca
Compare
8a4b6ca
to
5cbd8cf
Compare
From #60560 (comment)
For now some commands still build a container from an XML dump; so this PR depends on #60597