yii2-gii
yii2-gii copied to clipboard
Added return types for methods in models
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ❌ |
| Breaks BC? | ❌ |
| Fixed issues | Added method return types |
PR Summary
-
Changes to
Generator.phpin model generation This update modifies how we generate models in the system. Depending on the PHP version being used, it can now select between two different templates. This allows for better compatibility across different PHP versions. -
Addition of a new model template
model_from_7.phpA new model template has been added to the system. This new template is specifically designed for generating model classes based on a particular table when the PHP version is 7 or above, providing a more tailored experience for developers using these versions. -
Updates to
ModelGeneratorTest.phpfor improved testing The testing module for model generation has been updated to reflect the changes in theGenerator.phpfile. This ensures that the tests are adequate and cover the new logic for selecting the appropriate model template based on the PHP version. This is crucial for ensuring the smooth operation of our model generation process moving forward.
Overall it's a good idea.