-
-
Notifications
You must be signed in to change notification settings - Fork 3
Base implementation #2
base: master
Are you sure you want to change the base?
Conversation
It does not solve yiisoft/yii2#14973 at all. And it requires PHP 5.6 so it cannot be used for Yii 2.0 tests. |
Yes. Should be 5.4. |
What should be done to fix this? |
see #1 (comment) and https://github.com/yiisoft/yii2/blob/master/tests/compatibility.php |
I just noticed that having 4-digits in the version number is a bit tricky. While would give you all updates for version Compare the output of the get an example:
For Yii the situation becomes even worse with There'll be many extensions which will be either compatible with Given that we should really think about releasing a version The only other alternative I can think of is using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #2 (comment)
I suppose releasing 3.0 instead of 2.1 good idea, because in my company we have a lot of extensions for Yii2 (> 40 repositories). We are not able to update after each minor release. Now we use ^2.0.13 for extensions Yii dependencies instead of recommended ~2.0.13 |
@Horat1us You should fix constraints in your extensions. I'm pretty sure that there are many extensions with @schmunk42 What we will get after releasing 2.1 as 3.0? Yii 2 3.0? |
@rob006 Not as a separate package. The problems is, that there is no operator like "§2.1.x.y" which would update patch-versions, but not minor (speaking in semver terms). Yes, |
Why would you need such operator? Patch versions (2.0.15.x) does not provide any new features, why do you want to specify it in constraint?
I'm talking about "human" name. If you have a sentence like "Yii 2 Core Framework Code Style" how it will look for a 3.x line? "Yii 2 3.x Core Framework Code Style"? |
The fourth digits aren't patch versions in semver, only in Yii-terms. AFAIK they are not even covered by semver.
Hard to say and I am absolutely open for discussion, maybe I'd move the "2" to "yii", like Yii2 Framework 3.0 Codestyle? |
@schmunk42 You did not answer my question. Why do you want to specify constraint as |
You might need to depend on This is actually the most common case, when you take the current versioning scheme. |
|
When this package use ~2.0.13.1 I wasn't able to install Yii 2.0.15 on my project, thats why I made 7ea2f00 commit |
I am not ignoring the facts ;)
Yii does in my opinion a much better much in maintaining BC than most other software I used. Yii did only do patch releases for now, actually. This is confusing and annoying developers.
It should not be that hard, but it is, because of the problems outlined above - it's self-inflicted.
The framework should not make it hard for the developers to pick the right constraint from the documentation, but obviously it is.
I am not expecting this, the situation is simply very unsatisfying. I actually think of Yii Framework as Yii1 and Yii 2.0 Framework as Yii2. What's about saying we have now Yii 2:2.0.15 and we'll transition to Yii 2:3.0.0? |
Yeah... This discussion really reminds me this one: yiisoft/yii2-app-basic#112 :D
|
🤣 Thought about that a minute ago, I still can't believe people are working like that... I know about the policy, but the xkcd does not really fit. This one is slightly better https://xkcd.com/242/
Which other large PHP project does that?
Really? If so, composer handles it completely wrong, since it's treated as a patch release which comes after the stable version without suffix.
Would not be working as expected if the version would be updated to
I think otherwise, at least we could choose an operator which makes sense.
It's not about some package on the web, it's about the Core Framework version. |
It will also not work correctly if it will be updated to |
@samdark using 21.. is good idea, because it's less confusing (in case of 3.0), and will not break packages that use ^2.0.XX (using ~2.0.XX really not comfortable in case of using a lot of packages: we need to release version for each package after each Yii2 patch release) |
its possible to define such a constraint like this |
It is but it's quite counter-intuitive and complicated. |
given that patch releases are hotfixes with only small changes, its quite rare that someone would need to require a specific hotfix version as the minimum required version. If its still needed, it can be solved like this. Not a reason to change the overall versioning strategy because of a rare occurence. |
Honestly speaking, that was not so rare given the past releases. The current versioning makes it just harder for you as maintainers to do releases. |
could you name more than one case, where a library needs to depend on a specific patch version of Yii?
I don't get what you want to say. Yii versioning works well from my side :) |
Look at the current state of https://github.com/yiisoft/yii2/releases
yiisoft/yii2@2.0.14.2...2.0.15 yiisoft/yii2@2.0.15...2.0.15.1 When I start depending on The missing zero is utterly confusing, why is it not added all the time? [addon] Why is the security fix in some versions a (Yii) patch and sometimes a (Yii) minor release? |
The 2.0.15 release is a tricky one, because it is
We released the fix as 2.0.15, with news announcement to get attention. We do not make announcement for patch releases and it is a breaking change. Thats the reason for 2.0.15. We also needed to make sure it gets applied to as many projects as possible, so we want people to allow to stay on the yii minor they are currently on and still apply the patch, thats the reason for 2.0.13.2 and 2.0.12.1. the difference between 2.0.14.2 and 2.0.15 is the security patch, so there is no point in releasing 2.0.14.3 for it.
2.0.15.1 lowers the impact of the BC break in the security patch. Due to the patch AR::refresh() was broken. Its still open because the fix in 2.0.15.1 does not cover all cases.
in an application I recommend to use a fixed constraint and do yii upgrades manually. Upgrading Yii always includes reading the UPGRADE.md and check for breaking changes in some way. So for an applicion the upgrade workflow should not be handled by composer constraint imo.
Yii versioning scheme has grown over time, the first two years or so, we did not do any patch releases. We introduced patches when we finalized versioning scheme and automated the release process. I don't say that Yii versioning scheme is perfect. There are things that can be improved to reduce confusion. But switching to a completely different scheme seems to be an unnecessarily radical step to me. |
Probably adding |
Thank you for the detailed explanation. But reading that makes actually convinces me even more that the current versioning should be changed.
In a nutshell, the change breaks BC, but for lower versions you pretend it's a (Yii) patch, so people apply a required but breaking change?! That's awfully intransparent.
I heard, Yii is so complex that you can not really overlook it 🙊 So you can't really judge if a change affects you or not. Having a guidance from the core developers via semver, would greatly help here 😉.
Regarding the
The more I dive into this topic, the more I come to the conclusion that this "radical" step is very neccessary. |
But then there'll be no operator for getting (Yii) minor upgrades. I apologize in advance, but get rid of this four-digit pain. |
its bad, but it would be the same with semver...
I was not talking about the |
Bad is not the point, it is intransparent and people think the can safely update their application because the fourth digit was raised, if you maintain multiple versions (like 2.0.12, 2.0.13, ...) you'd better off with versions like 2.2.17 and 3.1.5 where you could create new releases as 2.3.0 and 3.2.0. You have much more room to maneuver and it would be much clearer for the user what's to expect.
How is that difference not a technical reason, the opposite is the case, a version has to have three digits, period. Everything else results in really strange behavior, I know composer for quite some time and just stumbled upon these quirks by accident, because Yii now has three digit and for digit versions. btw: We're including https://github.com/Roave/SecurityAdvisories in all of our projects, with semver you could easily mark versions with security issues in a clearly readable way. With the current scheme it's a pure mess. |
Could you explain what semver will change in this case? There is no equivalent for |
Yeah true, regarding roave. I mixed up they are using conflict instead of require. |
if you have 2.3.1 and 2.4.2 in semver and you want to release a breaking security fix to both branches you have the same problem. Breaking in Semver means raising the first digit. You are lost here. Semver has the same problem. |
Another reason for sticking closer to semver and having a clear policy which versions are supported. I'd also rather see an increase like 2.4.2 to 2.5.0 and with a notice that there might be an issue, due to a security related bug than seeing 2.4.2.1. |
#1