-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[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).
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 #61280 to remove the dependency on ext-xml for the XmlDumper
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.
Dumping console data in XML must be kept.
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.
XmlDescriptor are not affected, so we're good.
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
278edc5
to
e01cb8e
Compare
6dbd3dc
to
5b94312
Compare
fdd7f2f
to
e913275
Compare
e913275
to
90a8159
Compare
90a8159
to
dd59d56
Compare
This PR was merged into the 7.3 branch. Discussion ---------- [FrameworkBundle] Fix cache warmers tests | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT While updating tests for #60568 I saw `SerializerCacheWarmerTest` and `ValidatorCacheWarmerTest`’s `testWarmUpWithoutBuilDir` fail. Since there will be no warm up without a build directory it was weird a cache item could get hit in that case. Turns out that was because the `PhpArrayAdapter`’s `$valuesCache` would retain them from previous tests. This PR adds a `getArrayPool` method to the test cases which allows them to clear it on tearDown, so that tests don’t impact each other. Alternatively they could clear their own adapter or pass it different files, but this seemed the safest approach to me. Commits ------- fb9e64e [FrameworkBundle] Fix cache warmers tests
6579efe
to
c47d5fd
Compare
c47d5fd
to
072f096
Compare
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.
Great work! Let's get rid of XML and ext-xml.
I am not really sure we need to go thus far. At least for the Validator component I can tell that there has been nearly zero maintenance work during the last years for the |
From #60560 (comment)
CI failure unrelated (see #60805 (comment))