From 878672c1083888ad0346955e43ef8f8f7f193665 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Tue, 29 Jan 2019 00:09:21 +0100 Subject: [PATCH 01/11] DevKit updates --- Makefile | 3 +-- README.md | 25 +++++++++++++++---------- composer.json | 6 +++--- src/Resources/meta/LICENSE | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index a4f871c..3c21292 100644 --- a/Makefile +++ b/Makefile @@ -25,9 +25,8 @@ list: @echo 'unit_tests: will run unit tests only' - @echo 'test_installation: will run installation test' + include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk -include ${TESTING_SCRIPTS_DIR}/make/test_installation.mk .PHONY: test test: unit_tests diff --git a/README.md b/README.md index 1c7ae65..732337d 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,11 @@ [![Monthly Downloads](https://poser.pugx.org/symfony-cmf/tree-browser-bundle/d/monthly)](https://packagist.org/packages/symfony-cmf/tree-browser-bundle) [![Daily Downloads](https://poser.pugx.org/symfony-cmf/tree-browser-bundle/d/daily)](https://packagist.org/packages/symfony-cmf/tree-browser-bundle) -Branch | Travis | Coveralls | ------- | ------ | --------- | -master | [![Build Status][travis_unstable_badge]][travis_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] | +Branch | Travis | Coveralls | Scrutinizer | +------ | ------ | --------- | ----------- | +master | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] | [![Scrutinizer Status][scrutinizer_stable_badge]][scrutinizer_stable_link] | +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)](http://cmf.symfony.com/) and licensed under the [MIT License](LICENSE). @@ -20,15 +22,15 @@ The TreeBrowserBundle provides tree navigation for the Content Repository. ## 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/tree-browser-bundle Documentation](https://symfony.com/doc/current/cmf/bundles/tree_browser/index.html) +* [symfony-cmf/tree-browser-bundle Documentation](http://symfony.com/doc/master/cmf/bundle/tree-browser-bundle/index.html) See also: @@ -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/tree-browser-bundle.svg?branch=master [travis_stable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=master +[travis_stable_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle [travis_unstable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=master -[travis_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle +[travis_unstable_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle -[coveralls_legacy_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=master -[coveralls_legacy_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=master [coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=master [coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=master [coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=master [coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=master + +[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=master +[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=master +[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=master +[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=master diff --git a/composer.json b/composer.json index 07d7c68..452cca0 100644 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ } ], "require": { - "php": "^7.1", + "php": "^7.2", "symfony-cmf/resource-rest-bundle": "^1.0" }, "require-dev": { - "symfony/form": "^2.8 || ^3.3 || ^4.0", + "symfony/form": "^3.4 || ^4.0", "symfony-cmf/testing": "^2.1.8", - "symfony/phpunit-bridge": "^4.2.2" + "symfony/phpunit-bridge": "^3.4 || ^4.0" }, "autoload": { "psr-4": { diff --git a/src/Resources/meta/LICENSE b/src/Resources/meta/LICENSE index f6f0a35..c829e87 100644 --- a/src/Resources/meta/LICENSE +++ b/src/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Symfony Cmf Tree Browser Bundle +Symfony CMF Tree Browser Bundle The MIT License From 2ead44f7004e4f2f490c822686482bfdbb0eb54e Mon Sep 17 00:00:00 2001 From: ElectricMaxxx Date: Tue, 29 Jan 2019 00:13:46 +0100 Subject: [PATCH 02/11] let composer point on 3.0 --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 452cca0..76c50f6 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,6 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1-dev" } } } From 2dc838fc8d260faacbb7de5fc1af180fd2997f99 Mon Sep 17 00:00:00 2001 From: ElectricMaxxx Date: Tue, 29 Jan 2019 00:16:30 +0100 Subject: [PATCH 03/11] modify travis.yml --- .travis.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7233365..8f9a7e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ language: php php: - - 7.1 - 7.2 + - 7.3 node_js: - - 6 - - 7 - 8 + - 9 + - 10 sudo: required @@ -41,13 +41,10 @@ matrix: node_js: 8 env: LANG=js - php: 7.2 - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak + env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.2 - env: SYMFONY_VERSION=3.3.* - - env: TEST_INSTALLATION=true + env: SYMFONY_VERSION=4.2 fast_finish: true - allow_failures: - - env: TEST_INSTALLATION=true before_install: - if [ "$LANG" = "js" ]; then npm run travis:install; fi @@ -66,6 +63,3 @@ script: - if [ "$LANG" = "js" ]; then npm test; fi - if [ "$LANG" = "php" ]; then make test; fi -notifications: - irc: "irc.freenode.org#symfony-cmf" - email: "symfony-cmf-devs@googlegroups.com" From 999682f38ecc17455043fab2cdce177597f7da71 Mon Sep 17 00:00:00 2001 From: ElectricMaxxx Date: Tue, 29 Jan 2019 00:24:05 +0100 Subject: [PATCH 04/11] also change include --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8f9a7e3..ec11108 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,19 +30,19 @@ env: matrix: include: - - php: 7.1 + - php: 7.2 dist: trusty - node_js: 6 + node_js: 8 env: LANG=js - - php: 7.1 - node_js: 7 + - php: 7.2 + node_js: 9 env: LANG=js - - php: 7.1 - node_js: 8 + - php: 7.2 + node_js: 10 env: LANG=js - php: 7.2 env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.2 + - php: 7.3 env: SYMFONY_VERSION=4.2 fast_finish: true From ddb4660a94ba354f435544a77f6c0a8504463a02 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Tue, 29 Jan 2019 05:29:53 +0100 Subject: [PATCH 05/11] DevKit updates --- README.md | 30 +++++++++++++++--------------- composer.json | 1 + 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 732337d..3ec320e 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Branch | Travis | Coveralls | Scrutinizer | ------ | ------ | --------- | ----------- | -master | [![Build Status][travis_stable_badge]][travis_stable_link] | [![Coverage Status][coveralls_stable_badge]][coveralls_stable_link] | [![Scrutinizer Status][scrutinizer_stable_badge]][scrutinizer_stable_link] | -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] | +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 @@ -30,12 +30,12 @@ The TreeBrowserBundle provides tree navigation for the Content Repository. For the install guide and reference, see: -* [symfony-cmf/tree-browser-bundle Documentation](http://symfony.com/doc/master/cmf/bundle/tree-browser-bundle/index.html) +* [symfony-cmf/tree-browser-bundle Documentation](https://symfony.com/doc/master/cmf/bundle/tree-browser-bundle/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 @@ -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/tree-browser-bundle.svg?branch=master +[travis_stable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=3.0-dev [travis_stable_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle -[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=master +[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=3.0-dev [travis_unstable_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle -[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=master -[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=master -[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=master -[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=master +[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=3.0-dev +[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=3.0-dev +[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=3.0-dev +[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=3.0-dev -[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=master -[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=master -[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=master -[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=master +[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=3.0-dev +[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=3.0-dev +[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=3.0-dev +[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=3.0-dev diff --git a/composer.json b/composer.json index 76c50f6..e42e957 100644 --- a/composer.json +++ b/composer.json @@ -36,6 +36,7 @@ }, "extra": { "branch-alias": { + "dev-master": "3.0-dev" } } } From ba58528bbd66b831d8b3f23e474ba00dd4cd71c4 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Tue, 29 Jan 2019 06:05:10 +0100 Subject: [PATCH 06/11] DevKit updates --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3ec320e..2c6aa3f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Branch | Travis | Coveralls | Scrutinizer | 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 TreeBrowserBundle provides tree navigation for the Content Repository. @@ -39,7 +39,7 @@ See also: ## 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 @@ -48,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 From 521df0e136f14e4653a704f16283b0424b1c6a5c Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Tue, 29 Jan 2019 06:39:35 +0100 Subject: [PATCH 07/11] DevKit updates --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2c6aa3f..b583c2c 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] | +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/tree-browser-bundle.svg?branch=3.0-dev +[travis_stable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=2.1 [travis_stable_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle [travis_unstable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=3.0-dev [travis_unstable_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle -[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=3.0-dev -[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=3.0-dev +[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=2.1 +[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=2.1 [coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=3.0-dev [coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=3.0-dev -[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=3.0-dev -[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=3.0-dev +[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=2.1 +[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=2.1 [scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=3.0-dev [scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=3.0-dev From 430b1fb06d3f777ea295458c1b96a6d4c2f31296 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Wed, 30 Jan 2019 23:43:45 +0100 Subject: [PATCH 08/11] DevKit updates --- Makefile | 9 ++++++++- README.md | 26 +++++++++++++------------- composer.json | 4 ++-- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 3c21292..7dede54 100644 --- a/Makefile +++ b/Makefile @@ -14,19 +14,26 @@ ############################################################################ 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/tree-browser-bundle + list: @echo 'test: will run all tests' @echo 'unit_tests: will run unit tests only' - + @echo 'test_installation: will run installation test' include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk +include ${TESTING_SCRIPTS_DIR}/make/test_installation.mk .PHONY: test test: unit_tests diff --git a/README.md b/README.md index b583c2c..4aa0c32 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ 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] | +1.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] | +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 TreeBrowserBundle provides tree navigation for the Content Repository. ## 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) @@ -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/tree-browser-bundle.svg?branch=2.1 +[travis_stable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=1.1 [travis_stable_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle -[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=3.0-dev +[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/tree-browser-bundle.svg?branch=dev-master [travis_unstable_link]: https://travis-ci.org/symfony-cmf/tree-browser-bundle -[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=2.1 -[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=2.1 -[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=3.0-dev -[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=3.0-dev +[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=1.1 +[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=1.1 +[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/tree-browser-bundle/badge.svg?branch=dev-master +[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/tree-browser-bundle?branch=dev-master -[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=2.1 -[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=2.1 -[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=3.0-dev -[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=3.0-dev +[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=1.1 +[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=1.1 +[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/badges/quality-score.png?b=dev-master +[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/tree-browser-bundle/?branch=dev-master diff --git a/composer.json b/composer.json index e42e957..43f4f39 100644 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ } ], "require": { - "php": "^7.2", + "php": "^7.1", "symfony-cmf/resource-rest-bundle": "^1.0" }, "require-dev": { "symfony/form": "^3.4 || ^4.0", "symfony-cmf/testing": "^2.1.8", - "symfony/phpunit-bridge": "^3.4 || ^4.0" + "symfony/phpunit-bridge": "^4.2.2" }, "autoload": { "psr-4": { From e00a14e508e5dc506c27eabb0c01219eed09ba9a Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Fri, 1 Mar 2019 16:55:01 +0100 Subject: [PATCH 09/11] DevKit updates --- .php_cs.dist | 64 +++++++++++++++++++++++++++++++++++ .styleci.yml | 2 +- .travis/after_success_test.sh | 5 +++ .travis/install_lint.sh | 11 ++++++ .travis/install_test.sh | 19 +++++++++++ Makefile | 54 +++++++++++++++++++++++------ README.md | 2 +- composer.json | 2 +- phpunit.xml.dist | 34 +++++++++++-------- src/Resources/meta/LICENSE | 2 +- 10 files changed, 167 insertions(+), 28 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/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 7dede54..21a5c79 100644 --- a/Makefile +++ b/Makefile @@ -7,33 +7,67 @@ ############################################################################ # 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/tree-browser-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 'test_installation: will run installation test' -include ${TESTING_SCRIPTS_DIR}/make/unit_tests.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/test_installation.mk) +ifneq ($(strip $(EXTRA_INCLUDES)),) + contents := $(shell echo including extra rules $(EXTRA_INCLUDES)) + include $(EXTRA_INCLUDES) + endif .PHONY: test -test: unit_tests +test: build/xdebug-filter.php$ +ifneq ($(strip $(wildcard ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk)),) + @make unit_tests +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 4aa0c32..2a5cefa 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The TreeBrowserBundle provides tree navigation for the Content Repository. ## 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 43f4f39..8168c3a 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "symfony-cmf/resource-rest-bundle": "^1.0" }, "require-dev": { - "symfony/form": "^3.4 || ^4.0", + "symfony/form": "^3.4 || ^4.1", "symfony-cmf/testing": "^2.1.8", "symfony/phpunit-bridge": "^4.2.2" }, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5e67a2c..015b9f6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,24 +2,30 @@ - - + + + + ./tests/Unit - + + - - - src - - Resources/ - - - + + + src/ + + Resources/ + + + - + + + + diff --git a/src/Resources/meta/LICENSE b/src/Resources/meta/LICENSE index c829e87..87ddb99 100644 --- a/src/Resources/meta/LICENSE +++ b/src/Resources/meta/LICENSE @@ -2,7 +2,7 @@ Symfony CMF Tree Browser 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 776d868e0f2eef7c559a40abb65fb0842b062227 Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Sat, 2 Mar 2019 00:19:05 +0100 Subject: [PATCH 10/11] movements in travis config, fix cs for php --- .gitignore | 2 ++ .travis.yml | 27 ++++++++++++------- src/CmfTreeBrowserBundle.php | 4 ++- .../CmfTreeBrowserExtension.php | 4 ++- src/DependencyInjection/Configuration.php | 4 ++- src/Description/IconEnhancer.php | 8 +++--- src/Form/Type/TreeSelectType.php | 4 ++- tests/Unit/Form/Type/TreeSelectTypeTest.php | 9 ++++--- 8 files changed, 41 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 946a527..0bcc41d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ composer.lock composer.phar Tests/Resources/app/cache Tests/Resources/app/logs +build +.php_cs.cache diff --git a/.travis.yml b/.travis.yml index ec11108..8ff73cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: php php: + - 7.1 - 7.2 - 7.3 node_js: @@ -15,15 +16,13 @@ cache: - $HOME/.composer/cache/files # node_modules are not cached, because we don't shrinkwrap the deps. # - node_modules - -env: env: - matrix: SYMFONY_VERSION=^4.0 + matrix: SYMFONY_VERSION=4.2.* global: - SYMFONY_DEPRECATIONS_HELPER="/.*each.*/" - SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml" - - KERNEL_CLASS=Symfony\Cmf\Bundle\RoutingBundle\Tests\Fixtures\App\Kernel - - SYMFONY_PHPUNIT_VERSION=5.7 + - SYMFONY_PHPUNIT_VERSION=7 + - PHPUNIT_VERSION=7 - TEST_INSTALLATION=false - LANG=php - NODE_RELEASE=6.x @@ -40,11 +39,18 @@ matrix: - php: 7.2 node_js: 10 env: LANG=js - - php: 7.2 + - env: TARGET=lint + - php: 7.1 env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.3 + - php: 7.2 env: SYMFONY_VERSION=4.2 + - php: 7.3 + env: STABILITY="dev" SYMFONY_VERSION=4.3.* fast_finish: true + allow_failures: + - php: 7.3 + env: STABILITY="dev" SYMFONY_VERSION=4.3.* + - env: TARGET=test_installation before_install: - if [ "$LANG" = "js" ]; then npm run travis:install; fi @@ -57,9 +63,10 @@ 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 + +install: + - if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi; script: - if [ "$LANG" = "js" ]; then npm test; fi - - if [ "$LANG" = "php" ]; then make test; fi - + - if [ "$LANG" = "php" ]; make $TARGET; fi diff --git a/src/CmfTreeBrowserBundle.php b/src/CmfTreeBrowserBundle.php index 55ac73a..1595e43 100644 --- a/src/CmfTreeBrowserBundle.php +++ b/src/CmfTreeBrowserBundle.php @@ -1,9 +1,11 @@ getResource()->getPayload()); + $class = \get_class($description->getResource()->getPayload()); if (isset($this->classMap[$class])) { $class = $this->classMap[$class]; } @@ -49,7 +51,7 @@ public function supports(PuliResource $resource) } $payload = $resource->getPayload(); - $payloadClass = get_class($payload); + $payloadClass = \get_class($payload); if (isset($this->iconMap[$payloadClass]) || isset($this->classMap[$payloadClass])) { return true; diff --git a/src/Form/Type/TreeSelectType.php b/src/Form/Type/TreeSelectType.php index 0a026ec..1a28384 100644 --- a/src/Form/Type/TreeSelectType.php +++ b/src/Form/Type/TreeSelectType.php @@ -1,9 +1,11 @@ assertEquals('/cms/content/about', $form->getData()); } - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ public function testInvalidWidgetValue() { + $this->expectException(\Symfony\Component\OptionsResolver\Exception\InvalidOptionsException::class); + $this->factory->create(TreeSelectType::class, null, [ 'widget' => 'fake', ]); From cf1ba14582571e676f55f4a033cb82eb22525b8a Mon Sep 17 00:00:00 2001 From: electricmaxxx Date: Sat, 2 Mar 2019 00:25:31 +0100 Subject: [PATCH 11/11] fix travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8ff73cb..eb911b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,4 +69,4 @@ install: script: - if [ "$LANG" = "js" ]; then npm test; fi - - if [ "$LANG" = "php" ]; make $TARGET; fi + - if [ "$LANG" = "php" ]; then make $TARGET; fi