Skip to content

Allow version aliases to be used with execute command - #1192

Open
Padam87 wants to merge 1 commit into
doctrine:3.10.xfrom
Padam87:execute_version_aliases
Open

Padam87 wants to merge 1 commit into
doctrine:3.10.xfrom
Padam87:execute_version_aliases

Conversation

@Padam87

@Padam87 Padam87 commented Aug 16, 2021 •

Copy link
Copy Markdown
Contributor
Q A
Type improvement
BC Break no
Fixed issues

Summary

This PR plugs in the alias resolver to the execute command in order to simplify executing a migration.
In practice, this would improve DX, because the last migration could be easily --down-ed, when spotting a mistake.

@Padam87
Padam87 force-pushed the execute_version_aliases branch from f2c0394 to 5b0b076 Compare August 16, 2021 18:26
'The versions to execute.',
sprintf(
'The versions to execute. Use the FQCN of the migration, or the following reserved aliases: %s',
implode(', ', ['first', 'current', 'prev', 'next', 'latest'])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense to get this list from the interface somehow?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A getSupportedAliases method would be easy to impletement, but using it could be trouble, because of the verbatim return, and the current-1 formats.
Should I go for it? If so, should it be enforced with a supports method, or just a simple listing?

@goetas
goetas changed the base branch from 3.2.x to 3.3.x August 22, 2021 11:53
@goetas

goetas commented Aug 22, 2021

Copy link
Copy Markdown
Member

Since this is a new feature, ive changed the base branch to 3.3.x

@greg0ire
greg0ire changed the base branch from 3.3.x to 3.10.x November 24, 2026 20:38
@github-actions

Copy link
Copy Markdown

This pull request is labelled Enhancement, but it targets 3.10.x.

Changes labelled Enhancement should target the next minor branch, 3.11.x.

To retarget it, choose Edit next to the title and select the appropriate base branch,
or use the downward arrow next to the base branch name if you are using the new pull request overview UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants