diff --git a/.travis.yml b/.travis.yml index d9e935d..307f66c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -128,6 +128,14 @@ script: chmod +x infection.phar; ./infection.phar fi + - | + if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then + composer update --no-dev + composer remove --dev phpunit/phpunit awesomite/phpunit-4.8-fixer sebastian/comparator + composer require symfony/var-dumper:^5.0 + composer show + fi + - php tests/symfony.php - php examples/run-all.php after_script: diff --git a/CHANGELOG.md b/CHANGELOG.md index 39b6558..33d1c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [1.5.0] - 2019-11-23 + +Symfony 5.0 has become supported. + ## [1.4.0] - 2019-11-21 Output format of printed `Closure` has been changed. New format: @@ -104,6 +108,7 @@ $reflectionProp->getValue($obj); This version contains the same source code as [0.12.0]. +[1.5.0]: https://github.com/awesomite/var-dumper/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/awesomite/var-dumper/compare/v1.3.0...v1.4.0 [1.3.0]: https://github.com/awesomite/var-dumper/compare/v1.2.1...v1.3.0 [1.2.1]: https://github.com/awesomite/var-dumper/compare/v1.2.0...v1.2.1 diff --git a/composer.json b/composer.json index 6aa8b85..00430de 100644 --- a/composer.json +++ b/composer.json @@ -28,13 +28,13 @@ }, "require-dev": { "phpunit/phpunit": "^4.8.36", - "symfony/console": "^2.7 || ^3.0 || ^4.0", + "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0", "sebastian/comparator": ">=1.2.3", "awesomite/phpunit-4.8-fixer": "^1.0", - "symfony/var-dumper": "^2.7 || ^3.0 || ^4.0" + "symfony/var-dumper": "^2.7 || ^3.0 || ^4.0 || ^5.0" }, "conflict": { - "symfony/var-dumper": "<2.7.16 || >=2.8.0 <2.8.9 || >=3.0.0 <3.0.9 || >=3.1.0 <3.1.3 || >=5.0" + "symfony/var-dumper": "<2.7.16 || >=2.8.0 <2.8.9 || >=3.0.0 <3.0.9 || >=3.1.0 <3.1.3" }, "suggest": { "symfony/var-dumper": "Required for Awesomite\\VarDumper\\SymfonyVarDumper" diff --git a/tests/symfony.php b/tests/symfony.php new file mode 100644 index 0000000..2402276 --- /dev/null +++ b/tests/symfony.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Awesomite\VarDumper; + +require \implode(\DIRECTORY_SEPARATOR, array(__DIR__, '..', 'vendor', 'autoload.php')); + +\set_error_handler( + function ($no, $message, $file, $line) { + throw new \ErrorException($message, 0, $no, $file, $no); + }, + \E_ALL | \E_STRICT +); + +\set_exception_handler( + function ($exception) { + /** @var \Exception $exception */ + echo '[', \get_class($exception), '] ', $exception->getMessage(), "\n"; + echo $exception->getTraceAsString(), "\n"; + exit(1); + } +); + +$dumper = new SymfonyVarDumper(); +$dumped = $dumper->dumpAsString('Hello world!'); +if (!\is_string($dumped) || '' === $dumped) { + throw new \UnexpectedValueException('Method dumpAsString must return not empty string.'); +} +$dumper->dump('Tests passed.');