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

Migrate configuration file (with schema namespace location) #6019

Open
llaville opened this issue Oct 31, 2024 · 0 comments
Open

Migrate configuration file (with schema namespace location) #6019

llaville opened this issue Oct 31, 2024 · 0 comments
Labels
feature/configuration/xml type/enhancement A new idea that should be implemented

Comments

@llaville
Copy link

Hello,

Working on project PHPLint and wanted to migrate from PHPUnit 10 to 11, I've noticed that schema diff is not detected.

With PHPunit 11.4.3, when running following command :

vendor/bin/phpunit --migrate-configuration

With this config file (see base code on branch 9.5 => https://github.com/overtrue/phplint/tree/9.5)

<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
         bootstrap="autoload.php"
         executionOrder="depends,defects"
         beStrictAboutOutputDuringTests="true"
         failOnRisky="true"
         failOnWarning="true"
         displayDetailsOnTestsThatTriggerDeprecations="true"
         colors="true"
         cacheDirectory=".phpunit.cache"
         requireCoverageMetadata="true"
         beStrictAboutCoverageMetadata="true"
>
    <testsuites>
        <testsuite name="cache">
            <directory>tests/Cache</directory>
        </testsuite>
        <testsuite name="configuration">
            <directory>tests/Configuration</directory>
        </testsuite>
        <testsuite name="e2e">
            <directory>tests/EndToEnd</directory>
        </testsuite>
        <testsuite name="finder">
            <directory>tests/Finder</directory>
        </testsuite>
        <testsuite name="output">
            <directory>tests/Output</directory>
        </testsuite>
    </testsuites>
    <coverage/>
    <source>
        <include>
            <directory suffix=".php">src</directory>
        </include>
    </source>
</phpunit>

I got this result :

PHPUnit 11.4.3 by Sebastian Bergmann and contributors.

Migration of /shared/backups/github/phplint/phpunit.xml failed:
The file does not need to be migrated

I expect to have a successful migration with two files (a backup) and current file with such diff results (diff phpunit.xml.bak phpunit.xml)

3c3
<          xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
---
>          xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.4/phpunit.xsd"

As schema exists : see list at https://github.com/sebastianbergmann/phpunit/tree/main/schema

WDYT ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/configuration/xml type/enhancement A new idea that should be implemented
Projects
None yet
Development

No branches or pull requests

2 participants