-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Remove deprecated method className()
for branch 2.2
.
#19894
Remove deprecated method className()
for branch 2.2
.
#19894
Conversation
terabytesoftw
commented
Jul 14, 2023
Q | A |
---|---|
Is bugfix? | ✔️ |
New feature? | ❌ |
Breaks BC? | ❌ |
className()
method for branch 2.2
.className()
for branch 2.2
.
PR SummaryThis Pull Request primarily focuses on updating the codebase to utilize the
In short, this PR modernizes the codebase by adopting the |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## 2.2 #19894 +/- ##
=========================================
Coverage 66.38% 66.38%
+ Complexity 11338 11337 -1
=========================================
Files 429 429
Lines 35934 35934
=========================================
Hits 23856 23856
Misses 12078 12078
☔ View full report in Codecov by Sentry. |
yii2-gii has the option to use the class constant or not in the model generator (https://github.com/yiisoft/yii2-gii/blob/master/src/generators/model/Generator.php#L53). |
If it is a good suggestion create the |
This creates also a lot of problems with 3rd party extensions, making it quite impossible to upgrade existing apps. Could we just keep in
Maybe with an additional |
@schmunk42 if we do that, then we will have problems as there will always be extension lagging. Best option is letting extensions update themselves for that change |
I basically agree, but it's the reality. It's a fine line between BC and using more clean code. But this is a huge blocker for existing projects. And makes it impossible just to test How about something like:
it has not to stay there forever, but would give developers the opportunity to have a more graceful way of upgrading. |
For now we can keep without deprecated giving everyone time to change. |
I think we can keep without adding the constant check. But with deprecation to warn people that it is going away! |
How are people going to notice that the function will be going away without deprecation? |
You are so right. |
I agree with this, but could we do the following: public static function className()
{
return static::class;
} Then we have at least some benefits of the newer PHP version 😅. |