From cada13b6984739c269ba3140c3a92c29fab32978 Mon Sep 17 00:00:00 2001
From: electricmaxxx <maximilian.berghoff@gmx.de>
Date: Tue, 29 Jan 2019 06:30:17 +0100
Subject: [PATCH 1/7] DevKit updates

---
 .travis.yml                | 25 +++++++++----------
 Makefile                   |  3 +--
 README.md                  | 49 +++++++++++++++++++++-----------------
 composer.json              |  8 +++----
 src/Resources/meta/LICENSE |  2 +-
 5 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e708382f..6df1aa11 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,28 +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"
     - KERNEL_CLASS=Symfony\Cmf\Bundle\MenuBundle\Tests\Fixtures\App\Kernel
-    - SYMFONY_PHPUNIT_VERSION=5.7
-    - TEST_INSTALLATION=false
+    - 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: SYMFONY_VERSION="4.2.*"
+    - php: "7.2"
+      env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION="3.4.*" SYMFONY_DEPRECATIONS_HELPER="weak"
+    - php: "7.3"
+      env: SYMFONY_VERSION="4.0.*"
+    - php: "7.3"
+      env: 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 7f704287..7f472719 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 5a532f0c..4368f60b 100644
--- a/README.md
+++ b/README.md
@@ -8,11 +8,13 @@
 [![Monthly Downloads](https://poser.pugx.org/symfony-cmf/menu-bundle/d/monthly)](https://packagist.org/packages/symfony-cmf/menu-bundle)
 [![Daily Downloads](https://poser.pugx.org/symfony-cmf/menu-bundle/d/daily)](https://packagist.org/packages/symfony-cmf/menu-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 MenuBundle provides menus from a doctrine object manager with the help of KnpMenuBundle.
@@ -20,24 +22,24 @@ The MenuBundle provides menus from a doctrine object manager with the help of Kn
 
 ## 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/menu-bundle Documentation](http://symfony.com/doc/master/cmf/bundles/menu/index.html)
+* [symfony-cmf/menu-bundle Documentation](https://symfony.com/doc/master/cmf/bundles/menu/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/menu-bundle.svg?branch=master
-[travis_stable_badge]: https://travis-ci.org/symfony-cmf/menu-bundle.svg?branch=master
-[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/menu-bundle.svg?branch=master
-[travis_link]: https://travis-ci.org/symfony-cmf/menu-bundle
-
-[coveralls_legacy_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=master
-[coveralls_legacy_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=master
-[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=master
-[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=master
-[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=master
-[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=master
+[travis_stable_badge]: https://travis-ci.org/symfony-cmf/menu-bundle.svg?branch=3.0-dev
+[travis_stable_link]: https://travis-ci.org/symfony-cmf/menu-bundle
+[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/menu-bundle.svg?branch=3.0-dev
+[travis_unstable_link]: https://travis-ci.org/symfony-cmf/menu-bundle
+
+[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=3.0-dev
+[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=3.0-dev
+[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=3.0-dev
+[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=3.0-dev
+
+[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/badges/quality-score.png?b=3.0-dev
+[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/?branch=3.0-dev
+[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/badges/quality-score.png?b=3.0-dev
+[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/?branch=3.0-dev
diff --git a/composer.json b/composer.json
index 5c16ea5f..e34db27c 100644
--- a/composer.json
+++ b/composer.json
@@ -15,15 +15,15 @@
         }
     ],
     "require": {
-        "php": "^7.1",
-        "symfony/framework-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/validator": "^3.4 || ^4.0",
         "knplabs/knp-menu-bundle": "^2.2.0",
         "knplabs/knp-menu": "^2.0.0"
     },
     "require-dev": {
         "symfony/monolog-bundle": "~3.1",
-        "symfony/phpunit-bridge": "^3.3 || ^4.0",
+        "symfony/phpunit-bridge": "^3.4 || ^4.0",
         "symfony-cmf/routing-bundle": "^1.4 || ^2.0",
         "symfony-cmf/testing": "^2.1.8",
         "twig/twig": "^1.35 || ^2.4.4",
diff --git a/src/Resources/meta/LICENSE b/src/Resources/meta/LICENSE
index 2bc0b528..61229a1e 100644
--- a/src/Resources/meta/LICENSE
+++ b/src/Resources/meta/LICENSE
@@ -1,4 +1,4 @@
-Symfony Cmf Menu Bundle
+Symfony CMF Menu Bundle
 
     The MIT License
 

From a7557ee6e5cc8e167fa27290e3d1eed0b0bd695d Mon Sep 17 00:00:00 2001
From: electricmaxxx <maximilian.berghoff@gmx.de>
Date: Wed, 30 Jan 2019 22:54:18 +0100
Subject: [PATCH 2/7] DevKit updates

---
 .travis.yml   | 29 +++++++++++++++++------------
 Makefile      |  2 +-
 README.md     | 26 +++++++++++++-------------
 composer.json |  4 ++--
 4 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 6df1aa11..c7e0e1de 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,27 @@ 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\MenuBundle\Tests\Fixtures\App\Kernel
-    - SYMFONY_PHPUNIT_VERSION=5.7.26
+    - SYMFONY_PHPUNIT_VERSION=7
+    - TEST_INSTALLATION=false
 
 matrix:
   include:
-    - php: "7.3"
-      env: SYMFONY_VERSION="4.2.*"
-    - php: "7.2"
-      env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_VERSION="3.4.*" SYMFONY_DEPRECATIONS_HELPER="weak"
-    - php: "7.3"
-      env: SYMFONY_VERSION="4.0.*"
-    - php: "7.3"
-      env: 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.*
   fast_finish: true
   allow_failures:
+    - php: 7.3
+      env: STABILITY="dev" SYMFONY_VERSION=4.3.*
 
 before_install:
   - phpenv config-rm xdebug.ini || true
diff --git a/Makefile b/Makefile
index 7f472719..c41febcc 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ ifdef BRANCH
 	VERSION=dev-${BRANCH}
 endif
 PACKAGE=symfony-cmf/menu-bundle
-export KERNEL_CLASS=Symfony\Cmf\Bundle\MenuBundle\Tests\Fixtures\App\Kernel
+
 list:
 	@echo 'test:                    will run all tests'
 	@echo 'unit_tests:               will run unit tests only'
diff --git a/README.md b/README.md
index 4368f60b..225ba36c 100644
--- a/README.md
+++ b/README.md
@@ -10,8 +10,8 @@
 
 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] |
+2.2   | [![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 MenuBundle provides menus from a doctrine object manager with the help of Kn
 
 ## 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/menu-bundle.svg?branch=3.0-dev
+[travis_stable_badge]: https://travis-ci.org/symfony-cmf/menu-bundle.svg?branch=2.2
 [travis_stable_link]: https://travis-ci.org/symfony-cmf/menu-bundle
-[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/menu-bundle.svg?branch=3.0-dev
+[travis_unstable_badge]: https://travis-ci.org/symfony-cmf/menu-bundle.svg?branch=dev-master
 [travis_unstable_link]: https://travis-ci.org/symfony-cmf/menu-bundle
 
-[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=3.0-dev
-[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=3.0-dev
-[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=3.0-dev
-[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=3.0-dev
+[coveralls_stable_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=2.2
+[coveralls_stable_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=2.2
+[coveralls_unstable_badge]: https://coveralls.io/repos/github/symfony-cmf/menu-bundle/badge.svg?branch=dev-master
+[coveralls_unstable_link]: https://coveralls.io/github/symfony-cmf/menu-bundle?branch=dev-master
 
-[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/badges/quality-score.png?b=3.0-dev
-[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/?branch=3.0-dev
-[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/badges/quality-score.png?b=3.0-dev
-[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/?branch=3.0-dev
+[scrutinizer_stable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/badges/quality-score.png?b=2.2
+[scrutinizer_stable_link]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/?branch=2.2
+[scrutinizer_unstable_badge]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/badges/quality-score.png?b=dev-master
+[scrutinizer_unstable_link]: https://scrutinizer-ci.com/g/symfony-cmf/menu-bundle/?branch=dev-master
diff --git a/composer.json b/composer.json
index e34db27c..feae914c 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,7 @@
         }
     ],
     "require": {
-        "php": "^7.2",
+        "php": "^7.1",
         "symfony/framework-bundle": "^3.4 || ^4.0",
         "symfony/validator": "^3.4 || ^4.0",
         "knplabs/knp-menu-bundle": "^2.2.0",
@@ -23,7 +23,7 @@
     },
     "require-dev": {
         "symfony/monolog-bundle": "~3.1",
-        "symfony/phpunit-bridge": "^3.4 || ^4.0",
+        "symfony/phpunit-bridge": "^4.2.2",
         "symfony-cmf/routing-bundle": "^1.4 || ^2.0",
         "symfony-cmf/testing": "^2.1.8",
         "twig/twig": "^1.35 || ^2.4.4",

From 05b850b453f71b3c3a5db8d335a777ac1bfb38c2 Mon Sep 17 00:00:00 2001
From: electricmaxxx <maximilian.berghoff@gmx.de>
Date: Wed, 30 Jan 2019 23:42:18 +0100
Subject: [PATCH 3/7] DevKit updates

---
 .travis.yml | 2 +-
 Makefile    | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index c7e0e1de..5b2bf92f 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 c41febcc..e89a11ec 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 2e7dd5fd70e88baaab083e22f432254d297280d0 Mon Sep 17 00:00:00 2001
From: electricmaxxx <maximilian.berghoff@gmx.de>
Date: Fri, 1 Mar 2019 15:53:37 +0100
Subject: [PATCH 4/7] DevKit updates

---
 .php_cs.dist                  | 64 +++++++++++++++++++++++++++++++++++
 .styleci.yml                  |  2 +-
 .travis.yml                   | 25 ++++++++------
 .travis/after_success_test.sh |  5 +++
 .travis/install_lint.sh       | 11 ++++++
 .travis/install_test.sh       | 19 +++++++++++
 Makefile                      | 58 +++++++++++++++++++++++++------
 README.md                     |  2 +-
 composer.json                 |  4 +--
 phpunit.xml.dist              | 40 +++++++++++++---------
 src/Resources/meta/LICENSE    |  2 +-
 11 files changed, 191 insertions(+), 41 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 00000000..5759af56
--- /dev/null
+++ b/.php_cs.dist
@@ -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)
+;
diff --git a/.styleci.yml b/.styleci.yml
index 2bdb04b1..c721eb61 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 5b2bf92f..bd28a5c0 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,21 +29,22 @@ 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
+    - SYMFONY_PHPUNIT_VERSION=7
+    - PHPUNIT_VERSION=7
+    - 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.*
   fast_finish: true
@@ -59,9 +60,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 00000000..98374202
--- /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 00000000..864c751e
--- /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 00000000..a0335009
--- /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 e89a11ec..3b6f995c 100644
--- a/Makefile
+++ b/Makefile
@@ -7,33 +7,71 @@
 ############################################################################
 # 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/menu-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'
 
-
-include ${TESTING_SCRIPTS_DIR}/make/unit_tests.mk
-include ${TESTING_SCRIPTS_DIR}/make/functional_tests_phpcr.mk
+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
 
 .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 225ba36c..6008e22f 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ The MenuBundle provides menus from a doctrine object manager with the help of Kn
 ## 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 feae914c..62c11d9d 100644
--- a/composer.json
+++ b/composer.json
@@ -16,8 +16,8 @@
     ],
     "require": {
         "php": "^7.1",
-        "symfony/framework-bundle": "^3.4 || ^4.0",
-        "symfony/validator": "^3.4 || ^4.0",
+        "symfony/framework-bundle": "^3.4 || ^4.1",
+        "symfony/validator": "^3.4 || ^4.1",
         "knplabs/knp-menu-bundle": "^2.2.0",
         "knplabs/knp-menu": "^2.0.0"
     },
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index b6e6e63a..35361c27 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -2,27 +2,35 @@
 
 <!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
 <phpunit
-    colors="true"
-    bootstrap="vendor/symfony-cmf/testing/bootstrap/bootstrap.php"
-    >
+	colors="true"
+	bootstrap="vendor/symfony-cmf/testing/bootstrap/bootstrap.php"
+>
 
-    <testsuites>
-        <testsuite name="unit tests">
+	<testsuites>
+
+		
+		<testsuite name="unit tests">
             <directory>./tests/Unit</directory>
         </testsuite>
-
+                
         <testsuite name="functional tests with phpcr">
             <directory>./tests/Functional</directory>
+            <exclude>./tests/Functional/Doctrine/Orm</exclude>
         </testsuite>
-    </testsuites>
+                
+	</testsuites>
+
+	<filter>
+		<whitelist addUncoveredFilesFromWhitelist="true">
+			<directory>src/</directory>
+			<exclude>
+				<directory>Resources/</directory>
+			</exclude>
+		</whitelist>
+	</filter>
+
+	<php>
 
-    <filter>
-        <whitelist addUncoveredFilesFromWhitelist="true">
-            <directory>src</directory>
-            <exclude>
-                <file>*Bundle.php</file>
-                <directory>Resources/</directory>
-            </exclude>
-        </whitelist>
-    </filter>
+        <env name="KERNEL_CLASS" value="\Symfony\Cmf\Bundle\MenuBundle\Tests\Fixtures\App\Kernel" />
+	</php>
 </phpunit>
diff --git a/src/Resources/meta/LICENSE b/src/Resources/meta/LICENSE
index 61229a1e..0041ef75 100644
--- a/src/Resources/meta/LICENSE
+++ b/src/Resources/meta/LICENSE
@@ -2,7 +2,7 @@ Symfony CMF Menu 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 f46063ab04afc24f9133bc29e06456aa298bed41 Mon Sep 17 00:00:00 2001
From: electricmaxxx <maximilian.berghoff@gmx.de>
Date: Fri, 1 Mar 2019 23:45:19 +0100
Subject: [PATCH 5/7] cs fixes for php and its strictness

---
 .gitignore                                    |  2 ++
 composer.json                                 |  2 +-
 src/CmfMenuBundle.php                         |  4 ++-
 src/DependencyInjection/CmfMenuExtension.php  |  6 ++--
 .../Compiler/DecorateMenuFactoryPass.php      |  4 ++-
 .../Compiler/ValidationPass.php               |  4 ++-
 src/DependencyInjection/Configuration.php     |  4 ++-
 src/Doctrine/Phpcr/Menu.php                   |  4 ++-
 src/Doctrine/Phpcr/MenuNode.php               |  4 ++-
 src/Doctrine/Phpcr/MenuNodeBase.php           |  4 ++-
 src/Event/CreateMenuItemFromNodeEvent.php     |  4 ++-
 src/Event/Events.php                          |  6 ++--
 src/Extension/ContentExtension.php            |  8 +++--
 src/Loader/VotingNodeLoader.php               |  6 ++--
 src/Model/Menu.php                            |  4 ++-
 src/Model/MenuNode.php                        | 11 +++---
 src/Model/MenuNodeBase.php                    |  4 ++-
 src/Model/MenuNodeReferrersInterface.php      |  4 ++-
 src/Model/MenuOptionsInterface.php            |  4 ++-
 src/Provider/PhpcrMenuProvider.php            | 36 ++++++++++---------
 .../CreateMenuItemFromNodeListener.php        |  4 ++-
 .../Voter/MenuContentVoter.php                |  6 ++--
 src/QuietFactory.php                          |  6 ++--
 src/Voter/RequestContentIdentityVoter.php     |  4 ++-
 .../RequestParentContentIdentityVoter.php     |  4 ++-
 src/Voter/UriPrefixVoter.php                  |  6 ++--
 .../Doctrine/Phpcr/MenuNodeTest.php           | 13 +++----
 tests/Functional/Doctrine/Phpcr/MenuTest.php  |  7 ++--
 tests/Functional/RenderingTest.php            |  4 ++-
 .../DependencyInjection/XmlSchemaTest.php     |  4 ++-
 tests/Unit/Extension/ContentExtensionTest.php | 22 ++++++------
 tests/Unit/Loader/VotingNodeLoaderTest.php    | 14 ++++----
 tests/Unit/Model/MenuNodeTest.php             |  6 ++--
 tests/Unit/Provider/PhpcrMenuProviderTest.php |  6 ++--
 .../Voter/MenuContentVoterTest.php            | 12 ++++---
 tests/Unit/QuietFactoryTest.php               |  6 ++--
 .../LegacyRequestContentIdentityVoterTest.php | 18 +++++-----
 .../Voter/RequestContentIdentityVoterTest.php | 18 +++++-----
 .../RequestContentIdentityVoterTestCase.php   | 10 +++---
 .../RequestParentContentIdentityVoterTest.php |  6 ++--
 tests/Unit/Voter/UriPrefixVoterTest.php       |  6 ++--
 41 files changed, 190 insertions(+), 117 deletions(-)

diff --git a/.gitignore b/.gitignore
index f283645b..ded3d232 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@ tests/Fixtures/App/var
 !tests/Fixtures/App/var/.gitempty
 composer.lock
 vendor
+build/
+.php_cs.cache
diff --git a/composer.json b/composer.json
index 62c11d9d..55d43957 100644
--- a/composer.json
+++ b/composer.json
@@ -22,7 +22,7 @@
         "knplabs/knp-menu": "^2.0.0"
     },
     "require-dev": {
-        "symfony/monolog-bundle": "~3.1",
+        "symfony/monolog-bundle": "^3.1",
         "symfony/phpunit-bridge": "^4.2.2",
         "symfony-cmf/routing-bundle": "^1.4 || ^2.0",
         "symfony-cmf/testing": "^2.1.8",
diff --git a/src/CmfMenuBundle.php b/src/CmfMenuBundle.php
index 7712ad1a..3e989882 100644
--- a/src/CmfMenuBundle.php
+++ b/src/CmfMenuBundle.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/DependencyInjection/CmfMenuExtension.php b/src/DependencyInjection/CmfMenuExtension.php
index ab50bff1..a9c549b3 100644
--- a/src/DependencyInjection/CmfMenuExtension.php
+++ b/src/DependencyInjection/CmfMenuExtension.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -64,7 +66,7 @@ public function loadVoters($config, XmlFileLoader $loader, ContainerBuilder $con
             $container->removeDefinition('cmf_menu.current_item_voter.content_identity');
         }
 
-        if (isset($config['voters']) && !array_key_exists('uri_prefix', $config['voters'])) {
+        if (isset($config['voters']) && !\array_key_exists('uri_prefix', $config['voters'])) {
             $container->removeDefinition('cmf_menu.current_item_voter.uri_prefix');
         }
     }
diff --git a/src/DependencyInjection/Compiler/DecorateMenuFactoryPass.php b/src/DependencyInjection/Compiler/DecorateMenuFactoryPass.php
index d56e3316..97dd5f80 100644
--- a/src/DependencyInjection/Compiler/DecorateMenuFactoryPass.php
+++ b/src/DependencyInjection/Compiler/DecorateMenuFactoryPass.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/DependencyInjection/Compiler/ValidationPass.php b/src/DependencyInjection/Compiler/ValidationPass.php
index aeee2a7c..2da864db 100644
--- a/src/DependencyInjection/Compiler/ValidationPass.php
+++ b/src/DependencyInjection/Compiler/ValidationPass.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php
index c7082977..5749d3f0 100644
--- a/src/DependencyInjection/Configuration.php
+++ b/src/DependencyInjection/Configuration.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Doctrine/Phpcr/Menu.php b/src/Doctrine/Phpcr/Menu.php
index f7a6251f..a265313f 100644
--- a/src/Doctrine/Phpcr/Menu.php
+++ b/src/Doctrine/Phpcr/Menu.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Doctrine/Phpcr/MenuNode.php b/src/Doctrine/Phpcr/MenuNode.php
index 1303ff2b..796da24e 100644
--- a/src/Doctrine/Phpcr/MenuNode.php
+++ b/src/Doctrine/Phpcr/MenuNode.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Doctrine/Phpcr/MenuNodeBase.php b/src/Doctrine/Phpcr/MenuNodeBase.php
index 15bf3ccb..0e1878b6 100644
--- a/src/Doctrine/Phpcr/MenuNodeBase.php
+++ b/src/Doctrine/Phpcr/MenuNodeBase.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Event/CreateMenuItemFromNodeEvent.php b/src/Event/CreateMenuItemFromNodeEvent.php
index e76f76ef..553b8eec 100644
--- a/src/Event/CreateMenuItemFromNodeEvent.php
+++ b/src/Event/CreateMenuItemFromNodeEvent.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Event/Events.php b/src/Event/Events.php
index 09a72d7a..9e19b5f5 100644
--- a/src/Event/Events.php
+++ b/src/Event/Events.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -18,5 +20,5 @@ final class Events
      *
      * The event object is a CreateMenuItemFromNodeEvent.
      */
-    const CREATE_ITEM_FROM_NODE = 'cmf_menu.create_menu_item_from_node';
+    public const CREATE_ITEM_FROM_NODE = 'cmf_menu.create_menu_item_from_node';
 }
diff --git a/src/Extension/ContentExtension.php b/src/Extension/ContentExtension.php
index ebae85cf..02043fec 100644
--- a/src/Extension/ContentExtension.php
+++ b/src/Extension/ContentExtension.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -66,7 +68,7 @@ public function buildOptions(array $options)
 
             $options['uri'] = $this->contentRouter->generate(
                 $options['content'],
-                isset($options['routeParameters']) ? $options['routeParameters'] : [],
+                $options['routeParameters'] ?? [],
                 (isset($options['routeAbsolute']) && $options['routeAbsolute']) ? UrlGeneratorInterface::ABSOLUTE_URL : UrlGeneratorInterface::ABSOLUTE_PATH
             );
         }
@@ -125,7 +127,7 @@ private function determineLinkType(array $options)
     private function validateLinkType($linkType)
     {
         $linkTypes = ['uri', 'route', 'content'];
-        if (!in_array($linkType, $linkTypes)) {
+        if (!\in_array($linkType, $linkTypes, true)) {
             throw new \InvalidArgumentException(sprintf(
                 'Invalid link type "%s", expected: "%s"',
                 $linkType,
diff --git a/src/Loader/VotingNodeLoader.php b/src/Loader/VotingNodeLoader.php
index b5fcb67c..3d7f9512 100644
--- a/src/Loader/VotingNodeLoader.php
+++ b/src/Loader/VotingNodeLoader.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -45,7 +47,7 @@ public function load($data)
         if (!$this->supports($data)) {
             throw new \InvalidArgumentException(sprintf(
                 'NodeLoader can only handle data implementing NodeInterface, "%s" given.',
-                is_object($data) ? get_class($data) : gettype($data)
+                \is_object($data) ? \get_class($data) : \gettype($data)
             ));
         }
         $event = new CreateMenuItemFromNodeEvent($data);
diff --git a/src/Model/Menu.php b/src/Model/Menu.php
index 8344bcc3..01701e06 100644
--- a/src/Model/Menu.php
+++ b/src/Model/Menu.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Model/MenuNode.php b/src/Model/MenuNode.php
index 8ccf2dfd..3a18366f 100644
--- a/src/Model/MenuNode.php
+++ b/src/Model/MenuNode.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -30,12 +32,7 @@
  * - Translatable
  * - Publish Workflow
  */
-class MenuNode extends MenuNodeBase implements
-    TranslatableInterface,
-    PublishTimePeriodInterface,
-    PublishableInterface,
-    MenuOptionsInterface,
-    ChildInterface
+class MenuNode extends MenuNodeBase implements TranslatableInterface, PublishTimePeriodInterface, PublishableInterface, MenuOptionsInterface, ChildInterface
 {
     /**
      * Parent menu node.
diff --git a/src/Model/MenuNodeBase.php b/src/Model/MenuNodeBase.php
index c308d870..3f532cab 100644
--- a/src/Model/MenuNodeBase.php
+++ b/src/Model/MenuNodeBase.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Model/MenuNodeReferrersInterface.php b/src/Model/MenuNodeReferrersInterface.php
index 5192489a..55062e43 100644
--- a/src/Model/MenuNodeReferrersInterface.php
+++ b/src/Model/MenuNodeReferrersInterface.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Model/MenuOptionsInterface.php b/src/Model/MenuOptionsInterface.php
index 646e6daf..bcd62d3d 100644
--- a/src/Model/MenuOptionsInterface.php
+++ b/src/Model/MenuOptionsInterface.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Provider/PhpcrMenuProvider.php b/src/Provider/PhpcrMenuProvider.php
index e9990566..d46c5c1e 100644
--- a/src/Provider/PhpcrMenuProvider.php
+++ b/src/Provider/PhpcrMenuProvider.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -136,9 +138,9 @@ public function getPrefetch()
      *                        absolute PHPCR path or one relative to the menu root
      * @param array  $options
      *
-     * @return ItemInterface The menu (sub)tree starting with name
-     *
      * @throws \InvalidArgumentException if the menu can not be found
+     *
+     * @return ItemInterface The menu (sub)tree starting with name
      */
     public function get($name, array $options = [])
     {
@@ -169,17 +171,27 @@ public function has($name, array $options = [])
         return $this->find($name, false) instanceof NodeInterface;
     }
 
+    /**
+     * Get the object manager named $managerName from the registry.
+     *
+     * @return DocumentManager
+     */
+    protected function getObjectManager()
+    {
+        return $this->managerRegistry->getManager($this->managerName);
+    }
+
     /**
      * @param string $name  Name of the menu to load
      * @param bool   $throw Whether to throw an exception if the menu is not
      *                      found or no valid menu. Returns false if $throw is
      *                      false and there is no menu at $name
      *
-     * @return object|bool The menu root found with $name or false if $throw
-     *                     is false and the menu was not found
-     *
      * @throws \InvalidArgumentException Only if $throw is true throws this
      *                                   exception if the name is empty or no menu found
+     *
+     * @return object|bool The menu root found with $name or false if $throw
+     *                     is false and the menu was not found
      */
     private function find($name, $throw)
     {
@@ -208,7 +220,7 @@ private function find($name, $throw)
         if ($this->getPrefetch() > 0) {
             if ($session instanceof Session
                 && 0 < $session->getSessionOption(Session::OPTION_FETCH_DEPTH)
-                && 0 === strncmp($path, $this->getMenuRoot(), strlen($this->getMenuRoot()))
+                && 0 === strncmp($path, $this->getMenuRoot(), \strlen($this->getMenuRoot()))
             ) {
                 // we have jackalope with a fetch depth. prefetch all menu
                 // nodes of all menues.
@@ -255,14 +267,4 @@ private function find($name, $throw)
 
         return $menu;
     }
-
-    /**
-     * Get the object manager named $managerName from the registry.
-     *
-     * @return DocumentManager
-     */
-    protected function getObjectManager()
-    {
-        return $this->managerRegistry->getManager($this->managerName);
-    }
 }
diff --git a/src/PublishWorkflow/CreateMenuItemFromNodeListener.php b/src/PublishWorkflow/CreateMenuItemFromNodeListener.php
index a763fd18..c136a4e7 100644
--- a/src/PublishWorkflow/CreateMenuItemFromNodeListener.php
+++ b/src/PublishWorkflow/CreateMenuItemFromNodeListener.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/PublishWorkflow/Voter/MenuContentVoter.php b/src/PublishWorkflow/Voter/MenuContentVoter.php
index 6c517f6c..58ee53cc 100644
--- a/src/PublishWorkflow/Voter/MenuContentVoter.php
+++ b/src/PublishWorkflow/Voter/MenuContentVoter.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -60,7 +62,7 @@ public function supportsClass($class)
      */
     public function vote(TokenInterface $token, $object, array $attributes)
     {
-        if (!$this->supportsClass(get_class($object))) {
+        if (!$this->supportsClass(\get_class($object))) {
             return self::ACCESS_ABSTAIN;
         }
         /** @var PublishWorkflowChecker $publishWorkflowChecker */
diff --git a/src/QuietFactory.php b/src/QuietFactory.php
index a37b6ed2..1bccd16d 100644
--- a/src/QuietFactory.php
+++ b/src/QuietFactory.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -90,7 +92,7 @@ public function addExtension(ExtensionInterface $extension, $priority = 0)
         if (!method_exists($this->innerFactory, 'addExtension')) {
             throw new LogicException(sprintf(
                 'Wrapped factory "%s" does not have the method "addExtension".',
-                get_class($this->innerFactory)
+                \get_class($this->innerFactory)
             ));
         }
         $this->innerFactory->addExtension($extension, $priority);
diff --git a/src/Voter/RequestContentIdentityVoter.php b/src/Voter/RequestContentIdentityVoter.php
index b6fd6876..3139de02 100644
--- a/src/Voter/RequestContentIdentityVoter.php
+++ b/src/Voter/RequestContentIdentityVoter.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Voter/RequestParentContentIdentityVoter.php b/src/Voter/RequestParentContentIdentityVoter.php
index 66bd2037..3e8658dd 100644
--- a/src/Voter/RequestParentContentIdentityVoter.php
+++ b/src/Voter/RequestParentContentIdentityVoter.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/src/Voter/UriPrefixVoter.php b/src/Voter/UriPrefixVoter.php
index e1716aaf..6bcc0fed 100644
--- a/src/Voter/UriPrefixVoter.php
+++ b/src/Voter/UriPrefixVoter.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -80,7 +82,7 @@ public function matchItem(ItemInterface $item)
         if ($content instanceof Route && $content->hasOption('currentUriPrefix')) {
             $currentUriPrefix = $content->getOption('currentUriPrefix');
             $currentUriPrefix = str_replace('{_locale}', $request->getLocale(), $currentUriPrefix);
-            if (0 === strncmp($request->getPathInfo(), $currentUriPrefix, strlen($currentUriPrefix))) {
+            if (0 === strncmp($request->getPathInfo(), $currentUriPrefix, \strlen($currentUriPrefix))) {
                 return true;
             }
         }
diff --git a/tests/Functional/Doctrine/Phpcr/MenuNodeTest.php b/tests/Functional/Doctrine/Phpcr/MenuNodeTest.php
index 55bc0caa..d8e0538e 100644
--- a/tests/Functional/Doctrine/Phpcr/MenuNodeTest.php
+++ b/tests/Functional/Doctrine/Phpcr/MenuNodeTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -120,7 +122,7 @@ public function testMenuNode()
             $prop->setAccessible(true);
             $v = $prop->getValue($menuNode);
 
-            if (!is_object($value)) {
+            if (!\is_object($value)) {
                 $this->assertEquals($value, $v);
             }
         }
@@ -162,12 +164,11 @@ public function testMenuNode()
         $this->assertCount(0, $menuNode->getChildren());
     }
 
-    /**
-     * @expectedException \Doctrine\ODM\PHPCR\Exception\OutOfBoundsException
-     * @expectedExceptionMessage Allowed child classes "Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode"
-     */
     public function testPersistInvalidChild()
     {
+        $this->expectException(\Doctrine\ODM\PHPCR\Exception\OutOfBoundsException::class);
+        $this->expectExceptionMessage('Allowed child classes "Symfony\\Cmf\\Bundle\\MenuBundle\\Doctrine\\Phpcr\\MenuNode"');
+
         $menuNode = new MenuNode();
         $menuNode->setName('menu-node');
         $menuNode->setParentDocument($this->rootDocument);
diff --git a/tests/Functional/Doctrine/Phpcr/MenuTest.php b/tests/Functional/Doctrine/Phpcr/MenuTest.php
index 953b6a0e..17d8b945 100644
--- a/tests/Functional/Doctrine/Phpcr/MenuTest.php
+++ b/tests/Functional/Doctrine/Phpcr/MenuTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -60,10 +62,11 @@ public function testPersist()
 
     /**
      * @dataProvider getInvalidChildren
-     * @expectedException \Doctrine\ODM\PHPCR\Exception\OutOfBoundsException
      */
     public function testPersistInvalidChild($invalidChild)
     {
+        $this->expectException(\Doctrine\ODM\PHPCR\Exception\OutOfBoundsException::class);
+
         $menu = new Menu();
         $menu->setPosition($this->rootDocument, 'main');
         $this->dm->persist($menu);
diff --git a/tests/Functional/RenderingTest.php b/tests/Functional/RenderingTest.php
index c0516f26..3f6c9ae2 100644
--- a/tests/Functional/RenderingTest.php
+++ b/tests/Functional/RenderingTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/tests/Unit/DependencyInjection/XmlSchemaTest.php b/tests/Unit/DependencyInjection/XmlSchemaTest.php
index d4ddcffd..2a1c1395 100644
--- a/tests/Unit/DependencyInjection/XmlSchemaTest.php
+++ b/tests/Unit/DependencyInjection/XmlSchemaTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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/tests/Unit/Extension/ContentExtensionTest.php b/tests/Unit/Extension/ContentExtensionTest.php
index ec69a340..5cb0c171 100644
--- a/tests/Unit/Extension/ContentExtensionTest.php
+++ b/tests/Unit/Extension/ContentExtensionTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -14,7 +16,7 @@
 use Symfony\Cmf\Bundle\MenuBundle\Extension\ContentExtension;
 use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
 
-class ContentExtensionTest extends \PHPUnit_Framework_TestCase
+class ContentExtensionTest extends \PHPUnit\Framework\TestCase
 {
     private $generator;
 
@@ -22,7 +24,7 @@ class ContentExtensionTest extends \PHPUnit_Framework_TestCase
 
     public function setUp()
     {
-        $this->generator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface');
+        $this->generator = $this->createMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface');
         $this->subject = new ContentExtension($this->generator);
     }
 
@@ -119,21 +121,19 @@ public function testOptionsAsRemovedWhenLinkTypeIsElse()
         );
     }
 
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage Invalid link type
-     */
     public function testFailsOnInvalidLinkType()
     {
+        $this->expectException(\InvalidArgumentException::class);
+        $this->expectExceptionMessage('Invalid link type');
+
         $this->subject->buildOptions(['linkType' => 'not_valid']);
     }
 
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage could not find content option
-     */
     public function testFailsWhenContentIsNotAvailable()
     {
+        $this->expectException(\InvalidArgumentException::class);
+        $this->expectExceptionMessage('could not find content option');
+
         $this->subject->buildOptions(['linkType' => 'content']);
     }
 }
diff --git a/tests/Unit/Loader/VotingNodeLoaderTest.php b/tests/Unit/Loader/VotingNodeLoaderTest.php
index 41f4fb7f..ef09ebcb 100644
--- a/tests/Unit/Loader/VotingNodeLoaderTest.php
+++ b/tests/Unit/Loader/VotingNodeLoaderTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -13,7 +15,7 @@
 
 use Symfony\Cmf\Bundle\MenuBundle\Loader\VotingNodeLoader;
 
-class VotingNodeLoaderTest extends \PHPUnit_Framework_TestCase
+class VotingNodeLoaderTest extends \PHPUnit\Framework\TestCase
 {
     private $subject;
 
@@ -23,8 +25,8 @@ class VotingNodeLoaderTest extends \PHPUnit_Framework_TestCase
 
     public function setUp()
     {
-        $this->factory = $this->getMock('Knp\Menu\FactoryInterface');
-        $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
+        $this->factory = $this->createMock('Knp\Menu\FactoryInterface');
+        $this->dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
         $this->subject = new VotingNodeLoader($this->factory, $this->dispatcher);
     }
 
@@ -57,7 +59,7 @@ public function testCreateFromNode($options)
 
         $that = $this;
         $this->factory->expects($this->exactly($nodes))->method('createItem')->will($this->returnCallback(function () use ($that) {
-            return $that->getMock('Knp\Menu\ItemInterface');
+            return $that->createMock('Knp\Menu\ItemInterface');
         }));
 
         // test
@@ -78,7 +80,7 @@ public function getCreateFromNodeData()
 
     protected function getNode($name, $options = [], $children = [])
     {
-        $node = $this->getMock('Knp\Menu\NodeInterface');
+        $node = $this->createMock('Knp\Menu\NodeInterface');
 
         $node->expects($this->any())->method('getName')->willReturn($name);
         $node->expects($this->any())->method('getOptions')->willReturn($options);
diff --git a/tests/Unit/Model/MenuNodeTest.php b/tests/Unit/Model/MenuNodeTest.php
index 1f6916f7..43540e6a 100644
--- a/tests/Unit/Model/MenuNodeTest.php
+++ b/tests/Unit/Model/MenuNodeTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -13,7 +15,7 @@
 
 use Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode;
 
-class MenuNodeTest extends \PHPUnit_Framework_Testcase
+class MenuNodeTest extends \PHPUnit\Framework\Testcase
 {
     public function setUp()
     {
diff --git a/tests/Unit/Provider/PhpcrMenuProviderTest.php b/tests/Unit/Provider/PhpcrMenuProviderTest.php
index f235fbb7..4a9c9dff 100644
--- a/tests/Unit/Provider/PhpcrMenuProviderTest.php
+++ b/tests/Unit/Provider/PhpcrMenuProviderTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -20,7 +22,7 @@
 use Prophecy\Argument;
 use Symfony\Cmf\Bundle\MenuBundle\Provider\PhpcrMenuProvider;
 
-class PhpcrMenuProviderTest extends \PHPUnit_Framework_Testcase
+class PhpcrMenuProviderTest extends \PHPUnit\Framework\Testcase
 {
     private $manager;
 
diff --git a/tests/Unit/PublishWorkflow/Voter/MenuContentVoterTest.php b/tests/Unit/PublishWorkflow/Voter/MenuContentVoterTest.php
index 6b9948d5..86df8ce5 100644
--- a/tests/Unit/PublishWorkflow/Voter/MenuContentVoterTest.php
+++ b/tests/Unit/PublishWorkflow/Voter/MenuContentVoterTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -17,7 +19,7 @@
 use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
 use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
 
-class MenuContentVoterTest extends \PHPUnit_Framework_Testcase
+class MenuContentVoterTest extends \PHPUnit\Framework\Testcase
 {
     /**
      * @var MenuContentVoter
@@ -44,7 +46,7 @@ public function setUp()
         $this->pwfc = $this->getMockBuilder('Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishWorkflowChecker')
             ->disableOriginalConstructor()
             ->getMock();
-        $this->container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
+        $this->container = $this->createMock('Symfony\Component\DependencyInjection\ContainerInterface');
         $this->container
             ->expects($this->any())
             ->method('get')
@@ -57,7 +59,7 @@ public function setUp()
 
     public function providePublishWorkflowChecker()
     {
-        $content = $this->getMock('Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableReadInterface');
+        $content = $this->createMock('Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableReadInterface');
 
         return [
             [
@@ -142,7 +144,7 @@ public function providePublishWorkflowChecker()
     public function testPublishWorkflowChecker($expected, $attributes, $content, $isMenuPusblishable, $isContentPublishable)
     {
         $attributes = (array) $attributes;
-        $menuNode = $this->getMock('Symfony\Cmf\Bundle\MenuBundle\Model\MenuNode');
+        $menuNode = $this->createMock('Symfony\Cmf\Bundle\MenuBundle\Model\MenuNode');
         $menuNode->expects($this->any())
             ->method('getContent')
             ->will($this->returnValue($content))
diff --git a/tests/Unit/QuietFactoryTest.php b/tests/Unit/QuietFactoryTest.php
index c151bfbe..67c7b6eb 100644
--- a/tests/Unit/QuietFactoryTest.php
+++ b/tests/Unit/QuietFactoryTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -13,7 +15,7 @@
 
 use Symfony\Cmf\Bundle\MenuBundle\QuietFactory;
 
-class QuietFactoryTest extends \PHPUnit_Framework_TestCase
+class QuietFactoryTest extends \PHPUnit\Framework\TestCase
 {
     private $innerFactory;
 
diff --git a/tests/Unit/Voter/LegacyRequestContentIdentityVoterTest.php b/tests/Unit/Voter/LegacyRequestContentIdentityVoterTest.php
index 28a95609..5d6acb8e 100644
--- a/tests/Unit/Voter/LegacyRequestContentIdentityVoterTest.php
+++ b/tests/Unit/Voter/LegacyRequestContentIdentityVoterTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -19,18 +21,18 @@
  */
 class LegacyRequestContentIdentityVoterTest extends RequestContentIdentityVoterTestCase
 {
-    protected function buildVoter(Request $request)
+    public function testSkipsWhenNoRequestIsAvailable()
     {
-        $voter = new RequestContentIdentityVoter('_content');
-        $voter->setRequest($request);
+        $this->voter->setRequest(null);
 
-        return $voter;
+        $this->assertNull($this->voter->matchItem($this->createItem()));
     }
 
-    public function testSkipsWhenNoRequestIsAvailable()
+    protected function buildVoter(Request $request)
     {
-        $this->voter->setRequest(null);
+        $voter = new RequestContentIdentityVoter('_content');
+        $voter->setRequest($request);
 
-        $this->assertNull($this->voter->matchItem($this->createItem()));
+        return $voter;
     }
 }
diff --git a/tests/Unit/Voter/RequestContentIdentityVoterTest.php b/tests/Unit/Voter/RequestContentIdentityVoterTest.php
index bc2f5ce0..841fa0c1 100644
--- a/tests/Unit/Voter/RequestContentIdentityVoterTest.php
+++ b/tests/Unit/Voter/RequestContentIdentityVoterTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -17,18 +19,18 @@
 
 class RequestContentIdentityVoterTest extends RequestContentIdentityVoterTestCase
 {
-    protected function buildVoter(Request $request)
+    public function testSkipsWhenNoRequestIsAvailable()
     {
-        $requestStack = new RequestStack();
-        $requestStack->push($request);
+        $voter = new RequestContentIdentityVoter('_content', new RequestStack());
 
-        return new RequestContentIdentityVoter('_content', $requestStack);
+        $this->assertNull($voter->matchItem($this->createItem()));
     }
 
-    public function testSkipsWhenNoRequestIsAvailable()
+    protected function buildVoter(Request $request)
     {
-        $voter = new RequestContentIdentityVoter('_content', new RequestStack());
+        $requestStack = new RequestStack();
+        $requestStack->push($request);
 
-        $this->assertNull($voter->matchItem($this->createItem()));
+        return new RequestContentIdentityVoter('_content', $requestStack);
     }
 }
diff --git a/tests/Unit/Voter/RequestContentIdentityVoterTestCase.php b/tests/Unit/Voter/RequestContentIdentityVoterTestCase.php
index c0379809..83d76941 100644
--- a/tests/Unit/Voter/RequestContentIdentityVoterTestCase.php
+++ b/tests/Unit/Voter/RequestContentIdentityVoterTestCase.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -16,7 +18,7 @@
 use Symfony\Component\HttpFoundation\ParameterBag;
 use Symfony\Component\HttpFoundation\Request;
 
-abstract class RequestContentIdentityVoterTestCase extends \PHPUnit_Framework_TestCase
+abstract class RequestContentIdentityVoterTestCase extends \PHPUnit\Framework\TestCase
 {
     /**
      * @var RequestContentIdentityVoter
@@ -35,8 +37,6 @@ protected function setUp()
         $this->voter = $this->buildVoter($this->request->reveal());
     }
 
-    abstract protected function buildVoter(Request $request);
-
     abstract public function testSkipsWhenNoRequestIsAvailable();
 
     public function testSkipsWhenNoContentIsAvailable()
@@ -75,6 +75,8 @@ public function testSkipsWhenContentIsNotEqual()
         $this->assertNull($this->voter->matchItem($this->createItem(new \stdClass())));
     }
 
+    abstract protected function buildVoter(Request $request);
+
     protected function createItem($content = null)
     {
         $item = $this->prophesize(ItemInterface::class);
diff --git a/tests/Unit/Voter/RequestParentContentIdentityVoterTest.php b/tests/Unit/Voter/RequestParentContentIdentityVoterTest.php
index 5ce5e4ce..b11e0633 100644
--- a/tests/Unit/Voter/RequestParentContentIdentityVoterTest.php
+++ b/tests/Unit/Voter/RequestParentContentIdentityVoterTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -13,7 +15,7 @@
 
 use Symfony\Cmf\Bundle\MenuBundle\Voter\RequestParentContentIdentityVoter;
 
-class RequestParentContentIdentityVoterTest extends \PHPUnit_Framework_TestCase
+class RequestParentContentIdentityVoterTest extends \PHPUnit\Framework\TestCase
 {
     private $voter;
 
diff --git a/tests/Unit/Voter/UriPrefixVoterTest.php b/tests/Unit/Voter/UriPrefixVoterTest.php
index 3d1b73a8..0debbf94 100644
--- a/tests/Unit/Voter/UriPrefixVoterTest.php
+++ b/tests/Unit/Voter/UriPrefixVoterTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 /*
  * 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.
@@ -13,7 +15,7 @@
 
 use Symfony\Cmf\Bundle\MenuBundle\Voter\UriPrefixVoter;
 
-class UriPrefixVoterTest extends \PHPUnit_Framework_TestCase
+class UriPrefixVoterTest extends \PHPUnit\Framework\TestCase
 {
     private $voter;
 

From 3ff55c721969905c65071fb33ed5669af7f1b3a6 Mon Sep 17 00:00:00 2001
From: electricmaxxx <maximilian.berghoff@gmx.de>
Date: Sat, 2 Mar 2019 00:00:34 +0100
Subject: [PATCH 6/7] DevKit updates

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index 55d43957..62c11d9d 100644
--- a/composer.json
+++ b/composer.json
@@ -22,7 +22,7 @@
         "knplabs/knp-menu": "^2.0.0"
     },
     "require-dev": {
-        "symfony/monolog-bundle": "^3.1",
+        "symfony/monolog-bundle": "~3.1",
         "symfony/phpunit-bridge": "^4.2.2",
         "symfony-cmf/routing-bundle": "^1.4 || ^2.0",
         "symfony-cmf/testing": "^2.1.8",

From 6c99e3ca8521169aad04f294ed3dab323f1b383b Mon Sep 17 00:00:00 2001
From: electricmaxxx <maximilian.berghoff@gmx.de>
Date: Sat, 2 Mar 2019 00:01:46 +0100
Subject: [PATCH 7/7] DevKit updates

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index 62c11d9d..55d43957 100644
--- a/composer.json
+++ b/composer.json
@@ -22,7 +22,7 @@
         "knplabs/knp-menu": "^2.0.0"
     },
     "require-dev": {
-        "symfony/monolog-bundle": "~3.1",
+        "symfony/monolog-bundle": "^3.1",
         "symfony/phpunit-bridge": "^4.2.2",
         "symfony-cmf/routing-bundle": "^1.4 || ^2.0",
         "symfony-cmf/testing": "^2.1.8",