Skip to content

Commit 0676599

Browse files
Allow Symfony 4.0 and 3.4
* DevKit updates * DevKit updates * DevKit updates * DevKit updates * DevKit updates * DevKit updates * DevKit updates * DevKit updates * DevKit updates * DevKit updates * DevKit updates * changes to use right testing branch * DevKit updates * fix composer.json * DevKit updates * fix testing dependency * DevKit updates * move into new test app structure, add missing dependencies * remove some deprecated stuff, private services, twig runtime loader. * add third option to load the renderer * Apply fixes from StyleCI (#243) [ci skip] [skip ci] * make tests run * DevKit updates * DevKit updates * DevKit updates * DevKit updates * implementation for renderer copied from sonata * DevKit updates * do not call setEnvironment() * DevKit updates * DevKit updates * DevKit updates * DevKit updates * DevKit updates * same as sonata does it * let routing bundle load the old one too. * remove symfony * DevKit updates * DevKit updates * DevKit updates * fix renderer issue for different versions in testing * fixes due to hints on StyleCI * lets try the latest routing-bundle fix on its branch * back to normal versions * user later testing version
1 parent 642ddaf commit 0676599

25 files changed

+103
-68
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
tests/Resources/app/cache
2-
tests/Resources/app/logs
1+
tests/Fixtures/App/var/
32
composer.lock
4-
composer.phar
53
vendor

.travis.yml

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,38 @@ cache:
2626
- $HOME/.composer/cache/files
2727

2828
env:
29-
matrix: SYMFONY_VERSION=3.4
29+
matrix: SYMFONY_VERSION=4.0.*
3030
global:
31-
- SYMFONY_DEPRECATIONS_HELPER=48
32-
- SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" SYMFONY_PHPUNIT_VERSION=5.7
31+
- SYMFONY_DEPRECATIONS_HELPER=0
32+
- SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
33+
- KERNEL_CLASS=Symfony\Cmf\Bundle\CoreBundle\Tests\Fixtures\App\Kernel
34+
- SYMFONY_PHPUNIT_VERSION=5.7
3335
- TEST_INSTALLATION=false
3436

3537
matrix:
3638
include:
3739
- php: 7.1
38-
env: SYMFONY_VERSION=3.4.*
40+
env: STABILITY=dev SYMFONY_VERSION=4.0.*
3941
- php: 7.1
40-
env: DEPS=dev SYMFONY_VERSION=3.3.*
41-
- php: 5.6
42-
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
43-
- php: 7.0
44-
env: SYMFONY_VERSION=3.1.*
45-
- php: 7.0
46-
env: SYMFONY_VERSION=3.2.*
47-
42+
env: STABILITY=dev COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
43+
- php: 7.1
44+
env: STABILITY=dev SYMFONY_VERSION=3.3.*
45+
- php: 7.1
46+
env: STABILITY=dev SYMFONY_VERSION=3.4.*
4847
- env: TEST_INSTALLATION=true
4948
fast_finish: true
5049
allow_failures:
51-
- php: 7.1
52-
env: SYMFONY_VERSION=3.4.*
5350
- env: TEST_INSTALLATION=true
5451

55-
5652
before_install:
57-
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
5853
- phpenv config-rm xdebug.ini || true
5954
- composer self-update
60-
- if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi
55+
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; composer config prefer-stable true; fi;
6156
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
6257
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
6358

6459
install: travis_wait composer update --prefer-dist $COMPOSER_FLAGS
6560

66-
before_script: vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh
67-
6861
script:
6962
- if [ "${TEST_INSTALLATION}" == true ]; then make test_installation; else make test; fi
7063

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Contributing
22
------------
33

4-
Symfony2 CMF is an open source, community-driven project. We follow the same
5-
guidelines as core Symfony2. If you'd like to contribute, please read the
4+
Symfony CMF is an open source, community-driven project. We follow the same
5+
guidelines as core Symfony. If you'd like to contribute, please read the
66
[Contributing Code][1] part of the documentation. If you're submitting a pull
77
request, please follow the guidelines in the [Submitting a Patch][2] section
88
and use the [Pull Request Template][3].

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ifdef BRANCH
2020
VERSION=dev-${BRANCH}
2121
endif
2222
PACKAGE=symfony-cmf/core-bundle
23-
23+
export KERNEL_CLASS=Symfony\Cmf\Bundle\CoreBundle\Tests\Fixtures\App\Kernel
2424
list:
2525
@echo 'test: will run all tests'
2626
@echo 'unit_tests: will run unit tests only'
@@ -31,4 +31,5 @@ include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk
3131
include ${TESTING_SCRIPTS_DIR}/make/functional_tests_phpcr.mk
3232
include ${TESTING_SCRIPTS_DIR}/make/test_installation.mk
3333

34+
.PHONY: test
3435
test: unit_tests functional_tests_phpcr

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Branch | Travis | Coveralls |
1212
------ | ------ | --------- |
1313
master | [![Build Status][travis_unstable_badge]][travis_unstable_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] |
1414

15-
This bundle is part of the [Symfony Content Management Framework (CMF)](http://cmf.symfony.com/) and licensed
15+
This package is part of the [Symfony Content Management Framework (CMF)](http://cmf.symfony.com/) and licensed
1616
under the [MIT License](LICENSE).
1717

1818
The CoreBundle for the Symfony content management framework provides common functionality,
@@ -22,8 +22,8 @@ a twig extension and php templating helper to walk PHPCR-ODM trees and support f
2222

2323
## Requirements
2424

25-
* PHP 5.6 / 7.0 / 7.1
26-
* Symfony 2.8 / 3.1 / 3.2 / 3.3
25+
* PHP 7.1
26+
* Symfony 2.8 / 3.3 / 3.4 / 4.0
2727
* See also the `require` section of [composer.json](composer.json)
2828

2929
## Documentation
@@ -44,10 +44,10 @@ For general support and questions, please use [StackOverflow](http://stackoverfl
4444
## Contributing
4545

4646
Pull requests are welcome. Please see our
47-
[CONTRIBUTING](https://github.com/symfony-cmf/symfony-cmf/blob/master/CONTRIBUTING.md)
47+
[CONTRIBUTING](https://github.com/symfony-cmf/blob/master/CONTRIBUTING.md)
4848
guide.
4949

50-
Unit and/or functional tests exist for this bundle. See the
50+
Unit and/or functional tests exist for this package. See the
5151
[Testing documentation](http://symfony.com/doc/master/cmf/components/testing.html)
5252
for a guide to running the tests.
5353

composer.json

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"name": "symfony-cmf/core-bundle",
33
"type": "symfony-bundle",
44
"description": "Symfony CMF Core Bundle",
5-
"keywords": ["Symfony CMF"],
5+
"keywords": [
6+
"Symfony CMF"
7+
],
68
"homepage": "http://cmf.symfony.com",
79
"license": "MIT",
810
"authors": [
@@ -12,17 +14,23 @@
1214
}
1315
],
1416
"require": {
15-
"php": "^5.6|^7.0",
16-
"symfony/framework-bundle": "^2.8|^3.0"
17+
"php": "^7.1",
18+
"symfony/framework-bundle": "^2.8 || ^3.3 || ^4.0"
1719
},
1820
"require-dev": {
19-
"symfony/security-bundle": "^2.8|^3.0",
20-
"symfony/phpunit-bridge": "^3.2",
21+
"symfony/security-bundle": "^2.8 || ^3.3 || ^4.0",
22+
"symfony/phpunit-bridge": "^3.3 || ^4.0",
2123
"mockery/mockery": "^0.9.4",
2224
"symfony-cmf/routing-bundle": "^2.0",
23-
"symfony-cmf/testing": "^2.1@dev",
25+
"symfony-cmf/testing": "^2.1",
2426
"doctrine/dbal": "2.5.*",
25-
"doctrine/phpcr-odm": "^1.0"
27+
"doctrine/phpcr-odm": "^1.4|^2.0 ",
28+
"symfony/browser-kit": "^2.8 || ^3.3 || ^4.0",
29+
"symfony/templating": "^2.8 || ^3.3 || ^4.0",
30+
"symfony/form": "^2.8 || ^3.3 || ^4.0",
31+
"symfony/translation": "^2.8 || ^3.3 || ^4.0",
32+
"symfony/validator": "^2.8 || ^3.3 || ^4.0",
33+
"symfony/asset": "^2.8 || ^3.3 || ^4.0"
2634
},
2735
"suggest": {
2836
"symfony/twig-bundle": "To get access to the CMF twig extension (^2.1)",
@@ -47,6 +55,5 @@
4755
"branch-alias": {
4856
"dev-master": "2.1-dev"
4957
}
50-
},
51-
"prefer-stable": true
58+
}
5259
}

src/DependencyInjection/CmfCoreExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ private function loadPublishWorkflow($config, XmlFileLoader $loader, ContainerBu
331331
$loader->load('publish-workflow.xml');
332332

333333
$container->setAlias('cmf_core.publish_workflow.checker', $config['checker_service']);
334+
$container->getAlias('cmf_core.publish_workflow.checker')->setPublic(true);
334335

335336
if (false === $config['request_listener']
336337
|| ('auto' === $config['request_listener'] && !class_exists(DynamicRouter::class))

tests/Resources/DataFixture/LoadHierarchyRouteData.php renamed to tests/Fixtures/App/DataFixture/LoadHierarchyRouteData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Bundle\CoreBundle\Tests\Resources\DataFixture;
12+
namespace Symfony\Cmf\Bundle\CoreBundle\Tests\Fixtures\App\DataFixture;
1313

1414
use Doctrine\Common\DataFixtures\FixtureInterface;
1515
use Doctrine\Common\Persistence\ObjectManager;
16-
use Symfony\Cmf\Bundle\CoreBundle\Tests\Resources\Document\RouteAware;
16+
use Symfony\Cmf\Bundle\CoreBundle\Tests\Fixtures\App\Document\RouteAware;
1717

1818
/**
1919
* Fixtures class for test data.

tests/Resources/DataFixture/LoadRouteData.php renamed to tests/Fixtures/App/DataFixture/LoadRouteData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Bundle\CoreBundle\Tests\Resources\DataFixture;
12+
namespace Symfony\Cmf\Bundle\CoreBundle\Tests\Fixtures\App\DataFixture;
1313

1414
use Doctrine\Common\DataFixtures\FixtureInterface;
1515
use Doctrine\Common\Persistence\ObjectManager;
1616
use Doctrine\ODM\PHPCR\Document\Generic;
17-
use Symfony\Cmf\Bundle\CoreBundle\Tests\Resources\Document\Content;
17+
use Symfony\Cmf\Bundle\CoreBundle\Tests\Fixtures\App\Document\Content;
1818
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route;
1919

2020
/**

tests/Resources/Document/Content.php renamed to tests/Fixtures/App/Document/Content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Bundle\CoreBundle\Tests\Resources\Document;
12+
namespace Symfony\Cmf\Bundle\CoreBundle\Tests\Fixtures\App\Document;
1313

1414
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;
1515
use Symfony\Cmf\Component\Routing\RouteReferrersReadInterface;

0 commit comments

Comments
 (0)