Skip to content
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

Allow empty <extensions> element in XML configuration #5419

Merged

Conversation

nicolas-grekas
Copy link
Contributor

@nicolas-grekas nicolas-grekas commented Jun 21, 2023

In Symfony, we'd like to have new projects start with a phpunit.xml.dist file that contains an empty <extensions> tag, see symfony/recipes#1215 for a bit of context. TL;DR, this empty tag would be a very useful hooks for automatically enabling extensions when they're installed with flex.

Many tags already have this minOccurs="0" so I added it to the few tags that don't. Might be useful for similar reasons.

I hope this change can make it as a bug fix 🙏 (let me know if I should/can target 8.5 instead)

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #5419 (43e55c6) into 9.6 (26ad1b9) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                9.6    #5419   +/-   ##
=========================================
  Coverage     83.16%   83.16%           
  Complexity     4621     4621           
=========================================
  Files           271      271           
  Lines         13682    13682           
=========================================
  Hits          11379    11379           
  Misses         2303     2303           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sebastianbergmann
Copy link
Owner

Many tags already have this minOccurs="0" so I added it to the few tags that don't. Might be useful for similar reasons.

Please change your PR to only allow empty <extensions> elements.

I hope this change can make it as a bug fix pray (let me know if I should/can target 8.5 instead)

PHPUnit 8.5 is closed for changes that are not required to maintain compatibility with future PHP versions.

@nicolas-grekas
Copy link
Contributor Author

PR updated, got it for 8.5!

@sebastianbergmann sebastianbergmann merged commit 49c140c into sebastianbergmann:9.6 Jun 23, 2023
@sebastianbergmann sebastianbergmann changed the title Fix XSD to allow empty <extensions> tag Allow empty <extensions> element in XML configuration Jun 23, 2023
@nicolas-grekas nicolas-grekas deleted the xsd-minOccurs branch June 23, 2023 07:17
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.

2 participants