Skip to content

[make:controller] [make:crud] [make:registration-form] [make:reset-password] [make:security:form-login] Fix error while generating PHPUnit tests #1719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

Maxcastel
Copy link

@Maxcastel Maxcastel commented Jul 14, 2025

Fixes: #1718

Change

if (!class_exists(WebTestCase::class)) {
    $io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.');
}

to

if (!class_exists(TestCase::class)) {
    $io->caution('You\'ll need to install the `symfony/test-pack` to execute the tests for your new controller.');
}
  • Symfony\Bundle\FrameworkBundle\Test\WebTestCase to PHPUnit\Framework\TestCase

Error is now displayed and files are created

generate-phpunit-tests-make-controller-ok2

generate-phpunit-tests-make-crud-ok2

generate-phpunit-tests-make-registration-form-ok1

generate-phpunit-tests-make-reset-password-ok2

generate-phpunit-tests-make-security-form-login-ok2

…ssword] [make:security:form-login] Fix error while generating PHPUnit tests
@Maxcastel Maxcastel force-pushed the fix-generate-phpunit-tests branch from d07942e to f3336b7 Compare July 15, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[make:controller] [make:crud] [make:registration-form] [make:reset-password] [make:security:form-login] Error while generating PHPUnit tests
1 participant