You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
Today I was updated my symfony projects to 3.2 version which contains some changes in Yaml component: It's now can handle PHP constants in code and class Symfony\Component\Yaml\Yaml have new constant PARSE_CONSTANT.
When I ran tests with globally installed phpunit I got error Error: Undefined class constant 'PARSE_CONSTANT' in /tmp/test/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php:396
I add some debug to this line:
if (!defined(Yaml::class.'PARSE_CONSTANT')) {
$rc = new \ReflectionClass(Yaml::class);
var_dump($rc->getFileName());
}
And got string phar:///usr/local/Cellar/phpunit/5.6.2/libexec/phpunit-5.6.2.phar/symfony/yaml/Yaml.php what means that class Symfony\Component\Yaml\Yaml was loaded from phpunit's phar, and not from my vendor directory.
I've tried to reproduce this with clean symfony's 3.2 installation with default phpunit.xml and got same error.
Hi!
Today I was updated my symfony projects to 3.2 version which contains some changes in Yaml component: It's now can handle PHP constants in code and class
Symfony\Component\Yaml\Yaml
have new constantPARSE_CONSTANT
.When I ran tests with globally installed phpunit I got error
Error: Undefined class constant 'PARSE_CONSTANT'
in/tmp/test/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php:396
I add some debug to this line:
And got string
phar:///usr/local/Cellar/phpunit/5.6.2/libexec/phpunit-5.6.2.phar/symfony/yaml/Yaml.php
what means that classSymfony\Component\Yaml\Yaml
was loaded from phpunit's phar, and not from myvendor
directory.I've tried to reproduce this with clean symfony's 3.2 installation with default phpunit.xml and got same error.
I created repository with clean symfony 3.2 and this bug: https://github.com/sc0rp10/phpunit-symfony-issue
Clone it, install vendors and run globally installed
phpunit
(my version is 5.6.2).Is it PHPUnit issue or symfony?
The text was updated successfully, but these errors were encountered: