-
-
Notifications
You must be signed in to change notification settings - Fork 422
[make:entity] only show supported types in cli wizard #1448
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
Conversation
5e4ed0f
to
b82d78c
Compare
// get the dependencies installed in the test project (tmp/cache/TEST) | ||
$installedVersions = require $runner->getPath('vendor/composer/installed.php'); | ||
|
||
if (!str_starts_with($installedVersions['versions']['doctrine/dbal']['version'], '3.')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hack way to determine if dbal 3 or 4 is installed. MakerTestRunner::doesClassExist()
doesnt provide all available classes for a cached project under test. To be dealt with under a different PR.
@@ -490,11 +488,30 @@ private function printAvailableTypes(ConsoleStyle $io): void | |||
$io->writeln(''); | |||
}; | |||
|
|||
$printRelationsSection = static function () use ($io) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broke out handling relations to reduce the complexity above. otherwise we're nesting if's 3+ layers deep.
Relates to
make:entity
field type question when passing?
to see all available types.ascii_string
as an "or" type forstring
allows for removed types in DBAL 4 to still be available for users on DBAL 3
fixes #1446