Skip to content

Commit

Permalink
Merge 0fcb320 into fcd594f
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrukowski committed Nov 23, 2019
2 parents fcd594f + 0fcb320 commit 1df5783
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions 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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -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"
Expand Down
37 changes: 37 additions & 0 deletions tests/symfony.php
@@ -0,0 +1,37 @@
<?php

/*
* This file is part of the awesomite/var-dumper package.
*
* (c) Bartłomiej Krukowski <bartlomiej@krukowski.me>
*
* 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.');

0 comments on commit 1df5783

Please sign in to comment.