Skip to content

Commit a50228d

Browse files
ElectricMaxxxdbu
authored andcommitted
Start version 3.0 (#191)
1 parent f2dbe32 commit a50228d

17 files changed

+186
-413
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
composer.lock
22
/vendor/
3+
build/

.travis.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ language: php
1717

1818
php:
1919
- 7.1
20-
20+
- 7.2
21+
- 7.3
2122
sudo: false
2223

2324
cache:
@@ -26,25 +27,28 @@ cache:
2627
- $HOME/.composer/cache/files
2728

2829
env:
29-
matrix: SYMFONY_VERSION=4.0.*
30+
matrix: SYMFONY_VERSION=4.2.*
3031
global:
3132
- SYMFONY_DEPRECATIONS_HELPER="/.*each.*/"
3233
- SYMFONY_PHPUNIT_DIR=.phpunit SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
33-
- SYMFONY_PHPUNIT_VERSION=7.3
34-
- TEST_INSTALLATION=false
34+
- SYMFONY_PHPUNIT_VERSION=7
35+
- PHPUNIT_VERSION=7
36+
- TARGET=test
3537

3638
matrix:
3739
include:
38-
- php: 7.2
39-
env: STABILITY=dev SYMFONY_VERSION=4.0.*
40-
- php: 7.1
41-
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=2.8.* SYMFONY_DEPRECATIONS_HELPER=weak
40+
- php: 7.3
41+
env: STABILITY="dev" SYMFONY_VERSION=4.3.*
42+
- php: 7.3
43+
env: SYMFONY_VERSION=4.2.*
4244
- php: 7.1
43-
env: STABILITY=dev SYMFONY_VERSION=3.3.*
44-
- php: 7.1
45-
env: STABILITY=dev SYMFONY_VERSION=3.4.*
45+
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION=3.4.* SYMFONY_DEPRECATIONS_HELPER="/.*each.*/"
46+
- php: 7.2
47+
env: SYMFONY_VERSION=4.1.*
4648
fast_finish: true
4749
allow_failures:
50+
- php: 7.3
51+
env: STABILITY="dev" SYMFONY_VERSION=4.3.*
4852

4953
before_install:
5054
- phpenv config-rm xdebug.ini || true
@@ -55,6 +59,7 @@ before_install:
5559
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
5660

5761
install: travis_wait composer update --prefer-dist $COMPOSER_FLAGS
62+
5863
script:
5964
- if [ "${TEST_INSTALLATION}" == true ]; then make test_installation; else make test; fi
6065

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
Changelog
22
=========
33

4-
2.1.0 (unreleased)
4+
3.0.0 (unreleased)
55
------------------
6+
* **2019-02-28**: [BC-BREAK] Remove `DatabaseTestListener`, use scripts in `bin/make/` to ramp up your testing environment for several test suites
7+
* **2019-02-28**: [BC-BREAK] Introduce PHPUnit 6 Support, Remove PHPUnit 5.7.
8+
* **2019-02-28**: Add testing scenarios for Symfony 4.2 and 4.3 (allowed to fail for now)
9+
10+
2.1.0
11+
-----
612

713
* **2017-01-18**: Introduce a `TestCompilePass` to make services public, which are needed
814
in i.e. a WebTest.

Makefile

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,39 @@ ifdef BRANCH
2020
VERSION=dev-${BRANCH}
2121
endif
2222
PACKAGE=symfony-cmf/testing
23+
HAS_XDEBUG=$(shell php --modules|grep --quiet xdebug;echo $$?)
24+
2325
list:
2426
@echo 'test: will run all tests'
2527
@echo 'unit_tests: will run unit tests only'
2628

2729

28-
2930
include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk
3031

3132
.PHONY: test
32-
test: unit_tests
33+
test: build/xdebug-filter.php unit_tests
34+
lint-php:
35+
php-cs-fixer fix --ansi --verbose --diff --dry-run
36+
.PHONY: lint-php
37+
38+
int: lint-composer lint-php
39+
.PHONY: lint
40+
41+
lint-composer:
42+
composer validate
43+
.PHONY: lint-composer
44+
45+
cs-fix: cs-fix-php
46+
.PHONY: cs-fix
47+
48+
cs-fix-php:
49+
php-cs-fixer fix --verbose
50+
.PHONY: cs-fix-php
51+
52+
build:
53+
mkdir $@
54+
55+
build/xdebug-filter.php: phpunit.xml.dist build
56+
ifeq ($(HAS_XDEBUG), 0)
57+
phpunit --dump-xdebug-filter $@
58+
endif

README.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
[![Monthly Downloads](https://poser.pugx.org/symfony-cmf/testing/d/monthly)](https://packagist.org/packages/symfony-cmf/testing)
99
[![Daily Downloads](https://poser.pugx.org/symfony-cmf/testing/d/daily)](https://packagist.org/packages/symfony-cmf/testing)
1010

11-
Branch | Travis | Coveralls |
12-
------ | ------ | --------- |
13-
master | [![Build Status][travis_unstable_badge]][travis_link] | [![Coverage Status][coveralls_unstable_badge]][coveralls_unstable_link] |
11+
Branch | Travis | Coveralls | Scrutinizer |
12+
------ | ------ | --------- | ----------- |
13+
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] |
14+
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] |
1415

15-
This package is part of the [Symfony Content Management Framework (CMF)](http://cmf.symfony.com/) and licensed
16+
17+
This package is part of the [Symfony Content Management Framework (CMF)](https://cmf.symfony.com/) and licensed
1618
under the [MIT License](LICENSE).
1719

1820
**NOTE**: This is an internal tool and is not intended to be used outside of
@@ -21,24 +23,24 @@ the context of the CMF.
2123

2224
## Requirements
2325

24-
* PHP 5.6 / 7.0 / 7.1 / 7.2
25-
* Symfony 2.8 / 3.3 / 3.4 / 4.0
26+
* PHP 7.1 / 7.2 / 7.3
27+
* Symfony 3.4 / 4.0 / 4.1 / 4.2
2628
* See also the `require` section of [composer.json](composer.json)
2729

2830
## Documentation
2931

3032
For the install guide and reference, see:
3133

32-
* [symfony-cmf/testing Documentation](http://symfony.com/doc/master/cmf/components/testing/index.html)
34+
* [symfony-cmf/testing Documentation](https://symfony.com/doc/master/cmf/components/testing/index.html)
3335

3436
See also:
3537

36-
* [All Symfony CMF documentation](http://symfony.com/doc/master/cmf/index.html) - complete Symfony CMF reference
37-
* [Symfony CMF Website](http://cmf.symfony.com/) - introduction, live demo, support and community links
38+
* [All Symfony CMF documentation](https://symfony.com/doc/master/cmf/index.html) - complete Symfony CMF reference
39+
* [Symfony CMF Website](https://cmf.symfony.com/) - introduction, live demo, support and community links
3840

3941
## Support
4042

41-
For general support and questions, please use [StackOverflow](http://stackoverflow.com/questions/tagged/symfony-cmf).
43+
For general support and questions, please use [StackOverflow](https://stackoverflow.com/questions/tagged/symfony-cmf).
4244

4345
## Contributing
4446

@@ -47,7 +49,7 @@ Pull requests are welcome. Please see our
4749
guide.
4850

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

5355
Thanks to
@@ -57,14 +59,17 @@ Thanks to
5759

5860
This package is available under the [MIT license](src/Resources/meta/LICENSE).
5961

60-
[travis_legacy_badge]: https://travis-ci.org/symfony-cmf/testing.svg?branch=master
61-
[travis_stable_badge]: https://travis-ci.org/symfony-cmf/testing.svg?branch=master
62-
[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/testing.svg?branch=master
63-
[travis_link]: https://travis-ci.org/symfony-cmf/testing
64-
65-
[coveralls_legacy_badge]: https://coveralls.io/repos/github/symfony-cmf/testing/badge.svg?branch=master
66-
[coveralls_legacy_link]: https://coveralls.io/github/symfony-cmf/testing?branch=master
67-
[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/testing/badge.svg?branch=master
68-
[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/testing?branch=master
69-
[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/testing/badge.svg?branch=master
70-
[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/testing?branch=master
62+
[travis_stable_badge]: https://travis-ci.org/symfony-cmf/Testing.svg?branch=2.1
63+
[travis_stable_link]: https://travis-ci.org/symfony-cmf/Testing
64+
[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/Testing.svg?branch=dev-master
65+
[travis_unstable_link]: https://travis-ci.org/symfony-cmf/Testing
66+
67+
[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/Testing/badge.svg?branch=2.1
68+
[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/Testing?branch=2.1
69+
[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/Testing/badge.svg?branch=dev-master
70+
[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/Testing?branch=dev-master
71+
72+
[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/Testing/badges/quality-score.png?b=2.1
73+
[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/Testing/?branch=2.1
74+
[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/Testing/badges/quality-score.png?b=dev-master
75+
[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/Testing/?branch=dev-master

bin/make/functional_tests_orm.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ functional_tests_orm:
77
@${CONSOLE} doctrine:database:create --env=orm
88
@${CONSOLE} doctrine:schema:create --env=orm
99
@echo '+++ run ORM functional tests +++'
10-
@vendor/bin/simple-phpunit --testsuite "functional tests with orm"
10+
ifeq ($(HAS_XDEBUG), 0)
11+
@vendor/bin/simple-phpunit --prepend build/xdebug-filter.php -c phpunit.xml.dist --coverage-clover build/logs/clover.xml --testsuite "functional tests with orm"
12+
else
13+
@vendor/bin/simple-phpunit -c phpunit.xml.dist --testsuite "functional tests with orm"
14+
endif
1115
@${CONSOLE} doctrine:database:drop --force

bin/make/functional_tests_phpcr.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ functional_tests_phpcr:
66
@${CONSOLE} doctrine:phpcr:init:dbal --drop --force
77
@${CONSOLE} doctrine:phpcr:repository:init
88
@echo '+++ run PHPCR functional tests +++'
9-
@vendor/bin/simple-phpunit --testsuite "functional tests with phpcr"
9+
ifeq ($(HAS_XDEBUG), 0)
10+
@vendor/bin/simple-phpunit --prepend build/xdebug-filter.php -c phpunit.xml.dist --coverage-clover build/logs/clover.xml --testsuite "functional tests with phpcr"
11+
else
12+
@vendor/bin/simple-phpunit -c phpunit.xml.dist --testsuite "functional tests with phpcr"
13+
endif
1014
@${CONSOLE} doctrine:database:drop --force

bin/make/unit_tests.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
unit_tests:
33
@echo
44
@echo '+++ run unit tests +++'
5-
@vendor/bin/simple-phpunit --testsuite "unit tests"
5+
ifeq ($(HAS_XDEBUG), 0)
6+
@vendor/bin/simple-phpunit --prepend build/xdebug-filter.php -c phpunit.xml.dist --coverage-clover build/logs/clover.xml --testsuite "unit tests"
7+
else
8+
@vendor/bin/simple-phpunit -c phpunit.xml.dist --testsuite "unit tests"
9+
endif

composer.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,20 @@
1818
"friendsofsymfony/jsrouting-bundle": "^1.1 || ^2.1",
1919
"jackalope/jackalope": "^1.3",
2020
"jackalope/jackalope-doctrine-dbal": "^1.3",
21-
"symfony/browser-kit": "^2.8 || ^3.3 || ^4.0",
22-
"symfony/console": "^2.8 || ^3.3 || ^4.0",
23-
"symfony/css-selector": "^2.8 || ^3.3 || ^4.0",
24-
"symfony/debug": "^2.8 || ^3.3 || ^4.0",
25-
"symfony/dependency-injection": "^2.8 || ^3.3 || ^4.0",
26-
"symfony/doctrine-bridge": "^2.8 || ^3.3 || ^4.0",
27-
"symfony/framework-bundle": "^2.8.18 || ^3.3 || ^4.0",
28-
"symfony/http-foundation": "^2.8 || ^3.3 || ^4.0",
29-
"symfony/http-kernel": "^2.8 || ^3.3 || ^4.0",
21+
"symfony/browser-kit": "^3.4.22 || ^4.1",
22+
"symfony/console": "^3.4.22 || ^4.1",
23+
"symfony/css-selector": "^3.4.22 || ^4.1",
24+
"symfony/debug": "^3.4.22 || ^4.1",
25+
"symfony/dependency-injection": "^3.4.22 || ^4.1",
26+
"symfony/doctrine-bridge": "^3.4.22 || ^4.1",
27+
"symfony/framework-bundle": "^3.4.22 || ^4.1",
28+
"symfony/http-foundation": "^3.4.22 || ^4.1",
29+
"symfony/http-kernel": "^3.4.22 || ^4.1",
3030
"symfony/monolog-bundle": "~3.1",
31-
"symfony/process": "^2.8 || ^3.3 || ^4.0",
32-
"symfony/security-bundle": "^2.8 || ^3.3 || ^4.0",
33-
"symfony/twig-bundle": "^2.8 || ^3.3 || ^4.0"
34-
},
35-
"require-dev": {
36-
"symfony/phpunit-bridge": "^4.1"
31+
"symfony/process": "^3.4.22 || ^4.1",
32+
"symfony/security-bundle": "^3.4.22 || ^4.1",
33+
"symfony/twig-bundle": "^3.4.22 || ^4.1",
34+
"symfony/phpunit-bridge": "^4.2.2"
3735
},
3836
"autoload": {
3937
"psr-4": {

php_cs.dist

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
/**
4+
* DO NOT EDIT THIS FILE!
5+
*
6+
* It's auto-generated by sonata-project/dev-kit package.
7+
*/
8+
9+
$header = <<<'HEADER'
10+
############################################################################
11+
# This file is part of the Symfony CMF package. #
12+
# #
13+
# (c) 2011-2017 Symfony CMF #
14+
# #
15+
# For the full copyright and license information, please view the LICENSE #
16+
# file that was distributed with this source code. #
17+
############################################################################
18+
HEADER;
19+
20+
$rules = [
21+
'@Symfony' => true,
22+
'@Symfony:risky' => true,
23+
'array_syntax' => [
24+
'syntax' => 'short',
25+
],
26+
'combine_consecutive_issets' => true,
27+
'combine_consecutive_unsets' => true,
28+
'header_comment' => [
29+
'header' => $header,
30+
],
31+
'no_extra_blank_lines' => true,
32+
'no_php4_constructor' => true,
33+
'no_useless_else' => true,
34+
'no_useless_return' => true,
35+
'ordered_class_elements' => true,
36+
'ordered_imports' => true,
37+
'phpdoc_order' => true,
38+
'@PHP56Migration' => true,
39+
'@PHP56Migration:risky' => true,
40+
'@PHPUnit57Migration:risky' => true,
41+
'@PHP70Migration' => true,
42+
'@PHP70Migration:risky' => true,
43+
'@PHPUnit60Migration:risky' => true,
44+
'@PHP71Migration' => true,
45+
'@PHP71Migration:risky' => true,
46+
'compact_nullable_typehint' => true,
47+
'void_return' => null,
48+
'strict_comparison' => true,
49+
'strict_param' => true,
50+
'php_unit_strict' => true,
51+
];
52+
53+
54+
$finder = PhpCsFixer\Finder::create()
55+
->in(__DIR__)
56+
->exclude('Tests/Fixtures')
57+
->exclude('tests/Fixtures')
58+
->exclude('Resources/skeleton')
59+
->exclude('Resources/public/vendor')
60+
;
61+
62+
return PhpCsFixer\Config::create()
63+
->setFinder($finder)
64+
->setRiskyAllowed(true)
65+
->setRules($rules)
66+
->setUsingCache(true)
67+
;

0 commit comments

Comments
 (0)