-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Labels
Milestone
Description
This is a (multiple allowed):
- bug
- enhancement
- feature-discussion (RFC)
bin/cake bake migration_snapshot New
class New extends AbstractMigration
{
...
}When trying to generate it, it throws this at the end
[ParseError] syntax error, unexpected token "new", expecting identifier in /shared/httpd/app/config/Migrations/20240221034352_New.php on line 6
I guess it is mainly about this list? https://www.php.net/manual/en/reserved.php
If someone can help to gather the list of all possible words, I can whip up a PR addressing the issue.
My approach would be to ask() the user about a possible prefix in this case to avoid the collision (prefix defaulting to "Migration"), or allow aborting.
If continue, it would then use e.g. "MigrationNew" and that would be fine.
Reactions are currently unavailable