From d706a906262c37b7e3f4eb5f9ec4b6ff667b1bd7 Mon Sep 17 00:00:00 2001 From: Jesse Rushlow Date: Fri, 26 Jan 2024 16:55:58 -0500 Subject: [PATCH] [ci] enable skipped Symfony 7 tests --- tests/Maker/MakeEntityTest.php | 2 -- tests/Maker/MakeFixturesTest.php | 4 +--- tests/Maker/MakeFunctionalTestTest.php | 6 ++---- tests/Maker/MakeRegistrationFormTest.php | 2 -- tests/Maker/MakeResetPasswordTest.php | 10 +++++----- tests/Maker/MakeStimulusControllerTest.php | 3 --- tests/Maker/MakeTestTest.php | 4 +--- tests/Maker/MakeTwigComponentTest.php | 4 ---- 8 files changed, 9 insertions(+), 26 deletions(-) diff --git a/tests/Maker/MakeEntityTest.php b/tests/Maker/MakeEntityTest.php index 6e8d36f82..7e58ae305 100644 --- a/tests/Maker/MakeEntityTest.php +++ b/tests/Maker/MakeEntityTest.php @@ -61,7 +61,6 @@ public function getTestDetails(): \Generator ]; yield 'it_creates_a_new_class_and_api_resource' => [$this->createMakeEntityTest() - ->skipOnSymfony7() // legacy: remove when API Platform supports Symfony 7 ->addExtraDependencies('api') ->run(function (MakerTestRunner $runner) { $runner->runMaker([ @@ -545,7 +544,6 @@ public function getTestDetails(): \Generator yield 'it_makes_new_entity_no_to_all_extras' => [$this->createMakeEntityTestForMercure() ->addExtraDependencies('api') - ->skipOnSymfony7() // legacy: remove when API Platform supports Symfony 7 // special setup done in createMakeEntityTestForMercure() ->run(function (MakerTestRunner $runner) { $runner->runMaker([ diff --git a/tests/Maker/MakeFixturesTest.php b/tests/Maker/MakeFixturesTest.php index 0f43de13f..c9cbf8588 100644 --- a/tests/Maker/MakeFixturesTest.php +++ b/tests/Maker/MakeFixturesTest.php @@ -22,11 +22,9 @@ protected function getMakerClass(): string return MakeFixtures::class; } - public function getTestDetails() + public function getTestDetails(): \Generator { yield 'it_generates_fixtures' => [$this->createMakerTest() - // legacy: remove when DoctrineFixturesBundle 4.0 is installed - ->skipOnSymfony7() ->run(function (MakerTestRunner $runner) { $output = $runner->runMaker([ 'FooFixtures', diff --git a/tests/Maker/MakeFunctionalTestTest.php b/tests/Maker/MakeFunctionalTestTest.php index 0deece27e..6ee998b50 100644 --- a/tests/Maker/MakeFunctionalTestTest.php +++ b/tests/Maker/MakeFunctionalTestTest.php @@ -25,12 +25,10 @@ protected function getMakerClass(): string return MakeFunctionalTest::class; } - public function getTestDetails() + public function getTestDetails(): \Generator { yield 'it_generates_test_with_panther' => [$this->createMakerTest() - /* @legacy Allows Panther >= 1.x to be installed. (PHP <8.0 support) */ - ->skipOnSymfony7() // legacy remove when panther supports Symfony 7 - ->addExtraDependencies('panther:*') + ->addExtraDependencies('panther') ->run(function (MakerTestRunner $runner) { $runner->copy( 'make-functional/MainController.php', diff --git a/tests/Maker/MakeRegistrationFormTest.php b/tests/Maker/MakeRegistrationFormTest.php index 4c180a64b..a545e8240 100644 --- a/tests/Maker/MakeRegistrationFormTest.php +++ b/tests/Maker/MakeRegistrationFormTest.php @@ -98,7 +98,6 @@ public function getTestDetails(): \Generator yield 'it_generates_registration_form_with_verification' => [$this->createRegistrationFormTest() ->addExtraDependencies('symfonycasts/verify-email-bundle') - ->skipOnSymfony7() // legacy: remove VerifyEmailBundle supports Symfony 7 // needed for internal functional test ->addExtraDependencies('symfony/web-profiler-bundle', 'mailer') ->run(function (MakerTestRunner $runner) { @@ -138,7 +137,6 @@ public function getTestDetails(): \Generator yield 'it_generates_registration_form_with_verification_and_translator' => [$this->createRegistrationFormTest() ->addExtraDependencies('symfonycasts/verify-email-bundle') - ->skipOnSymfony7() // legacy: remove VerifyEmailBundle supports Symfony 7 // needed for internal functional test ->addExtraDependencies('symfony/web-profiler-bundle', 'mailer', 'symfony/translation') ->run(function (MakerTestRunner $runner) { diff --git a/tests/Maker/MakeResetPasswordTest.php b/tests/Maker/MakeResetPasswordTest.php index abd565c06..66af678da 100644 --- a/tests/Maker/MakeResetPasswordTest.php +++ b/tests/Maker/MakeResetPasswordTest.php @@ -27,8 +27,8 @@ protected function getMakerClass(): string public function getTestDetails(): \Generator { yield 'it_generates_with_normal_setup' => [$this->createMakerTest() + // @legacy - drop skipped versions when PHP 8.1 is no longer supported. ->setSkippedPhpVersions(80100, 80109) - ->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7 ->run(function (MakerTestRunner $runner) { $this->makeUser($runner); @@ -83,8 +83,8 @@ public function getTestDetails(): \Generator ]; yield 'it_generates_with_translator_installed' => [$this->createMakerTest() + // @legacy - drop skipped versions when PHP 8.1 is no longer supported. ->setSkippedPhpVersions(80100, 80109) - ->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7 ->addExtraDependencies('symfony/translation') ->run(function (MakerTestRunner $runner) { $this->makeUser($runner); @@ -101,8 +101,8 @@ public function getTestDetails(): \Generator ]; yield 'it_generates_with_custom_config' => [$this->createMakerTest() + // @legacy - drop skipped versions when PHP 8.1 is no longer supported. ->setSkippedPhpVersions(80100, 80109) - ->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7 ->run(function (MakerTestRunner $runner) { $runner->deleteFile('config/packages/reset_password.yaml'); $runner->writeFile( @@ -132,8 +132,8 @@ public function getTestDetails(): \Generator ]; yield 'it_amends_configuration' => [$this->createMakerTest() + // @legacy - drop skipped versions when PHP 8.1 is no longer supported. ->setSkippedPhpVersions(80100, 80109) - ->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7 ->run(function (MakerTestRunner $runner) { $runner->modifyYamlFile('config/packages/reset_password.yaml', function (array $config) { $config['symfonycasts_reset_password']['lifetime'] = 9999; @@ -160,8 +160,8 @@ public function getTestDetails(): \Generator ]; yield 'it_generates_with_custom_user' => [$this->createMakerTest() + // @legacy - drop skipped versions when PHP 8.1 is no longer supported. ->setSkippedPhpVersions(80100, 80109) - ->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7 ->run(function (MakerTestRunner $runner) { $this->makeUser($runner, 'emailAddress', 'UserCustom', false); diff --git a/tests/Maker/MakeStimulusControllerTest.php b/tests/Maker/MakeStimulusControllerTest.php index 08890cd21..69183d695 100644 --- a/tests/Maker/MakeStimulusControllerTest.php +++ b/tests/Maker/MakeStimulusControllerTest.php @@ -25,7 +25,6 @@ protected function getMakerClass(): string public function getTestDetails(): \Generator { yield 'it_generates_stimulus_controller_with_targets' => [$this->createMakerTest() - ->skipOnSymfony7() // legacy: remove StimulusBundle supports Symfony 7 ->run(function (MakerTestRunner $runner) { $runner->runMaker( [ @@ -53,7 +52,6 @@ public function getTestDetails(): \Generator ]; yield 'it_generates_stimulus_controller_without_targets' => [$this->createMakerTest() - ->skipOnSymfony7() // legacy: remove StimulusBundle supports Symfony 7 ->run(function (MakerTestRunner $runner) { $runner->runMaker( [ @@ -77,7 +75,6 @@ public function getTestDetails(): \Generator ]; yield 'it_generates_typescript_stimulus_controller' => [$this->createMakerTest() - ->skipOnSymfony7() // legacy: remove StimulusBundle supports Symfony 7 ->run(function (MakerTestRunner $runner) { $runner->runMaker( [ diff --git a/tests/Maker/MakeTestTest.php b/tests/Maker/MakeTestTest.php index 5eecb11e0..3b056c5e3 100644 --- a/tests/Maker/MakeTestTest.php +++ b/tests/Maker/MakeTestTest.php @@ -80,9 +80,7 @@ public function getTestDetails(): \Generator ]; yield 'it_makes_PantherTestCase_type' => [$this->createMakerTest() - ->skipOnSymfony7() // legacy remove when panther supports Symfony 7 - /* @legacy Allows Panther >= 1.x to be installed. (PHP <8.0 support) */ - ->addExtraDependencies('panther:*') + ->addExtraDependencies('panther') ->run(function (MakerTestRunner $runner) { $runner->copy( 'make-test/basic_setup', diff --git a/tests/Maker/MakeTwigComponentTest.php b/tests/Maker/MakeTwigComponentTest.php index da7a61e70..ecbb314d2 100644 --- a/tests/Maker/MakeTwigComponentTest.php +++ b/tests/Maker/MakeTwigComponentTest.php @@ -21,7 +21,6 @@ public function getTestDetails(): \Generator { yield 'it_generates_twig_component' => [$this->createMakerTest() ->addExtraDependencies('symfony/ux-twig-component', 'symfony/twig-bundle') - ->skipOnSymfony7() // legacy: remove when ux-twig-component supports Symfony 7 ->run(function (MakerTestRunner $runner) { $output = $runner->runMaker(['Alert']); @@ -40,7 +39,6 @@ public function getTestDetails(): \Generator yield 'it_generates_pascal_case_twig_component' => [$this->createMakerTest() ->addExtraDependencies('symfony/ux-twig-component', 'symfony/twig-bundle') - ->skipOnSymfony7() // legacy: remove when ux-twig-component supports Symfony 7 ->run(function (MakerTestRunner $runner) { $output = $runner->runMaker(['FormInput']); @@ -59,7 +57,6 @@ public function getTestDetails(): \Generator yield 'it_generates_live_component' => [$this->createMakerTest() ->addExtraDependencies('symfony/ux-live-component', 'symfony/twig-bundle') - ->skipOnSymfony7() // legacy: remove when ux-twig-component supports Symfony 7 ->run(function (MakerTestRunner $runner) { $output = $runner->runMaker(['Alert']); @@ -78,7 +75,6 @@ public function getTestDetails(): \Generator yield 'it_generates_pascal_case_live_component' => [$this->createMakerTest() ->addExtraDependencies('symfony/ux-live-component', 'symfony/twig-bundle') - ->skipOnSymfony7() // legacy: remove when ux-twig-component supports Symfony 7 ->run(function (MakerTestRunner $runner) { $output = $runner->runMaker(['FormInput']);