From 2de28ff96b08530fea67a7fa81fa219f86940e57 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Tue, 29 Jan 2019 06:29:49 +0100 Subject: [PATCH 1/9] DevKit updates --- .travis.yml | 26 ++++++++++---------- Makefile | 3 +-- README.md | 49 +++++++++++++++++++++----------------- composer.json | 12 +++++----- src/Resources/meta/LICENSE | 2 +- 5 files changed, 47 insertions(+), 45 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9636969..365fadd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,27 +26,25 @@ cache: - $HOME/.composer/cache/files env: - matrix: SYMFONY_VERSION=4.0.* + matrix: SYMFONY_VERSION=4.2.* global: - - SYMFONY_DEPRECATIONS_HELPER="/.*each.*/" + - SYMFONY_DEPRECATIONS_HELPER="weak" - SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" - - SYMFONY_PHPUNIT_VERSION=6 - - TEST_INSTALLATION=false + - KERNEL_CLASS=Symfony\Cmf\Bundle\ContentBundle\Tests\Fixtures\App\Kernel + - SYMFONY_PHPUNIT_VERSION=5.7.26 matrix: include: - - php: 7.2 - env: SYMFONY_VERSION=4.0.* - - php: 7.1 - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.2 - env: SYMFONY_VERSION=3.3.* - - php: 7.2 - env: SYMFONY_VERSION=3.4.* - - env: TEST_INSTALLATION=true + - php: "7.3" + env: STABILITY="dev" SYMFONY_VERSION="4.2.*" + - php: "7.2" + env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION="3.4.*" SYMFONY_DEPRECATIONS_HELPER="weak" + - php: "7.3" + env: STABILITY="dev" SYMFONY_VERSION="4.0.*" + - php: "7.3" + env: STABILITY="dev" SYMFONY_VERSION="4.1.*" fast_finish: true allow_failures: - - env: TEST_INSTALLATION=true before_install: - phpenv config-rm xdebug.ini || true diff --git a/Makefile b/Makefile index c36118d..52fd2bc 100644 --- a/Makefile +++ b/Makefile @@ -26,10 +26,9 @@ list: @echo 'unit_tests: will run unit tests only' @echo 'functional_tests_phpcr: will run functional tests with PHPCR' - @echo 'test_installation: will run installation test' + include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk include ${TESTING_SCRIPTS_DIR}/make/functional_tests_phpcr.mk -include ${TESTING_SCRIPTS_DIR}/make/test_installation.mk .PHONY: test test: unit_tests functional_tests_phpcr diff --git a/README.md b/README.md index 8aa8a36..aa9684a 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,13 @@ [![Monthly Downloads](https://poser.pugx.org/symfony-cmf/content-bundle/d/monthly)](https://packagist.org/packages/symfony-cmf/content-bundle) [![Daily Downloads](https://poser.pugx.org/symfony-cmf/content-bundle/d/daily)](https://packagist.org/packages/symfony-cmf/content-bundle) -Branch | Travis | Coveralls | ------- | ------ | --------- | -master | [![Build Status][travis_unstable_badge]][travis_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] | +Branch | Travis | Coveralls | Scrutinizer | +------ | ------ | --------- | ----------- | +3.0-dev | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] | [![Scrutinizer Status][scrutinizer_stable_badge]][scrutinizer_stable_link] | +3.0-dev | [![Build Status][travis_unstable_badge]][travis_unstable_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] | [![Scrutinizer Status][scrutinizer_unstable_badge]][scrutinizer_unstable_link] | -This package is part of the [Symfony Content Management Framework (CMF)](http://cmf.symfony.com/) and licensed + +This package is part of the [Symfony Content Management Framework (CMF)](https://cmf.symfony.com/) and licensed under the [MIT License](LICENSE). The ContentBundle provides a document for static content and the controller to render it. @@ -20,24 +22,24 @@ The ContentBundle provides a document for static content and the controller to r ## Requirements -* PHP 7.1 / 7.2 -* Symfony 2.8 / 3.3 / 3.4 / 4.0 +* PHP 7.2 / 7.3 +* Symfony 3.4 / 4.0 / 4.1 / 4.2 * See also the `require` section of [composer.json](composer.json) ## Documentation For the install guide and reference, see: -* [symfony-cmf/content-bundle Documentation](http://symfony.com/doc/master/cmf/bundles/routing/index.html) +* [symfony-cmf/content-bundle Documentation](https://symfony.com/doc/master/cmf/bundles/routing/index.html) See also: -* [All Symfony CMF documentation](http://symfony.com/doc/master/cmf/index.html) - complete Symfony CMF reference -* [Symfony CMF Website](http://cmf.symfony.com/) - introduction, live demo, support and community links +* [All Symfony CMF documentation](https://symfony.com/doc/master/cmf/index.html) - complete Symfony CMF reference +* [Symfony CMF Website](https://cmf.symfony.com/) - introduction, live demo, support and community links ## Support -For general support and questions, please use [StackOverflow](http://stackoverflow.com/questions/tagged/symfony-cmf). +For general support and questions, please use [StackOverflow](https://stackoverflow.com/questions/tagged/symfony-cmf). ## Contributing @@ -46,7 +48,7 @@ Pull requests are welcome. Please see our guide. Unit and/or functional tests exist for this package. See the -[Testing documentation](http://symfony.com/doc/master/cmf/components/testing.html) +[Testing documentation](https://symfony.com/doc/master/cmf/components/testing.html) for a guide to running the tests. Thanks to @@ -56,14 +58,17 @@ Thanks to This package is available under the [MIT license](src/Resources/meta/LICENSE). -[travis_legacy_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=master -[travis_stable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=master -[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=master -[travis_link]: https://travis-ci.org/symfony-cmf/content-bundle - -[coveralls_legacy_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=master -[coveralls_legacy_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=master -[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=master -[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=master -[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=master -[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=master +[travis_stable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=3.0-dev +[travis_stable_link]: https://travis-ci.org/symfony-cmf/content-bundle +[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=3.0-dev +[travis_unstable_link]: https://travis-ci.org/symfony-cmf/content-bundle + +[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=3.0-dev +[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=3.0-dev +[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=3.0-dev +[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=3.0-dev + +[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=3.0-dev +[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=3.0-dev +[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=3.0-dev +[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=3.0-dev diff --git a/composer.json b/composer.json index ab5e186..fa0db33 100644 --- a/composer.json +++ b/composer.json @@ -14,11 +14,11 @@ } ], "require": { - "php": "^7.1", - "symfony/framework-bundle": "^2.8 || ^3.3 || ^4.0", - "symfony/templating": "^2.8 || ^3.3 || ^4.0", - "symfony/twig-bundle": "^2.8 || ^3.3 || ^4.0", - "symfony/validator": "^2.8 || ^3.3 || ^4.0", + "php": "^7.2", + "symfony/framework-bundle": "^3.4 || ^4.0", + "symfony/templating": "^3.4 || ^4.0", + "symfony/twig-bundle": "^3.4 || ^4.0", + "symfony/validator": "^3.4 || ^4.0", "symfony-cmf/core-bundle": "^2.1", "symfony-cmf/menu-bundle": "^2.1", "symfony-cmf/routing-bundle": "^2.1" @@ -26,7 +26,7 @@ "require-dev": { "doctrine/phpcr-odm": "^1.4|^2.0", "symfony-cmf/testing": "^2.1.11", - "symfony/phpunit-bridge": "^4.2.2" + "symfony/phpunit-bridge": "^3.4 || ^4.0" }, "suggest": { "friendsofsymfony/rest-bundle": "Improved handling for different output formats", diff --git a/src/Resources/meta/LICENSE b/src/Resources/meta/LICENSE index 7645ba7..49aae56 100644 --- a/src/Resources/meta/LICENSE +++ b/src/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Symfony Cmf Content Bundle +Symfony CMF Content Bundle The MIT License From a670e03d6d8c134903a39ea64694644e40dc52d0 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Tue, 29 Jan 2019 06:36:00 +0100 Subject: [PATCH 2/9] DevKit updates --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aa9684a..774c909 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Branch | Travis | Coveralls | Scrutinizer | ------ | ------ | --------- | ----------- | -3.0-dev | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] | [![Scrutinizer Status][scrutinizer_stable_badge]][scrutinizer_stable_link] | +1 | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] | [![Scrutinizer Status][scrutinizer_stable_badge]][scrutinizer_stable_link] | 3.0-dev | [![Build Status][travis_unstable_badge]][travis_unstable_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] | [![Scrutinizer Status][scrutinizer_unstable_badge]][scrutinizer_unstable_link] | @@ -58,17 +58,17 @@ Thanks to This package is available under the [MIT license](src/Resources/meta/LICENSE). -[travis_stable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=3.0-dev +[travis_stable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=1 [travis_stable_link]: https://travis-ci.org/symfony-cmf/content-bundle [travis_unstable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=3.0-dev [travis_unstable_link]: https://travis-ci.org/symfony-cmf/content-bundle -[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=3.0-dev -[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=3.0-dev +[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=1 +[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=1 [coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=3.0-dev [coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=3.0-dev -[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=3.0-dev -[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=3.0-dev +[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=1 +[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=1 [scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=3.0-dev [scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=3.0-dev From 6980dc6f39cee0b9bed6b6c7e6c14d90426de93a Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Tue, 29 Jan 2019 06:39:10 +0100 Subject: [PATCH 3/9] DevKit updates --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 774c909..563df11 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Branch | Travis | Coveralls | Scrutinizer | ------ | ------ | --------- | ----------- | -1 | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] | [![Scrutinizer Status][scrutinizer_stable_badge]][scrutinizer_stable_link] | +2.1 | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] | [![Scrutinizer Status][scrutinizer_stable_badge]][scrutinizer_stable_link] | 3.0-dev | [![Build Status][travis_unstable_badge]][travis_unstable_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] | [![Scrutinizer Status][scrutinizer_unstable_badge]][scrutinizer_unstable_link] | @@ -58,17 +58,17 @@ Thanks to This package is available under the [MIT license](src/Resources/meta/LICENSE). -[travis_stable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=1 +[travis_stable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=2.1 [travis_stable_link]: https://travis-ci.org/symfony-cmf/content-bundle [travis_unstable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=3.0-dev [travis_unstable_link]: https://travis-ci.org/symfony-cmf/content-bundle -[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=1 -[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=1 +[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=2.1 +[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=2.1 [coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=3.0-dev [coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=3.0-dev -[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=1 -[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=1 +[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=2.1 +[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=2.1 [scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=3.0-dev [scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=3.0-dev From 2af0fc41d0bc4576e1f75b619860459b1ef968c1 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Wed, 30 Jan 2019 22:54:26 +0100 Subject: [PATCH 4/9] DevKit updates --- .travis.yml | 31 +++++++++++++++++++------------ Makefile | 5 +++-- README.md | 14 +++++++------- composer.json | 4 ++-- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index 365fadd..f36898f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,8 @@ language: php php: - 7.1 - + - 7.2 + - 7.3 sudo: false cache: @@ -28,23 +29,29 @@ cache: env: matrix: SYMFONY_VERSION=4.2.* global: - - SYMFONY_DEPRECATIONS_HELPER="weak" + - SYMFONY_DEPRECATIONS_HELPER=weak - SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" - - KERNEL_CLASS=Symfony\Cmf\Bundle\ContentBundle\Tests\Fixtures\App\Kernel - - SYMFONY_PHPUNIT_VERSION=5.7.26 + - SYMFONY_PHPUNIT_VERSION=7 + - TEST_INSTALLATION=false matrix: include: - - php: "7.3" - env: STABILITY="dev" SYMFONY_VERSION="4.2.*" - - php: "7.2" - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION="3.4.*" SYMFONY_DEPRECATIONS_HELPER="weak" - - php: "7.3" - env: STABILITY="dev" SYMFONY_VERSION="4.0.*" - - php: "7.3" - env: STABILITY="dev" SYMFONY_VERSION="4.1.*" + - php: 7.3 + env: STABILITY="dev" SYMFONY_VERSION=4.3.* + - php: 7.3 + env: SYMFONY_VERSION=4.2.* + - php: 7.1 + env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak + - php: 7.2 + env: SYMFONY_VERSION=4.0.* + - php: 7.2 + env: SYMFONY_VERSION=4.1.* + - env: TEST_INSTALLATION=true fast_finish: true allow_failures: + - php: 7.3 + env: STABILITY="dev" SYMFONY_VERSION=4.3.* + - env: TEST_INSTALLATION=true before_install: - phpenv config-rm xdebug.ini || true diff --git a/Makefile b/Makefile index 52fd2bc..d4182c4 100644 --- a/Makefile +++ b/Makefile @@ -20,15 +20,16 @@ ifdef BRANCH VERSION=dev-${BRANCH} endif PACKAGE=symfony-cmf/content-bundle -export KERNEL_CLASS=Symfony\Cmf\Bundle\ContentBundle\Tests\Fixtures\App\Kernel + list: @echo 'test: will run all tests' @echo 'unit_tests: will run unit tests only' @echo 'functional_tests_phpcr: will run functional tests with PHPCR' - + @echo 'test_installation: will run installation test' include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk include ${TESTING_SCRIPTS_DIR}/make/functional_tests_phpcr.mk +include ${TESTING_SCRIPTS_DIR}/make/test_installation.mk .PHONY: test test: unit_tests functional_tests_phpcr diff --git a/README.md b/README.md index 563df11..620f519 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Branch | Travis | Coveralls | Scrutinizer | ------ | ------ | --------- | ----------- | 2.1 | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] | [![Scrutinizer Status][scrutinizer_stable_badge]][scrutinizer_stable_link] | -3.0-dev | [![Build Status][travis_unstable_badge]][travis_unstable_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] | [![Scrutinizer Status][scrutinizer_unstable_badge]][scrutinizer_unstable_link] | +dev-master | [![Build Status][travis_unstable_badge]][travis_unstable_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] | [![Scrutinizer Status][scrutinizer_unstable_badge]][scrutinizer_unstable_link] | This package is part of the [Symfony Content Management Framework (CMF)](https://cmf.symfony.com/) and licensed @@ -22,7 +22,7 @@ The ContentBundle provides a document for static content and the controller to r ## Requirements -* PHP 7.2 / 7.3 +* PHP 7.1 / 7.2 / 7.3 * Symfony 3.4 / 4.0 / 4.1 / 4.2 * See also the `require` section of [composer.json](composer.json) @@ -60,15 +60,15 @@ This package is available under the [MIT license](src/Resources/meta/LICENSE). [travis_stable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=2.1 [travis_stable_link]: https://travis-ci.org/symfony-cmf/content-bundle -[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=3.0-dev +[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/content-bundle.svg?branch=dev-master [travis_unstable_link]: https://travis-ci.org/symfony-cmf/content-bundle [coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=2.1 [coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=2.1 -[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=3.0-dev -[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=3.0-dev +[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/content-bundle/badge.svg?branch=dev-master +[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/content-bundle?branch=dev-master [scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=2.1 [scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=2.1 -[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=3.0-dev -[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=3.0-dev +[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/badges/quality-score.png?b=dev-master +[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/content-bundle/?branch=dev-master diff --git a/composer.json b/composer.json index fa0db33..6a92b2f 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.1", "symfony/framework-bundle": "^3.4 || ^4.0", "symfony/templating": "^3.4 || ^4.0", "symfony/twig-bundle": "^3.4 || ^4.0", @@ -26,7 +26,7 @@ "require-dev": { "doctrine/phpcr-odm": "^1.4|^2.0", "symfony-cmf/testing": "^2.1.11", - "symfony/phpunit-bridge": "^3.4 || ^4.0" + "symfony/phpunit-bridge": "^4.2.2" }, "suggest": { "friendsofsymfony/rest-bundle": "Improved handling for different output formats", From 002526a07e9657ce2e8299e3d738c4af0304997c Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Wed, 30 Jan 2019 23:42:51 +0100 Subject: [PATCH 5/9] DevKit updates --- .travis.yml | 2 +- Makefile | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f36898f..1f87edd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ env: global: - SYMFONY_DEPRECATIONS_HELPER=weak - SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" - - SYMFONY_PHPUNIT_VERSION=7 + - SYMFONY_PHPUNIT_VERSION=6 - TEST_INSTALLATION=false matrix: diff --git a/Makefile b/Makefile index d4182c4..093c39f 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,12 @@ ############################################################################ TESTING_SCRIPTS_DIR=vendor/symfony-cmf/testing/bin + +SYMFONY_PHPUNIT_VERSION=6 +SYMFONY_DEPRECATIONS_HELPER==weak CONSOLE=${TESTING_SCRIPTS_DIR}/console +SYMFONY_PHPUNIT_DIR=.phpunit +SYMFONY_PHPUNIT_REMOVE="symfony/yaml" VERSION=dev-master ifdef BRANCH VERSION=dev-${BRANCH} From efe1188605c95e036e0d0212eb1fa16bdc903098 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Thu, 28 Feb 2019 05:43:13 +0100 Subject: [PATCH 6/9] DevKit updates --- .php_cs.dist | 64 +++++++++++++++++++++++++++++++++++ .styleci.yml | 2 +- .travis.yml | 27 +++++++++------ .travis/after_success_test.sh | 5 +++ .travis/install_lint.sh | 11 ++++++ .travis/install_test.sh | 19 +++++++++++ Makefile | 64 +++++++++++++++++++++++++++++------ README.md | 2 +- composer.json | 8 ++--- phpunit.xml.dist | 47 +++++++++++++------------ src/Resources/meta/LICENSE | 2 +- 11 files changed, 200 insertions(+), 51 deletions(-) create mode 100644 .php_cs.dist create mode 100755 .travis/after_success_test.sh create mode 100755 .travis/install_lint.sh create mode 100755 .travis/install_test.sh diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..5759af5 --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,64 @@ + true, + '@Symfony:risky' => true, + 'array_syntax' => [ + 'syntax' => 'short', + ], + 'combine_consecutive_issets' => true, + 'combine_consecutive_unsets' => true, + 'header_comment' => [ + 'header' => $header, + ], + 'no_extra_blank_lines' => true, + 'no_php4_constructor' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'ordered_class_elements' => true, + 'ordered_imports' => true, + 'phpdoc_order' => true, + '@PHP56Migration' => true, + '@PHP56Migration:risky' => true, + '@PHPUnit57Migration:risky' => true, + '@PHP70Migration' => true, + '@PHP70Migration:risky' => true, + '@PHPUnit60Migration:risky' => true, + '@PHP71Migration' => true, + '@PHP71Migration:risky' => true, + 'compact_nullable_typehint' => true, + 'void_return' => null, + 'strict_comparison' => true, + 'strict_param' => true, +]; + + +$finder = PhpCsFixer\Finder::create() + ->in(__DIR__) + ->exclude('Tests/Fixtures') + ->exclude('tests/Fixtures') + ->exclude('Resources/skeleton') + ->exclude('Resources/public/vendor') +; + +return PhpCsFixer\Config::create() + ->setFinder($finder) + ->setRiskyAllowed(true) + ->setRules($rules) + ->setUsingCache(true) +; diff --git a/.styleci.yml b/.styleci.yml index 2bdb04b..c721eb6 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -7,7 +7,7 @@ ############################################################################ # This file is part of the Symfony CMF package. # # # -# (c) 2011-2017 Symfony CMF # +# (c) Symfony CMF # # # # For the full copyright and license information, please view the LICENSE # # file that was distributed with this source code. # diff --git a/.travis.yml b/.travis.yml index 1f87edd..bd338d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ ############################################################################ # This file is part of the Symfony CMF package. # # # -# (c) 2011-2017 Symfony CMF # +# (c) Symfony CMF # # # # For the full copyright and license information, please view the LICENSE # # file that was distributed with this source code. # @@ -29,29 +29,30 @@ cache: env: matrix: SYMFONY_VERSION=4.2.* global: - - SYMFONY_DEPRECATIONS_HELPER=weak + - SYMFONY_DEPRECATIONS_HELPER="/.*each.*/" - SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" - SYMFONY_PHPUNIT_VERSION=6 - - TEST_INSTALLATION=false + - PHPUNIT_VERSION=6 + - TARGET=test matrix: include: + - env: TARGET=lint - php: 7.3 env: STABILITY="dev" SYMFONY_VERSION=4.3.* - php: 7.3 env: SYMFONY_VERSION=4.2.* - php: 7.1 - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.2 - env: SYMFONY_VERSION=4.0.* + env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=3.4.* SYMFONY_DEPRECATIONS_HELPER="/.*each.*/" + - php: 7.2 env: SYMFONY_VERSION=4.1.* - - env: TEST_INSTALLATION=true + - env: TARGET=test_installation fast_finish: true allow_failures: - php: 7.3 env: STABILITY="dev" SYMFONY_VERSION=4.3.* - - env: TEST_INSTALLATION=true + - env: TARGET=test_installation before_install: - phpenv config-rm xdebug.ini || true @@ -61,9 +62,13 @@ before_install: - if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) -install: travis_wait composer update --prefer-dist $COMPOSER_FLAGS -script: - - if [ "${TEST_INSTALLATION}" == true ]; then make test_installation; else make test; fi +install: + - if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi; + +script: make $TARGET + +after_success: + - if [ -x .travis/after_success_${TARGET}.sh ]; then .travis/after_success_${TARGET}.sh; fi; notifications: irc: "irc.freenode.org#symfony-cmf" diff --git a/.travis/after_success_test.sh b/.travis/after_success_test.sh new file mode 100755 index 0000000..9837420 --- /dev/null +++ b/.travis/after_success_test.sh @@ -0,0 +1,5 @@ + +#!/usr/bin/env sh +set -ev + +coveralls -v diff --git a/.travis/install_lint.sh b/.travis/install_lint.sh new file mode 100755 index 0000000..864c751 --- /dev/null +++ b/.travis/install_lint.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh +set -ev + +mkdir --parents "${HOME}/bin" + +wget "http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar" --output-document="${HOME}/bin/php-cs-fixer" +chmod u+x "${HOME}/bin/php-cs-fixer" + +composer global require sllh/composer-lint:@stable --prefer-dist --no-interaction + +gem install yaml-lint diff --git a/.travis/install_test.sh b/.travis/install_test.sh new file mode 100755 index 0000000..a033500 --- /dev/null +++ b/.travis/install_test.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env sh +set -ev + +mkdir --parents "${HOME}/bin" + +wget "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" --output-document="${HOME}/bin/phpunit" +chmod u+x "${HOME}/bin/phpunit" + +# Coveralls client install +wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar --output-document="${HOME}/bin/coveralls" +chmod u+x "${HOME}/bin/coveralls" + +# To be removed when these issues are resolved: +# https://github.com/composer/composer/issues/5355 +if [ "${COMPOSER_FLAGS}" = '--prefer-lowest' ]; then + composer update --prefer-dist --no-interaction --prefer-stable --quiet +fi + +composer update --prefer-dist --no-interaction --prefer-stable ${COMPOSER_FLAGS} diff --git a/Makefile b/Makefile index 093c39f..d4c2d00 100644 --- a/Makefile +++ b/Makefile @@ -7,34 +7,76 @@ ############################################################################ # This file is part of the Symfony CMF package. # # # -# (c) 2011-2017 Symfony CMF # +# (c) Symfony CMF # # # # For the full copyright and license information, please view the LICENSE # # file that was distributed with this source code. # ############################################################################ TESTING_SCRIPTS_DIR=vendor/symfony-cmf/testing/bin - -SYMFONY_PHPUNIT_VERSION=6 -SYMFONY_DEPRECATIONS_HELPER==weak CONSOLE=${TESTING_SCRIPTS_DIR}/console -SYMFONY_PHPUNIT_DIR=.phpunit -SYMFONY_PHPUNIT_REMOVE="symfony/yaml" VERSION=dev-master ifdef BRANCH VERSION=dev-${BRANCH} endif PACKAGE=symfony-cmf/content-bundle +HAS_XDEBUG=$(shell php --modules|grep --quiet xdebug;echo $$?) list: @echo 'test: will run all tests' @echo 'unit_tests: will run unit tests only' @echo 'functional_tests_phpcr: will run functional tests with PHPCR' - @echo 'test_installation: will run installation test' -include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk -include ${TESTING_SCRIPTS_DIR}/make/functional_tests_phpcr.mk -include ${TESTING_SCRIPTS_DIR}/make/test_installation.mk + @echo 'test_installation: will run installation test'TEST_DEPENDENCIES := "" +EXTRA_INCLUDES:=$(wildcard ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk) +ifneq ($(strip $(EXTRA_INCLUDES)),) + contents := $(shell echo including extra rules $(EXTRA_INCLUDES)) + include $(EXTRA_INCLUDES) + TEST_DEPENDENCIES := $(TEST_DEPENDENCIES)" unit_tests" + endif +EXTRA_INCLUDES:=$(wildcard ${TESTING_SCRIPTS_DIR}/make/functional_tests_phpcr.mk) +ifneq ($(strip $(EXTRA_INCLUDES)),) + contents := $(shell echo including extra rules $(EXTRA_INCLUDES)) + include $(EXTRA_INCLUDES) + TEST_DEPENDENCIES := $(TEST_DEPENDENCIES)" functional_tests_phpcr" + endif +EXTRA_INCLUDES:=$(wildcard ${TESTING_SCRIPTS_DIR}/make/test_installation.mk) +ifneq ($(strip $(EXTRA_INCLUDES)),) + contents := $(shell echo including extra rules $(EXTRA_INCLUDES)) + include $(EXTRA_INCLUDES) + endif .PHONY: test -test: unit_tests functional_tests_phpcr +test: build/xdebug-filter.php$ +ifneq ($(strip $(wildcard ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk)),) + @make unit_tests +endif +ifneq ($(strip $(wildcard ${TESTING_SCRIPTS_DIR}/make/functional_tests_phpcr.mk)),) + @make functional_tests_phpcr +endif + +lint-php: + php-cs-fixer fix --ansi --verbose --diff --dry-run +.PHONY: lint-php + +lint: lint-composer lint-php +.PHONY: lint + +lint-composer: + composer validate +.PHONY: lint-composer + +cs-fix: cs-fix-php +.PHONY: cs-fix + +cs-fix-php: + php-cs-fixer fix --verbose +.PHONY: cs-fix-php + +build: + mkdir $@ + +build/xdebug-filter.php: phpunit.xml.dist build +ifeq ($(HAS_XDEBUG), 0) + phpunit --dump-xdebug-filter $@ +endif diff --git a/README.md b/README.md index 620f519..bfd0966 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The ContentBundle provides a document for static content and the controller to r ## Requirements * PHP 7.1 / 7.2 / 7.3 -* Symfony 3.4 / 4.0 / 4.1 / 4.2 +* Symfony 3.4 / 4.1 / 4.2 * See also the `require` section of [composer.json](composer.json) ## Documentation diff --git a/composer.json b/composer.json index 6a92b2f..3e014ed 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,10 @@ ], "require": { "php": "^7.1", - "symfony/framework-bundle": "^3.4 || ^4.0", - "symfony/templating": "^3.4 || ^4.0", - "symfony/twig-bundle": "^3.4 || ^4.0", - "symfony/validator": "^3.4 || ^4.0", + "symfony/framework-bundle": "^3.4 || ^4.1", + "symfony/templating": "^3.4 || ^4.1", + "symfony/twig-bundle": "^3.4 || ^4.1", + "symfony/validator": "^3.4 || ^4.1", "symfony-cmf/core-bundle": "^2.1", "symfony-cmf/menu-bundle": "^2.1", "symfony-cmf/routing-bundle": "^2.1" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7c61a68..7f9a8cd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,33 +1,36 @@ + + + colors="true" + bootstrap="vendor/symfony-cmf/testing/bootstrap/bootstrap.php" +> + + - + + + ./tests/Unit + + ./tests/Functional + ./tests/Functional/Doctrine/Orm + + - - ./tests/Unit - - + + + src/ + + Resources/ + + + - - - . - - *Bundle.php - Resources/ - Admin/ - tests/ - vendor/ - - - + - - + diff --git a/src/Resources/meta/LICENSE b/src/Resources/meta/LICENSE index 49aae56..1b1f3a5 100644 --- a/src/Resources/meta/LICENSE +++ b/src/Resources/meta/LICENSE @@ -2,7 +2,7 @@ Symfony CMF Content Bundle The MIT License - Copyright (c) 2011-2017 Symfony CMF + Copyright (c) Symfony CMF Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 0647b71e2c67bb72bd72008d0e04dd7e8d40d93a Mon Sep 17 00:00:00 2001 From: ElectricMaxxx Date: Thu, 28 Feb 2019 05:53:26 +0100 Subject: [PATCH 7/9] add translation, yaml and forms component, fix cs and introduce phpunit 6 support --- composer.json | 9 ++++++--- src/CmfContentBundle.php | 4 +++- src/Controller/ContentController.php | 10 ++++++---- src/DependencyInjection/CmfContentExtension.php | 4 +++- src/DependencyInjection/Compiler/ValidationPass.php | 4 +++- src/DependencyInjection/Configuration.php | 4 +++- src/Doctrine/Phpcr/StaticContent.php | 4 +++- src/Doctrine/Phpcr/StaticContentBase.php | 4 +++- src/Model/StaticContent.php | 13 +++++-------- src/Model/StaticContentBase.php | 4 +++- .../Functional/Doctrine/Phpcr/StaticContentTest.php | 6 ++++-- tests/Unit/DependencyInjection/XmlSchemaTest.php | 4 +++- 12 files changed, 45 insertions(+), 25 deletions(-) diff --git a/composer.json b/composer.json index 3e014ed..8f38b1c 100644 --- a/composer.json +++ b/composer.json @@ -21,12 +21,15 @@ "symfony/validator": "^3.4 || ^4.1", "symfony-cmf/core-bundle": "^2.1", "symfony-cmf/menu-bundle": "^2.1", - "symfony-cmf/routing-bundle": "^2.1" + "symfony-cmf/routing-bundle": "^2.1", + "symfony/translation": "^3.4 || ^4.1", + "symfony/form": "^3.4 || ^4.1" }, "require-dev": { - "doctrine/phpcr-odm": "^1.4|^2.0", + "doctrine/phpcr-odm": "^1.4 || ^2.0", "symfony-cmf/testing": "^2.1.11", - "symfony/phpunit-bridge": "^4.2.2" + "symfony/phpunit-bridge": "^4.2.2", + "symfony/yaml": "^3.4 || ^4.1" }, "suggest": { "friendsofsymfony/rest-bundle": "Improved handling for different output formats", diff --git a/src/CmfContentBundle.php b/src/CmfContentBundle.php index 5c2e611..140dc97 100644 --- a/src/CmfContentBundle.php +++ b/src/CmfContentBundle.php @@ -1,9 +1,11 @@ templating = $templating; @@ -99,7 +101,7 @@ public function indexAction(Request $request, $contentDocument, $template = null protected function renderResponse($contentTemplate, $params) { if ($this->viewHandler) { - if (1 === count($params)) { + if (1 === \count($params)) { $templateVar = key($params); $params = reset($params); } @@ -112,7 +114,7 @@ protected function renderResponse($contentTemplate, $params) return $this->viewHandler->handle($view); } - if (is_null($this->templating)) { + if (null === $this->templating) { $response = new Response(); $response->setContent($this->twig->render($contentTemplate, $params)); } else { diff --git a/src/DependencyInjection/CmfContentExtension.php b/src/DependencyInjection/CmfContentExtension.php index 70d2f7f..428b0d2 100644 --- a/src/DependencyInjection/CmfContentExtension.php +++ b/src/DependencyInjection/CmfContentExtension.php @@ -1,9 +1,11 @@ extras[$name]); } else { $this->extras[$name] = $value; diff --git a/src/Model/StaticContentBase.php b/src/Model/StaticContentBase.php index 6c65e59..de26c41 100644 --- a/src/Model/StaticContentBase.php +++ b/src/Model/StaticContentBase.php @@ -1,9 +1,11 @@ setAccessible(true); $v = $prop->getValue($content); - if (!is_object($value)) { + if (!\is_object($value)) { $this->assertEquals($value, $v); } } diff --git a/tests/Unit/DependencyInjection/XmlSchemaTest.php b/tests/Unit/DependencyInjection/XmlSchemaTest.php index e045384..3c466a3 100644 --- a/tests/Unit/DependencyInjection/XmlSchemaTest.php +++ b/tests/Unit/DependencyInjection/XmlSchemaTest.php @@ -1,9 +1,11 @@ Date: Thu, 28 Feb 2019 20:25:46 +0100 Subject: [PATCH 8/9] add changelog entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 543f1c2..42aa7c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +2.2.0 (unreleased) +----------------- + +* **2019-02-28**: Symfony 4.2 support without warnings + 2.1.0 ----- From 66ef506d2830af59f69148309bcd517b7f7fe656 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Fri, 1 Mar 2019 15:47:30 +0100 Subject: [PATCH 9/9] DevKit updates --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd338d0..58e7ced 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,8 +31,8 @@ env: global: - SYMFONY_DEPRECATIONS_HELPER="/.*each.*/" - SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" - - SYMFONY_PHPUNIT_VERSION=6 - - PHPUNIT_VERSION=6 + - SYMFONY_PHPUNIT_VERSION=7 + - PHPUNIT_VERSION=7 - TARGET=test matrix: