Skip to content

Fix for yiisoft/yii2-gii 2.2.7 #306

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

eluhr
Copy link
Collaborator

@eluhr eluhr commented Mar 12, 2025

When generating a table with an enum field, the current giiant version(1.0.3) is not compatible with gii version 2.2.7 installed because the enum handling was included in the Gii through a pull request.

The problem is that this was implemented a little differently than it was originally implemented in giiant. see gii implementation vs original giiant implementation

This PR uses the naming from gii and adapts the corresponding places in the model template and raises the minimum giia constraint to 2.2.7

CC: @handcode

@eluhr eluhr requested a review from schmunk42 March 12, 2025 09:13
@handcode
Copy link
Contributor

Are we all aware that any customized templates, especially model//model.php in which the “old” array keys are used, will be “broken”?

@eluhr eluhr marked this pull request as draft March 12, 2025 09:42
@eluhr
Copy link
Collaborator Author

eluhr commented Mar 12, 2025

Are we all aware that any customized templates, especially model//model.php in which the “old” array keys are used, will be “broken”?

Yes, but i have no idea how to support backward compatibility for such a change. Maybe we can pin the gii version in the current master to 2.2.6 and make a 1.0.4 release of giiant and merge this pr after and make a 1.1.0 or even 2.0.0 release of giiant?

@schmunk42
Copy link
Owner

Is the generated code different?

In which way did it conflict (error) with gii 2.2.7?

@eluhr
Copy link
Collaborator Author

eluhr commented Mar 12, 2025

Is the generated code different?

In which way did it conflict (error) with gii 2.2.7?

Key names of the getEnum "changed" from snake to camel case and overall the implementation in gii differs alot than the "original" in giiant.

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.

3 participants