Skip to content
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

[drush php]: makeEntitiesAvailableWithShortClassNames throws exception for known class names #5730

Closed
jurgenhaas opened this issue Aug 16, 2023 · 0 comments

Comments

@jurgenhaas
Copy link
Contributor

Describe the bug

When calling drush php in drush 12, and there is an entity called Event, that throws this exception:

PHP Fatal error:  Cannot declare class Event, because the name is already in use in /var/www/html/vendor/drush/drush/src/Commands/core/CliCommands.php(313) : eval()'d code on line 1

To Reproduce

Create an entity called Event and start the drush php console. Or you could installe e.g. the DANSE module, which brings an entity with that name already.

This is expected to happen with other entity class names as well.

System Configuration

Q A
Drush version? 12.x
Drupal version? 10.1
PHP version 8.1
OS? Linux

Additional information

How about prefixing classes with e.g. D?

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

No branches or pull requests

1 participant