From ef6fc963e8db476ef632b47d57eff864ae6bb82a Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 22:52:38 -0500 Subject: [PATCH 01/12] deprecation updates --- Acl/CommentAclInterface.php | 2 +- Acl/VoteAclInterface.php | 2 +- Controller/AbstractController.php | 22 ++++++++++++++++++ Controller/ThreadController.php | 3 ++- Tests/Functional/ApiTest.php | 33 +++++++++++++++++++++++++++ Tests/Functional/app/Basic/config.yml | 5 ++++ phpunit.xml.dist | 4 ++++ 7 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 Controller/AbstractController.php diff --git a/Acl/CommentAclInterface.php b/Acl/CommentAclInterface.php index c1c5a8da7..df7818c63 100644 --- a/Acl/CommentAclInterface.php +++ b/Acl/CommentAclInterface.php @@ -41,7 +41,7 @@ public function canView(CommentInterface $comment); * Checks if the user can reply to the supplied 'parent' comment * or if not supplied, just the ability to reply. * - * @param CommentInterface $comment + * @param CommentInterface $parent * * @return bool */ diff --git a/Acl/VoteAclInterface.php b/Acl/VoteAclInterface.php index a5c3ddedd..8c3bbc08e 100644 --- a/Acl/VoteAclInterface.php +++ b/Acl/VoteAclInterface.php @@ -61,7 +61,7 @@ public function canDelete(VoteInterface $vote); * Note: this does not remove any existing Acl and should only * be called on new CommentInterface instances. * - * @param VoteInterface $comment + * @param VoteInterface $vote * * @return void */ diff --git a/Controller/AbstractController.php b/Controller/AbstractController.php new file mode 100644 index 000000000..b38af1c69 --- /dev/null +++ b/Controller/AbstractController.php @@ -0,0 +1,22 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace FOS\CommentBundle\Controller; + +if (class_exists('\Symfony\Bundle\FrameworkBundle\Controller\AbstractController')) { + abstract class AbstractController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController + { + } +} else { + abstract class AbstractController extends \Symfony\Bundle\FrameworkBundle\Controller\Controller + { + } +} diff --git a/Controller/ThreadController.php b/Controller/ThreadController.php index 0079e5d78..04582792e 100644 --- a/Controller/ThreadController.php +++ b/Controller/ThreadController.php @@ -26,7 +26,8 @@ * * @author Alexander */ -class ThreadController extends Controller +//class ThreadController extends Controller +class ThreadController extends AbstractController { const VIEW_FLAT = 'flat'; const VIEW_TREE = 'tree'; diff --git a/Tests/Functional/ApiTest.php b/Tests/Functional/ApiTest.php index 50718bd2f..ee043ce55 100644 --- a/Tests/Functional/ApiTest.php +++ b/Tests/Functional/ApiTest.php @@ -37,6 +37,9 @@ protected function setUp() * Tests retrieval of a thread that doesnt exist. * * fos_comment_get_thread: GET: /comment_api/threads/{id}.{_format} + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetThread404() { @@ -50,6 +53,9 @@ public function testGetThread404() * Tests retrieval of a threads without id's. * * fos_comment_get_threads: GET: /comment_api/threads + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetThreads404() { @@ -66,6 +72,9 @@ public function testGetThreads404() * fos_comment_post_threads: POST: /comment_api/threads.{_format} * * @return string The id of the created thread + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetThreadFormAndSubmit() { @@ -96,6 +105,9 @@ public function testGetThreadFormAndSubmit() * * @param mixed $id * @depends testGetThreadFormAndSubmit + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetThread($id) { @@ -111,6 +123,9 @@ public function testGetThread($id) * * @param mixed $id * @depends testGetThreadFormAndSubmit + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetEmptyThread($id) { @@ -130,6 +145,9 @@ public function testGetEmptyThread($id) * * @param mixed $id * @depends testGetEmptyThread + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testAddCommentToThread($id) { @@ -156,6 +174,9 @@ public function testAddCommentToThread($id) * * @param mixed $id * @depends testAddCommentToThread + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testReplyToComment($id) { @@ -190,6 +211,9 @@ public function testReplyToComment($id) * * @param $id * @depends testReplyToComment + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetCommentTree($id) { @@ -206,6 +230,9 @@ public function testGetCommentTree($id) * * @param $id * @depends testReplyToComment + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetCommentTreeDepth($id) { @@ -223,6 +250,9 @@ public function testGetCommentTreeDepth($id) * * @param $id * @depends testReplyToComment + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetCommentFlat($id) { @@ -240,6 +270,9 @@ public function testGetCommentFlat($id) * * @param $id * @depends testReplyToComment + * + * @group legacy + * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetCommentFlatSorted($id) { diff --git a/Tests/Functional/app/Basic/config.yml b/Tests/Functional/app/Basic/config.yml index 1b04c1599..623c9853c 100644 --- a/Tests/Functional/app/Basic/config.yml +++ b/Tests/Functional/app/Basic/config.yml @@ -14,3 +14,8 @@ fos_rest: format_listener: rules: - { path: '^/', priorities: ['json', 'html'], fallback_format: json } + +services: + FOS\CommentBundle\Controller\ThreadController: + class: FOS\CommentBundle\Controller\ThreadController + tags: ~ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9bae26f98..f3567ae2c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -22,4 +22,8 @@ + + + + From da6b3fcbfc6522b6edb80aa5d60cccb9bcbf93c7 Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 22:59:34 -0500 Subject: [PATCH 02/12] deprecation updates --- Controller/ThreadController.php | 2 -- Tests/Functional/ApiTest.php | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Controller/ThreadController.php b/Controller/ThreadController.php index 04582792e..7d5b096fe 100644 --- a/Controller/ThreadController.php +++ b/Controller/ThreadController.php @@ -14,7 +14,6 @@ use FOS\CommentBundle\Model\CommentInterface; use FOS\CommentBundle\Model\ThreadInterface; use FOS\RestBundle\View\View; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -26,7 +25,6 @@ * * @author Alexander */ -//class ThreadController extends Controller class ThreadController extends AbstractController { const VIEW_FLAT = 'flat'; diff --git a/Tests/Functional/ApiTest.php b/Tests/Functional/ApiTest.php index ee043ce55..7bf847fc1 100644 --- a/Tests/Functional/ApiTest.php +++ b/Tests/Functional/ApiTest.php @@ -40,6 +40,7 @@ protected function setUp() * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetThread404() { @@ -56,6 +57,7 @@ public function testGetThread404() * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetThreads404() { @@ -75,6 +77,7 @@ public function testGetThreads404() * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetThreadFormAndSubmit() { @@ -108,6 +111,7 @@ public function testGetThreadFormAndSubmit() * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetThread($id) { @@ -126,6 +130,7 @@ public function testGetThread($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetEmptyThread($id) { @@ -148,6 +153,7 @@ public function testGetEmptyThread($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testAddCommentToThread($id) { @@ -177,6 +183,7 @@ public function testAddCommentToThread($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testReplyToComment($id) { @@ -214,6 +221,7 @@ public function testReplyToComment($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetCommentTree($id) { @@ -233,6 +241,7 @@ public function testGetCommentTree($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetCommentTreeDepth($id) { @@ -253,6 +262,7 @@ public function testGetCommentTreeDepth($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetCommentFlat($id) { @@ -273,6 +283,7 @@ public function testGetCommentFlat($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. + * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetCommentFlatSorted($id) { From f5ca15bae4491a4563e61711406dad1c14007440 Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:05:35 -0500 Subject: [PATCH 03/12] deprecation updates --- Controller/AbstractController.php | 2 +- Tests/Functional/ApiTest.php | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Controller/AbstractController.php b/Controller/AbstractController.php index b38af1c69..69a9fbc2d 100644 --- a/Controller/AbstractController.php +++ b/Controller/AbstractController.php @@ -11,7 +11,7 @@ namespace FOS\CommentBundle\Controller; -if (class_exists('\Symfony\Bundle\FrameworkBundle\Controller\AbstractController')) { +if (class_exists('Symfony\Bundle\FrameworkBundle\Controller\AbstractController')) { abstract class AbstractController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController { } diff --git a/Tests/Functional/ApiTest.php b/Tests/Functional/ApiTest.php index 7bf847fc1..ee043ce55 100644 --- a/Tests/Functional/ApiTest.php +++ b/Tests/Functional/ApiTest.php @@ -40,7 +40,6 @@ protected function setUp() * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetThread404() { @@ -57,7 +56,6 @@ public function testGetThread404() * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetThreads404() { @@ -77,7 +75,6 @@ public function testGetThreads404() * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetThreadFormAndSubmit() { @@ -111,7 +108,6 @@ public function testGetThreadFormAndSubmit() * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetThread($id) { @@ -130,7 +126,6 @@ public function testGetThread($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetEmptyThread($id) { @@ -153,7 +148,6 @@ public function testGetEmptyThread($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testAddCommentToThread($id) { @@ -183,7 +177,6 @@ public function testAddCommentToThread($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testReplyToComment($id) { @@ -221,7 +214,6 @@ public function testReplyToComment($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetCommentTree($id) { @@ -241,7 +233,6 @@ public function testGetCommentTree($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetCommentTreeDepth($id) { @@ -262,7 +253,6 @@ public function testGetCommentTreeDepth($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetCommentFlat($id) { @@ -283,7 +273,6 @@ public function testGetCommentFlat($id) * * @group legacy * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. - * @expectedDeprecation The "FOS\CommentBundle\Controller\ThreadController" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0. */ public function testGetCommentFlatSorted($id) { From 77a4d1001699eb32a1faaa9f86e3cfaa68ff23e4 Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:08:26 -0500 Subject: [PATCH 04/12] deprecation updates --- phpunit.xml.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f3567ae2c..080702ea4 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,6 +3,7 @@ + From e5419ded87077e19ec9e35b82ff3565b1db76819 Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:10:43 -0500 Subject: [PATCH 05/12] deprecation updates --- .travis.yml | 2 +- Tests/Functional/ApiTest.php | 33 --------------------------------- phpunit.xml.dist | 1 - 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/.travis.yml b/.travis.yml index 04b621429..024463967 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,4 +29,4 @@ install: script: - composer validate --no-check-lock --strict - - ./vendor/bin/phpunit --coverage-text --colors + - SYMFONY_DEPRECATIONS_HELPER=weak_vendor ./vendor/bin/phpunit --coverage-text --colors diff --git a/Tests/Functional/ApiTest.php b/Tests/Functional/ApiTest.php index ee043ce55..50718bd2f 100644 --- a/Tests/Functional/ApiTest.php +++ b/Tests/Functional/ApiTest.php @@ -37,9 +37,6 @@ protected function setUp() * Tests retrieval of a thread that doesnt exist. * * fos_comment_get_thread: GET: /comment_api/threads/{id}.{_format} - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetThread404() { @@ -53,9 +50,6 @@ public function testGetThread404() * Tests retrieval of a threads without id's. * * fos_comment_get_threads: GET: /comment_api/threads - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetThreads404() { @@ -72,9 +66,6 @@ public function testGetThreads404() * fos_comment_post_threads: POST: /comment_api/threads.{_format} * * @return string The id of the created thread - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetThreadFormAndSubmit() { @@ -105,9 +96,6 @@ public function testGetThreadFormAndSubmit() * * @param mixed $id * @depends testGetThreadFormAndSubmit - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetThread($id) { @@ -123,9 +111,6 @@ public function testGetThread($id) * * @param mixed $id * @depends testGetThreadFormAndSubmit - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetEmptyThread($id) { @@ -145,9 +130,6 @@ public function testGetEmptyThread($id) * * @param mixed $id * @depends testGetEmptyThread - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testAddCommentToThread($id) { @@ -174,9 +156,6 @@ public function testAddCommentToThread($id) * * @param mixed $id * @depends testAddCommentToThread - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testReplyToComment($id) { @@ -211,9 +190,6 @@ public function testReplyToComment($id) * * @param $id * @depends testReplyToComment - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetCommentTree($id) { @@ -230,9 +206,6 @@ public function testGetCommentTree($id) * * @param $id * @depends testReplyToComment - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetCommentTreeDepth($id) { @@ -250,9 +223,6 @@ public function testGetCommentTreeDepth($id) * * @param $id * @depends testReplyToComment - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetCommentFlat($id) { @@ -270,9 +240,6 @@ public function testGetCommentFlat($id) * * @param $id * @depends testReplyToComment - * - * @group legacy - * @expectedDeprecation Auto-injection of the container for "FOS\CommentBundle\Controller\ThreadController" is deprecated since Symfony 4.2. Configure it as a service instead. */ public function testGetCommentFlatSorted($id) { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 080702ea4..f3567ae2c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,7 +3,6 @@ - From d6365835f349e14b98834e1ed29d5aca9637dade Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:11:22 -0500 Subject: [PATCH 06/12] deprecation updates --- Tests/Functional/app/Basic/config.yml | 5 ----- phpunit.xml.dist | 4 ---- 2 files changed, 9 deletions(-) diff --git a/Tests/Functional/app/Basic/config.yml b/Tests/Functional/app/Basic/config.yml index 623c9853c..1b04c1599 100644 --- a/Tests/Functional/app/Basic/config.yml +++ b/Tests/Functional/app/Basic/config.yml @@ -14,8 +14,3 @@ fos_rest: format_listener: rules: - { path: '^/', priorities: ['json', 'html'], fallback_format: json } - -services: - FOS\CommentBundle\Controller\ThreadController: - class: FOS\CommentBundle\Controller\ThreadController - tags: ~ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f3567ae2c..9bae26f98 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -22,8 +22,4 @@ - - - - From b1eb2056334926998dacf62f70adbc16acd66fd1 Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:20:16 -0500 Subject: [PATCH 07/12] deprecation updates --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 024463967..6ba0d5054 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ cache: matrix: include: - php: 5.6 - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak + env: COMPOSER_FLAGS="--prefer-lowest" - php: 5.6 env: DEPENDENCIES="symfony/lts:^2" - php: 7.1 @@ -29,4 +29,4 @@ install: script: - composer validate --no-check-lock --strict - - SYMFONY_DEPRECATIONS_HELPER=weak_vendor ./vendor/bin/phpunit --coverage-text --colors + - SYMFONY_DEPRECATIONS_HELPER=weak ./vendor/bin/phpunit --coverage-text --colors From d3804ddb9529619ad5e17811afb4973b08e12d78 Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:28:53 -0500 Subject: [PATCH 08/12] deprecation updates --- .travis.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ba0d5054..f0fcfa447 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,5 @@ language: php -php: - - 5.6 - - 7.1 - - 7.2 - - 7.3 - cache: directories: - $HOME/.composer/cache/files @@ -13,7 +7,15 @@ cache: matrix: include: - php: 5.6 - env: COMPOSER_FLAGS="--prefer-lowest" + env: SYMFONY_DEPRECATIONS_HELPER=weak + - php: 7,1 + - php: 7.2 + env: SYMFONY_DEPRECATIONS_HELPER=weak + - php: 7.3 + env: SYMFONY_DEPRECATIONS_HELPER=weak + + - php: 5.6 + env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak - php: 5.6 env: DEPENDENCIES="symfony/lts:^2" - php: 7.1 @@ -29,4 +31,4 @@ install: script: - composer validate --no-check-lock --strict - - SYMFONY_DEPRECATIONS_HELPER=weak ./vendor/bin/phpunit --coverage-text --colors + - ./vendor/bin/phpunit --coverage-text --colors From 7d1a5e39d54bb4e765daf1de92e25dfd227da795 Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:32:02 -0500 Subject: [PATCH 09/12] deprecation updates --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0fcfa447..c39829a87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ matrix: include: - php: 5.6 env: SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7,1 + - php: 7.1 - php: 7.2 env: SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.3 From e5ac6da9a0b897d008063b8d38c3b54926a6c163 Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:35:52 -0500 Subject: [PATCH 10/12] deprecation updates --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c39829a87..2ea77bab8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ matrix: - php: 5.6 env: SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.1 + env: SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.2 env: SYMFONY_DEPRECATIONS_HELPER=weak - php: 7.3 From 10597e0e694258ebee461340e12c6a34ca1e1fcc Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:39:01 -0500 Subject: [PATCH 11/12] deprecation updates --- .travis.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2ea77bab8..855551930 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,20 @@ language: php +env: + global: + - SYMFONY_DEPRECATIONS_HELPER=weak + +php: + - 5.6 + - 7.1 + - 7.2 + - 7.3 cache: directories: - $HOME/.composer/cache/files matrix: include: - - php: 5.6 - env: SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.1 - env: SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.2 - env: SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.3 - env: SYMFONY_DEPRECATIONS_HELPER=weak - - php: 5.6 env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak - php: 5.6 From d48ee3fc0540eec35bc5d2e8ba402a628159df2b Mon Sep 17 00:00:00 2001 From: Steve Nebes Date: Tue, 9 Apr 2019 23:42:52 -0500 Subject: [PATCH 12/12] deprecation updates --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 855551930..4fdda598e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ php: - 7.1 - 7.2 - 7.3 + cache: directories: - $HOME/.composer/cache/files @@ -16,7 +17,7 @@ cache: matrix: include: - php: 5.6 - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak + env: COMPOSER_FLAGS="--prefer-lowest" - php: 5.6 env: DEPENDENCIES="symfony/lts:^2" - php: 7.1