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

Configuration validation fails when using brackets in glob pattern #4751

Closed
JaZo opened this issue Aug 4, 2021 · 0 comments
Closed

Configuration validation fails when using brackets in glob pattern #4751

JaZo opened this issue Aug 4, 2021 · 0 comments
Assignees
Labels
feature/test-runner CLI test runner type/bug Something is broken

Comments

@JaZo
Copy link

JaZo commented Aug 4, 2021

Q A
PHPUnit version 9.5.8
PHP version 7.4.3
Installation Method Composer

Composer info

bacon/bacon-qr-code                     2.0.4      
barryvdh/laravel-debugbar               v3.6.2     
barryvdh/laravel-ide-helper             v2.10.0    
barryvdh/reflection-docblock            v2.0.6
bepsvpt/secure-headers                  7.1.0      
brick/math                              0.9.2      
bugsnag/bugsnag-laravel                 v2.22.1    
bugsnag/bugsnag-psr-logger              v1.4.3     
bugsnag/bugsnag                         v3.26.0    
clue/stream-filter                      v1.5.0     
composer/ca-bundle                      1.2.10     
composer/composer                       2.1.5      
composer/metadata-minifier              1.0.0      
composer/package-versions-deprecated    1.11.99.2  
composer/semver                         3.2.5      
composer/spdx-licenses                  1.5.5      
composer/xdebug-handler                 2.0.2      
danielstjules/stringy                   3.1.0      
dasprid/enum                            1.0.3      
dflydev/dot-access-data                 v3.0.0     
doctrine/annotations                    1.13.1     
doctrine/cache                          2.1.1      
doctrine/dbal                           3.1.1      
doctrine/deprecations                   v0.5.3     
doctrine/event-manager                  1.1.1      
doctrine/inflector                      2.0.3      
doctrine/instantiator                   1.4.0      
doctrine/lexer                          1.2.1      
dragonmantank/cron-expression           v3.1.0     
egulias/email-validator                 2.1.25     
facade/flare-client-php                 1.8.1      
facade/ignition                         2.11.2     
facade/ignition-contracts               1.0.2      
fakerphp/faker                          v1.15.0    
fideloper/proxy                         4.4.1      
filp/whoops                             2.14.0     
friendsofphp/php-cs-fixer               v3.0.1     
graham-campbell/result-type             v1.0.1     
guzzlehttp/guzzle                       7.3.0      
guzzlehttp/promises                     1.4.1      
guzzlehttp/psr7                         2.0.0      
hamcrest/hamcrest-php                   v2.0.1     
hannesvdvreken/guzzle-debugbar          3.0.1      
hannesvdvreken/guzzle-profiler          2.0.0      
justinrainbow/json-schema               5.2.11     
kevinrob/guzzle-cache-middleware        v3.4.0     
laracasts/flash                         3.2        
laracasts/presenter                     0.2.4      
laravelcollective/html                  v6.2.1     
laravel/framework                       v8.53.0    
laravel/tinker                          v2.6.1     
league/commonmark                       2.0.1      
league/config                           v1.1.0     
league/flysystem                        1.1.4      
league/fractal                          0.19.2     
league/mime-type-detection              1.7.0      
league/oauth2-client                    2.6.0      
limedeck/phpunit-detailed-printer       6.0.0      
maximebf/debugbar                       v1.17.1    
mockery/mockery                         1.4.3      
monolog/monolog                         2.3.2      
myclabs/deep-copy                       1.10.2     
myclabs/php-enum                        1.8.3      
nesbot/carbon                           2.51.1     
nette/schema                            v1.2.1     
nette/utils                             v3.2.2     
nikic/php-parser                        v4.12.0    
nunomaduro/collision                    v5.6.0     
opis/closure                            3.6.2      
paragonie/random_compat                 v9.99.100  
phar-io/manifest                        2.0.3      
phar-io/version                         3.1.0      
php-cs-fixer/diff                       v2.0.2     
phpdocumentor/reflection-common         2.2.0      
phpdocumentor/reflection-docblock       5.2.2      
phpdocumentor/type-resolver             1.4.0      
php-http/client-common                  2.4.0      
php-http/discovery                      1.14.0     
php-http/httplug                        2.2.0      
php-http/message                        1.11.2     
php-http/message-factory                v1.0.2     
php-http/mock-client                    1.4.1      
php-http/promise                        1.1.0      
phpoption/phpoption                     1.7.5      
phpspec/prophecy                        1.13.0     
phpunit/php-code-coverage               9.2.6      
phpunit/php-file-iterator               3.0.5      
phpunit/php-invoker                     3.1.1      
phpunit/php-text-template               2.0.4      
phpunit/php-timer                       5.0.3      
phpunit/phpunit                         9.5.8      
php-webdriver/webdriver                 1.11.1     
psr/cache                               1.0.1      
psr/container                           1.1.1      
psr/event-dispatcher                    1.0.0      
psr/http-client                         1.0.1      
psr/http-factory                        1.0.1      
psr/http-message                        1.0.1      
psr/log                                 1.1.4      
psr/simple-cache                        1.0.1      
psy/psysh                               v0.10.8    
ralouphie/getallheaders                 3.0.3      
ramsey/collection                       1.1.4      
ramsey/uuid                             4.1.1      
react/promise                           v2.8.0     
sebastian/cli-parser                    1.0.1      
sebastian/code-unit                     1.0.8      
sebastian/code-unit-reverse-lookup      2.0.3      
sebastian/comparator                    4.0.6      
sebastian/complexity                    2.0.2      
sebastian/diff                          4.0.4      
sebastian/environment                   5.1.3      
sebastian/exporter                      4.0.3      
sebastian/global-state                  5.0.3      
sebastian/lines-of-code                 1.0.3      
sebastian/object-enumerator             4.0.4      
sebastian/object-reflector              2.0.4      
sebastian/recursion-context             4.0.4      
sebastian/resource-operations           3.0.3      
sebastian/type                          2.3.4      
sebastian/version                       3.0.2      
seld/jsonlint                           1.8.3      
seld/phar-utils                         1.1.1      
spatie/fractalistic                     2.9.1      
spatie/laravel-fractal                  5.8.1      
swiftmailer/swiftmailer                 v6.2.7     
swisnl/guzzle-fixture-handler           2.3.0      
swisnl/illuminate-collections           8.0.0      
swisnl/json-api-client                  2.0.0-beta 
swisnl/json-api-client-laravel          1.0.0-beta 
swisnl/laravel-javascript-data-response 1.4.0      
swisnl/php-cs-fixer-config              1.3.0      
swisnl/php-http-fixture-client          2.3.0      
symfony/console                         v5.3.6     
symfony/css-selector                    v5.3.4     
symfony/debug                           v4.4.27    
symfony/deprecation-contracts           v2.4.0     
symfony/dom-crawler                     v5.3.4     
symfony/error-handler                   v5.3.4     
symfony/event-dispatcher-contracts      v2.4.0     
symfony/event-dispatcher                v5.3.4     
symfony/filesystem                      v5.3.4     
symfony/finder                          v5.3.4     
symfony/http-client-contracts           v2.4.0     
symfony/http-foundation                 v5.3.6     
symfony/http-kernel                     v5.3.6     
symfony/mime                            v5.3.4     
symfony/options-resolver                v5.3.4     
symfony/polyfill-ctype                  v1.23.0    
symfony/polyfill-iconv                  v1.23.0    
symfony/polyfill-intl-grapheme          v1.23.1    
symfony/polyfill-intl-idn               v1.23.0    
symfony/polyfill-intl-normalizer        v1.23.0    
symfony/polyfill-mbstring               v1.23.1    
symfony/polyfill-php72                  v1.23.0    
symfony/polyfill-php73                  v1.23.0    
symfony/polyfill-php80                  v1.23.1    
symfony/process                         v5.3.4     
symfony/routing                         v5.3.4     
symfony/service-contracts               v2.4.0     
symfony/stopwatch                       v5.3.4     
symfony/string                          v5.3.3     
symfony/translation-contracts           v2.4.0     
symfony/translation                     v5.3.4     
symfony/var-dumper                      v5.3.6     
theseer/tokenizer                       1.2.1      
tijsverkoyen/css-to-inline-styles       2.2.3      
vlucas/phpdotenv                        v5.3.0     
voku/portable-ascii                     1.5.6      
webmozart/assert                        1.10.0     

Summary

Configuration validation fails when using brackets (character group) in glob pattern.

Current behavior

Warning - The configuration file did not pass validation!
The following problems have been detected:

Line 7:
- Element 'directory': './tests/[a-h]*' is not a valid value of the atomic type 'xs:anyURI'.

Line 11:
- Element 'exclude': './tests/[a-h]*' is not a valid value of the atomic type 'xs:anyURI'.

Test results may not be as expected.

Despite the warning, it does work as expected.

How to reproduce

$ tree
.
├── phpunit.xml
└── tests
    ├── one
    │   └── OneTest.php
    └── two
        └── TwoTest.php
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
         verbose="true">
    <testsuites>
      <testsuite name="A">
        <directory>./tests/[a-h]*</directory>
      </testsuite>
      <testsuite name="B">
        <directory>./tests</directory>
        <exclude>./tests/[a-h]*</exclude>
      </testsuite>
  </testsuites>
</phpunit>

Expected behavior

No configuration validation warning.

@JaZo JaZo added the type/bug Something is broken label Aug 4, 2021
@sebastianbergmann sebastianbergmann added the feature/test-runner CLI test runner label Aug 4, 2021
@sebastianbergmann sebastianbergmann self-assigned this Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-runner CLI test runner type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants