Skip to content

[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

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from

Conversation

MatTheCat
Copy link
Contributor

@MatTheCat MatTheCat commented May 28, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? yes
Issues Fix #60200
License MIT

From #60560 (comment)

For now some commands still build a container from an XML dump; so this PR depends on #60597

@MatTheCat MatTheCat requested a review from dunglas as a code owner May 28, 2025 07:16
@carsonbot carsonbot added this to the 7.4 milestone May 28, 2025
@MatTheCat MatTheCat force-pushed the deprecate-xml-loaders branch 2 times, most recently from 2169ea4 to c5c98cb Compare May 28, 2025 09:06
@MatTheCat MatTheCat requested a review from yceruto as a code owner May 28, 2025 09:06
@MatTheCat MatTheCat force-pushed the deprecate-xml-loaders branch from c5c98cb to e7849d9 Compare May 28, 2025 10:04
@MatTheCat MatTheCat requested a review from chalasr as a code owner May 28, 2025 10:04
@MatTheCat MatTheCat force-pushed the deprecate-xml-loaders branch 2 times, most recently from f21defc to d725030 Compare May 28, 2025 10:27
@stof
Copy link
Member

stof commented May 28, 2025

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.

@carsonbot carsonbot changed the title Deprecate XML configuration format [DependencyInjection][Routing][Serializer][Validator] Deprecate XML configuration format May 28, 2025
Copy link
Member

@nicolas-grekas nicolas-grekas left a 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.');
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

@nicolas-grekas nicolas-grekas May 28, 2025

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

Copy link
Contributor Author

@MatTheCat MatTheCat May 28, 2025

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.

Copy link
Member

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.

Copy link
Member

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).

@MatTheCat MatTheCat force-pushed the deprecate-xml-loaders branch from 8a4b6ca to 5cbd8cf Compare June 11, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Deprecate and remove support for semantic XML configuration
6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy