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

Symfony 5 compat #92

Merged
merged 1 commit into from Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 15 additions & 8 deletions .travis.yml
Expand Up @@ -11,8 +11,8 @@ php:
- 7.3

env:
- SYMFONY_VERSION="3.4.*"
- SYMFONY_VERSION="4.3.*"
- SYMFONY_REQUIRE="3.4.*"
- SYMFONY_REQUIRE="4.3.*"
- PHPUNIT_VERSION="8.*"

matrix:
Expand All @@ -23,21 +23,28 @@ matrix:
- php: 7.3
env:
- PHPUNIT_VERSION="7.*"
- SYMFONY_VERSION="3.4.*"
- SYMFONY_REQUIRE="3.4.*"
- php: 7.3
env:
- STABILITY=dev
- SYMFONY_REQUIRE="5.0.*"

before_install:
- phpenv config-rm xdebug.ini || echo "xDebug not disabled"
- composer global require --no-progress --no-scripts --no-plugins symfony/flex

install:
- rm -rf composer.lock vendor/*
- phpenv config-rm xdebug.ini || echo "xDebug not disabled"
- export COMPOSER_MEMORY_LIMIT=-1 && composer require symfony/symfony:${SYMFONY_VERSION:-"4.3.*"} phpunit/phpunit:${PHPUNIT_VERSION:-"8.*"}
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
- composer require phpunit/phpunit:${PHPUNIT_VERSION:-"8.*"} --update-with-all-dependencies

script:
- cp tests/Functional/parameters.yml.dist tests/Functional/parameters.yml
- rm -rf tests/Functional/cache
- make phpstan php_cs_fixer_check
- |
if [[ ${PHPUNIT_VERSION} != "8.*" && ${TEST_COVERAGE} ]]; then phpdbg -qrr vendor/bin/phpunit -c tests/ --coverage-clover ./build/logs/clover.xml;
elif [[ ${PHPUNIT_VERSION} == "8.*" && ${TEST_COVERAGE} ]]; then phpdbg -qrr vendor/bin/phpunit -c tests/phpunit8.xml --coverage-clover ./build/logs/clover.xml;
elif [[ ${PHPUNIT_VERSION} == "8.*" ]]; then vendor/bin/phpunit -c tests/phpunit8.xml tests/;
if [[ ${TEST_COVERAGE} ]]; then phpdbg -qrr vendor/bin/phpunit -c tests/ --coverage-clover ./build/logs/clover.xml;
elif [[ ${PHPUNIT_VERSION} == "7.*" ]]; then vendor/bin/phpunit -c tests/phpunit7.xml tests/;
else vendor/bin/phpunit -c tests/ tests/;
fi

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [6.2.0]
### Changed
- drop support for unmaintained Symfony versions
- allow Symfony 5
- allow DoctrineBundle 2

## [6.1.0]
### Changed
- add typehints
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Expand Up @@ -12,14 +12,14 @@
],
"require": {
"php": "^7.2",
"symfony/framework-bundle": "~3.0|~4.0",
"doctrine/dbal": "~2.9",
"doctrine/doctrine-bundle": "~1.11"
"symfony/framework-bundle": "^3.4 || ^4.3 || ^5.0",
"doctrine/dbal": "^2.9",
"doctrine/doctrine-bundle": "^1.11 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "~7.0|~8.0",
"symfony/yaml": "~3.0|~4.0",
"symfony/phpunit-bridge": "~4.3"
"phpunit/phpunit": "^7.0 || ^8.0",
"symfony/yaml": "^3.4 || ^4.3 || ^5.0",
"symfony/phpunit-bridge": "^4.3 || ^5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -31,7 +31,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "6.1.x-dev"
"dev-master": "7.0.x-dev"
}
}
}
4 changes: 2 additions & 2 deletions makefile
Expand Up @@ -8,8 +8,8 @@ tests/Functional/parameters.yml:
test: tests/Functional/parameters.yml
vendor/bin/phpunit -c tests/ tests/

test_phpunit_8: tests/Functional/parameters.yml
vendor/bin/phpunit -c tests/phpunit8.xml tests/
test_phpunit_7: tests/Functional/parameters.yml
vendor/bin/phpunit -c tests/phpunit7.xml tests/

phpstan: phpstan.phar
./phpstan.phar analyse -c phpstan.neon -a vendor/autoload.php -l 7 src
Expand Down
8 changes: 6 additions & 2 deletions tests/phpunit.xml
@@ -1,6 +1,6 @@
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.2/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
Expand All @@ -15,6 +15,10 @@
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0" />
</php>

<extensions>
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension" />
</extensions>

<testsuites>
<testsuite name="DAMADoctrineTestBundle test suite">
<directory>../tests</directory>
Expand All @@ -29,6 +33,6 @@

<listeners>
<listener class="\Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener" />
</listeners>

</phpunit>
8 changes: 2 additions & 6 deletions tests/phpunit8.xml → tests/phpunit7.xml
@@ -1,6 +1,6 @@
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.2/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
Expand All @@ -15,10 +15,6 @@
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0" />
</php>

<extensions>
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension" />
</extensions>

<testsuites>
<testsuite name="DAMADoctrineTestBundle test suite">
<directory>../tests</directory>
Expand All @@ -33,6 +29,6 @@

<listeners>
<listener class="\Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener" />
</listeners>

</phpunit>