Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

DevKit updates #175

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ composer.lock
composer.phar
Tests/Resources/app/cache
Tests/Resources/app/logs
build
.php_cs.cache
64 changes: 64 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php

/**
* DO NOT EDIT THIS FILE!
*
* It's auto-generated by sonata-project/dev-kit package.
*/

$header = <<<'HEADER'
This file is part of the Symfony CMF package.

(c) Symfony CMF

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
HEADER;

$rules = [
'@Symfony' => 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)
;
2 changes: 1 addition & 1 deletion .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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. #
Expand Down
49 changes: 25 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ language: php
php:
- 7.1
- 7.2
- 7.3
node_js:
- 6
- 7
- 8
- 9
- 10

sudo: required

Expand All @@ -15,39 +16,41 @@ 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

matrix:
include:
- php: 7.1
- php: 7.2
dist: trusty
node_js: 6
env: LANG=js
- php: 7.1
node_js: 7
env: LANG=js
- php: 7.1
node_js: 8
env: LANG=js
- php: 7.2
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
node_js: 9
env: LANG=js
- php: 7.2
env: SYMFONY_VERSION=3.3.*
- env: TEST_INSTALLATION=true
node_js: 10
env: LANG=js
- env: TARGET=lint
- php: 7.1
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=3.4.* SYMFONY_DEPRECATIONS_HELPER=weak
- php: 7.2
env: SYMFONY_VERSION=4.2
- php: 7.3
env: STABILITY="dev" SYMFONY_VERSION=4.3.*
fast_finish: true
allow_failures:
- env: TEST_INSTALLATION=true
- 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
Expand All @@ -60,12 +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

notifications:
irc: "irc.freenode.org#symfony-cmf"
email: "symfony-cmf-devs@googlegroups.com"
- if [ "$LANG" = "php" ]; then make $TARGET; fi
5 changes: 5 additions & 0 deletions .travis/after_success_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#!/usr/bin/env sh
set -ev

coveralls -v
11 changes: 11 additions & 0 deletions .travis/install_lint.sh
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions .travis/install_test.sh
Original file line number Diff line number Diff line change
@@ -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}
50 changes: 45 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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. #
Expand All @@ -20,14 +20,54 @@ 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
49 changes: 27 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,38 @@
[![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 |
------ | ------ | --------- | ----------- |
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)](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.


## Requirements

* PHP 7.1 / 7.2
* Symfony 2.8 / 3.3 / 3.4 / 4.0
* PHP 7.1 / 7.2 / 7.3
* Symfony 3.4 / 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](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

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

Expand All @@ -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
Expand All @@ -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_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

[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
[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=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=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=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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"symfony-cmf/resource-rest-bundle": "^1.0"
},
"require-dev": {
"symfony/form": "^2.8 || ^3.3 || ^4.0",
"symfony/form": "^3.4 || ^4.1",
"symfony-cmf/testing": "^2.1.8",
"symfony/phpunit-bridge": "^4.2.2"
},
Expand All @@ -36,7 +36,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
"dev-master": "3.0-dev"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you starting a new major version? i would rather not if we can avoid it

}
}
}
Loading