Skip to content

Commit 060458b

Browse files
authored
Merge pull request #443 from symfony-cmf/fix-build
clean up build matrix
2 parents 8f629c2 + 5da7cce commit 060458b

File tree

9 files changed

+47
-30
lines changed

9 files changed

+47
-30
lines changed

.styleci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ enabled:
2626
- strict
2727
- php_unit_construct
2828

29-
disabled: [single_line_class_definition]
29+
disabled:
30+
- single_line_class_definition
31+
- single_line_throw

.travis.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
############################################################################
88
# This file is part of the Symfony CMF package. #
99
# #
10-
# (c) 2011-2017 Symfony CMF #
10+
# (c) Symfony CMF #
1111
# #
1212
# For the full copyright and license information, please view the LICENSE #
1313
# file that was distributed with this source code. #
@@ -17,46 +17,44 @@ language: php
1717

1818
php:
1919
- 7.1
20+
- 7.2
21+
- 7.3
2022

2123
sudo: false
2224

2325
cache:
2426
directories:
2527
- .phpunit
26-
- $HOME/.composer/cache/files
28+
- $HOME/.composer/cache
2729

2830
env:
29-
matrix: SYMFONY_VERSION=4.0.*
3031
global:
31-
- SYMFONY_DEPRECATIONS_HELPER="/.*each.*/"
32-
- SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
3332
- SYMFONY_PHPUNIT_VERSION=6
34-
- TEST_INSTALLATION=false
33+
- COMPOSER_MEMORY_LIMIT=-1
34+
- SYMFONY_DEPRECATIONS_HELPER="max[self]=0"
3535

3636
matrix:
3737
include:
38-
- php: 7.2
39-
env: SYMFONY_VERSION=4.0.*
4038
- php: 7.1
41-
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
42-
- php: 7.2
43-
env: SYMFONY_VERSION=3.3.*
44-
- php: 7.2
45-
env: SYMFONY_VERSION=3.4.*
39+
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_REQUIRE=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak
40+
- php: 7.4
41+
env: SYMFONY_REQUIRE=3.4.*
42+
- php: 7.4
43+
env: SYMFONY_REQUIRE=4.3.*
44+
- php: 7.4
45+
env: SYMFONY_REQUIRE=4.4.*
4646
fast_finish: true
4747
allow_failures:
4848

4949
before_install:
5050
- phpenv config-rm xdebug.ini || true
51-
- composer self-update
52-
- composer validate --no-check-all --ansi
53-
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; composer config prefer-stable true; fi;
54-
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
55-
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
51+
- composer global require --no-progress --no-scripts --no-plugins symfony/flex
52+
53+
install: travis_wait composer update -n --prefer-stable --prefer-dist $COMPOSER_FLAGS
5654

57-
install: travis_wait composer update --prefer-dist $COMPOSER_FLAGS
5855
script:
59-
- if [ "${TEST_INSTALLATION}" == true ]; then make test_installation; else make test; fi
56+
- composer validate --no-check-all --ansi
57+
- make test
6058

6159
notifications:
6260
irc: "irc.freenode.org#symfony-cmf"

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
############################################################################
88
# This file is part of the Symfony CMF package. #
99
# #
10-
# (c) 2011-2017 Symfony CMF #
10+
# (c) Symfony CMF #
1111
# #
1212
# For the full copyright and license information, please view the LICENSE #
1313
# file that was distributed with this source code. #
@@ -23,7 +23,7 @@ PACKAGE=symfony-cmf/routing-bundle
2323
export KERNEL_CLASS=Symfony\Cmf\Bundle\RoutingBundle\Tests\Fixtures\App\Kernel
2424
list:
2525
@echo 'test: will run all tests'
26-
@echo 'unit_tests: will run unit tests only'
26+
@echo 'unit_tests: will run unit tests only'
2727
@echo 'functional_tests_phpcr: will run functional tests with PHPCR'
2828
@echo 'functional_tests_orm: will run functional tests with ORM'
2929

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"require": {
1818
"php": "^7.1",
1919
"symfony-cmf/routing": "^2.1.0",
20-
"symfony/framework-bundle": "^2.8 || ^3.3 || ^4.0",
20+
"symfony/framework-bundle": "^3.4 || ^4.3",
2121
"twig/twig": "^1.35 || ^2.4.4"
2222
},
2323
"require-dev": {
@@ -26,9 +26,11 @@
2626
"matthiasnoback/symfony-dependency-injection-test": "^2.3.1",
2727
"matthiasnoback/symfony-config-test": "^3.1.1",
2828
"doctrine/orm": "^2.5",
29-
"symfony-cmf/testing": "^2.1.11",
29+
"symfony-cmf/testing": "^3@dev",
3030
"doctrine/data-fixtures": "^1.0.0",
31-
"symfony/validator": "^2.8 || ^3.3 || ^4.0"
31+
"symfony/form": "^3.4 || ^4.3",
32+
"symfony/translation": "^3.4 || ^4.3",
33+
"symfony/validator": "^3.4 || ^4.3"
3234
},
3335
"suggest": {
3436
"doctrine/phpcr-odm": "To enable support for the PHPCR ODM documents (^1.4)",

src/Doctrine/Phpcr/Route.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Route extends RouteModel implements PrefixInterface, HierarchyInterface
5252
*
5353
* This field is not persisted in storage.
5454
*
55-
* @var string
55+
* @var string|null
5656
*/
5757
protected $idPrefix;
5858

@@ -231,7 +231,7 @@ public function getStaticPrefix()
231231
*/
232232
public function generateStaticPrefix($id, $idPrefix)
233233
{
234-
if ('' === $idPrefix) {
234+
if ('' === $idPrefix || null === $idPrefix) {
235235
throw new \LogicException('Can not determine the prefix. Either this is a new, unpersisted document or the listener that calls setPrefix is not set up correctly.');
236236
}
237237

tests/Fixtures/App/config/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
framework:
22
serializer: ~
3+
templating: false

tests/Functional/Doctrine/Orm/OrmTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class OrmTestCase extends ComponentBaseTestCase
1818
{
19-
protected function getKernelConfiguration()
19+
protected function getKernelConfiguration(): array
2020
{
2121
return [
2222
'environment' => 'orm',

tests/Unit/DependencyInjection/Compiler/TemplatingValidatorPassTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@
1616
use Symfony\Cmf\Bundle\RoutingBundle\Validator\Constraints\RouteDefaultsTemplatingValidator;
1717
use Symfony\Component\DependencyInjection\ContainerBuilder;
1818
use Symfony\Component\DependencyInjection\Reference;
19+
use Symfony\Component\Templating\EngineInterface;
1920

2021
class TemplatingValidatorPassTest extends AbstractCompilerPassTestCase
2122
{
2223
public function setUp()
2324
{
25+
if (!\class_exists(EngineInterface::class)) {
26+
$this->markTestSkipped();
27+
}
28+
2429
parent::setUp();
2530

2631
$this->registerValidatorService();

tests/Unit/Validator/Constraints/RouteDefaultsTemplatingValidatorTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
namespace Symfony\Cmf\Bundle\RoutingBundle\Tests\Unit\Validator\Constraints;
1313

14-
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
1514
use Symfony\Cmf\Bundle\RoutingBundle\Validator\Constraints\RouteDefaultsTemplatingValidator;
15+
use Symfony\Component\Templating\EngineInterface;
1616

1717
class RouteDefaultsTemplatingValidatorTest extends RouteDefaultsValidatorTest
1818
{
@@ -21,6 +21,15 @@ protected function mockEngine()
2121
return $this->createMock(EngineInterface::class);
2222
}
2323

24+
protected function setUp()
25+
{
26+
if (!\class_exists(EngineInterface::class)) {
27+
$this->markTestSkipped();
28+
}
29+
30+
parent::setUp();
31+
}
32+
2433
protected function createValidator()
2534
{
2635
return new RouteDefaultsTemplatingValidator($this->controllerResolver, $this->engine);

0 commit comments

Comments
 (0)