-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Migrate configuration from 10.5 to 11.4 #6023
Comments
FYI: related to my previous report #6019, when there is a change in configuration (even if it's not expected, like |
While I agree that losing indentation is an inconvenience, it is annoying enough to invest time/effort in finding a solution to keep it. |
I've noticed that documentation still identify the So, after re-introduced the attribute missing in my
I think it's an issue, because |
Oops, I've in mind schema 10.5 and I present schema 10.4, but both identify correctly the missing attribute. @see https://github.com/sebastianbergmann/phpunit/blob/main/schema/10.5.xsd#L65 |
Agree with you that it's time consuming. But I'll give you the solution, because I wanted to learn more about PHPUnit migration command. With DOMDocument, when you set Preserve indentation <?php
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'phpunit.xml.dist';
$configurationDocument = new \DOMDocument();
// either
//$configurationDocument->load($filename);
// or
$configurationDocument->loadXML(file_get_contents($filename));
$configurationDocument->preserveWhiteSpace = false;
$configurationDocument->formatOutput = true;
var_export($configurationDocument->saveXML()); DO NOT preserve indentation <?php
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'phpunit.xml.dist';
$configurationDocument = new \DOMDocument();
$configurationDocument->preserveWhiteSpace = false;
$configurationDocument->formatOutput = true;
// either
//$configurationDocument->load($filename);
// or
$configurationDocument->loadXML(file_get_contents($filename));
var_export($configurationDocument->saveXML()); In summary to fix PHPUnit, you have just to remove the line https://github.com/sebastianbergmann/phpunit/blob/11.4/src/Util/Xml/Loader.php#L67 because the good lines in right place are already defined at https://github.com/sebastianbergmann/phpunit/blob/11.4/src/TextUI/Configuration/Xml/Migration/Migrator.php#L47-L48 |
Hello,
Working on my project BOX Manifest and wanted to migrate from PHPUnit 10 to 11, I've noticed that include uncovered files option was not included during migration process.
After installing PHPUnit 11.4.3, I've checks for regressions with following command :
And got this output :
So I've run migration process with following command :
Anf got result :
But when I compare versions, I was surprised on
coverage
section that missed previous attributeincludeUncoveredFiles
Checks with command :
That prints :
BTW, it will be cool if we can same identation after migration. Even if my PHP editor is able to easily re-indent code !
The text was updated successfully, but these errors were encountered: