Skip to content

Commit

Permalink
Symfony 5 / Doctrine Bundle 2 compat (#544)
Browse files Browse the repository at this point in the history
* Symfony 5 / Doctrine Bundle 2 compat

Also drop support for Sf 4.0/4.1 as they are unmaintained
  • Loading branch information
B-Galati authored Nov 1, 2019
1 parent 7f4249e commit 6a7751b
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 19 deletions.
22 changes: 14 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ matrix:
fast_finish: true
include:
- php: 7.1
- php: 7.1
env: COMPOSER_FLAGS="--prefer-lowest"
env: SYMFONY_VERSION="3.4.*" COMPOSER_FLAGS="--prefer-lowest"
- php: 7.2
- php: 7.3
env: SYMFONY_VERSION="4.3.*""
env: SYMFONY_VERSION="4.3.*"
- php: 7.3
env: SYMFONY_VERSION="4.4.*" STABILITY="dev"
- php: 7.3
env: SYMFONY_VERSION="4.4.*" STABILITY="dev" SYMFONY_DEPRECATIONS_HELPER="max[self]=3"
env: SYMFONY_VERSION="5.0.*" STABILITY="dev"
- php: 7.4snapshot
env: SYMFONY_VERSION="5.0.*" STABILITY="dev"

allow_failures:
- php: 7.4snapshot
env: SYMFONY_VERSION="5.0.*" STABILITY="dev"

dist: xenial
sudo: false
Expand All @@ -33,14 +40,13 @@ before_install:
- php -i | grep -i --color=never "Redis Version"
- if [[ ${TRAVIS_PHP_VERSION} != hhvm ]]; then phpenv rehash; fi;
- composer self-update
- composer global require --no-progress --no-scripts --no-plugins symfony/flex
- if ! [ -z "${STABILITY}" ]; then composer config minimum-stability ${STABILITY}; fi;
- if [ "${SYMFONY_VERSION}" != "" ]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi;
- if [ "${SYMFONY_VERSION}" != "" ]; then composer config extra.symfony.require ${SYMFONY_VERSION}; fi;
- for PORT in {7000..7008}; do sudo redis-server --port ${PORT} --cluster-enabled yes --cluster-config-file ${PORT}.conf --daemonize yes; echo 127.0.0.1:${PORT}; done
- echo yes | redis-cli --cluster create $(seq -f 127.0.0.1:%g 7000 7008) --cluster-replicas 2

install:
- composer global require --no-progress --no-scripts --no-plugins symfony/flex
- composer update --no-interaction --no-progress ${COMPOSER_FLAGS}
- composer update --prefer-dist --no-interaction --no-progress ${COMPOSER_FLAGS}

script:
- composer validate --strict --no-check-lock
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next release

- Deprecate support for redis profiler storage
- Drop support for Symfony 4.0 and 4.1

## [3.1.1](https://github.com/snc/SncRedisBundle/tree/3.1.1) (2019-10-09)
[Full Changelog](https://github.com/snc/SncRedisBundle/compare/3.1.0...3.1.1)
Expand Down
4 changes: 4 additions & 0 deletions Tests/DependencyInjection/SncRedisExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ public function testMinimalConfigLoad()
}

/**
* @group legacy
*
* Test loading of full config
*/
public function testFullConfigLoad()
Expand Down Expand Up @@ -238,6 +240,8 @@ public function testMonologFormatterOption()
}

/**
* @group legacy
*
* Test valid parsing of the client profile option
*/
public function testClientProfileOption()
Expand Down
1 change: 1 addition & 0 deletions Tests/Functional/App/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ framework:

twig:
strict_variables: true
exception_controller: null

web_profiler:
toolbar: false
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function setUp()
$this->assertSame(0, $commandTester->execute(array('command' => $command->getName(), '-n' => true)));
}

protected function tearDown()
protected function tearDown(): void
{
parent::tearDown();

Expand Down
19 changes: 9 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,25 @@
],
"require": {
"php": "^7.1.3",
"symfony/framework-bundle": "^3.4 || ^4.0",
"symfony/http-foundation": "^3.4 || ^4.0",
"symfony/yaml": "^3.4 || ^4.0"
"symfony/framework-bundle": "^3.4 || ^4.2 || ^5.0",
"symfony/http-foundation": "^3.4 || ^4.2 || ^5.0",
"symfony/yaml": "^3.4 || ^4.2 || ^5.0"
},
"require-dev": {
"ext-pdo_sqlite": "*",
"doctrine/doctrine-bundle": "^1.11.2",
"doctrine/doctrine-bundle": "^1.11.2 || ^2.0",
"doctrine/orm": "^2.6.4",
"phpunit/phpunit": "^7.5",
"predis/predis": "^1.1",
"swiftmailer/swiftmailer": "^6.0",
"symfony/browser-kit": "^3.4 || ^4.0",
"symfony/console": "^3.4 || ^4.0",
"symfony/browser-kit": "^3.4 || ^4.2 || ^5.0",
"symfony/console": "^3.4 || ^4.2 || ^5.0",
"symfony/phpunit-bridge": "^4.3.5",
"symfony/dom-crawler": "^3.4 || ^4.0",
"symfony/debug": "^3.4 || ^4.0",
"symfony/filesystem": "^3.4 || ^4.0",
"symfony/dom-crawler": "^3.4 || ^4.2 || ^5.0",
"symfony/filesystem": "^3.4 || ^4.2 || ^5.0",
"symfony/profiler-pack": "^1.0",
"symfony/swiftmailer-bundle": "^2.0 || ^3.0",
"symfony/twig-bundle": "^3.4 || ^4.0"
"symfony/twig-bundle": "^3.4 || ^4.2 || ^5.0"
},
"suggest": {
"monolog/monolog": "If you want to use the monolog redis handler.",
Expand Down

0 comments on commit 6a7751b

Please sign in to comment.