-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Breaking change with 6.1.0 after 6.0.2 #2562
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
Comments
We are also experiencing other breaking changes which are not semver-friendly such as public function exec(): bool|null; Changed to: public function exec(): bool|null|array; It's not wrong to do those changes, but maybe the version should have changed to 7.0 instead of 6.1? |
@oprypkhantc in 6.1.0 second parameter may be string
The problem is in how '0' is handled in new version |
@NiklasBr semver allows changes like that for a bug fixes, for example |
Or the problem is in how laravel uses it 😃 |
For reference, the change to PHP's int can only represent Edit: What used to happen is we would test if the passed cursor wasn't an int (or was negative) and we would just treat that as the first iteration because non-integer cursors were not legal. Now we have to allow for string cursors to support very large values as described above. It should be possible to support the previous behavior in 6.1.1 given that we will never return a string cursor smaller than 2^63 if people think that's worth doing. |
Yes, it is allowed. But are you sure it's just the stubs that changed? I'm getting breaking changes with the |
Sure, but I believe they use a string value to support both From PHP perspective, |
IMO The problem with hset is ambiguous. If you use PhpRedis without any wrappers/proxy/etc |
But still, if my code is overriding hSet, it WILL break with 6.1.0... And about wrappers/proxy/etc, not only Laravel is affected, but also Symfony... (And I'm willing to bet that also https://github.com/colinmollenhour/credis is affected in the same way, which means Magento is also indirectly affected) The problem at large may be because of PECL's versioning limitations ("current year of Our Lord 2024" and they still only allow pinning specific versions, without any capability of limiting updates to minor versions if you don't want to micro-manage every single extension), but then even more so, when acknowledging this, maintainers of extensions that are mainly available via PECL should have a sense of responsibility whenever they publish breaking changes... (early deprecation warnings are welcome) |
A lot of people use Laravel and their caching. This change is breaking so many production systems, that it is not even funny :( |
Also #2564 which was closed because they don't consider breaking changes to be breaking changes. |
@myDisconnect if it breaks your production system then that's your mistake to not build from lockfiles in code repository. |
@Trogie How to use a lockfile with PECL? We use https://github.com/mlocati/docker-php-extension-installer and the only thing it allows is pinning versions. It's not a lock file, and I'm not aware of any solutions with actual lock files for Docker/PECL. |
I was indeed to fast typing: I lock the versions in the Dockerfiles for the different environments. |
Using a different Docker image in dev and prod kind of defeats the purpose of building and running those images in the first place; they create a mostly deterministic environment where the local environment is the same as what is deployed. |
Your choice, we consider our production environments not breaking a bigger prio then having full deterministic environments. |
Would it reduce the pain here if we introduced a configure option in 6.1.1. that let you opt-out of the HSET change? Something like:
It's a terrible hack and I kind of hate it 😄 but the stub generator has full support for something like this via |
Not for my part, we have workarounds now. I think the best solution would have been to tag the old method as Maybe introduce a compatibility layer (which is more work I understand is often a chore), but allow it to accept both the old and the new style input, but trigger a warning on the old? |
We're going to put together 6.1.1 soon. Let me know if there's anything I could include to make this less of a pain point. Conditional compilation is likely the only real solution that doesn't break the 6.1.0 BC. We won't modify any more signatures until 7.0.0 though. |
Since this is an extension, can't the method have multiple signatures? Though I don't know how hard it is to implement. Making the old deprecated using trigger_error is a good idea. |
From the Symfony POV what we would need then is another way to (easily) detect for which signature we need to adapt. Right now we do that by checking the extension version. That wouldn't work anymore with this idea. Having a constant as an indicator would probably the easiest solution for us. |
That's easy to do. Maybe something like |
Hi @yatsukhnenko ,
Based on the documentation the second argument of |
Hi @michael-grunder ,
I created an issue (which I treated duplicate and closed immediately after creation) showing that passing |
Expected behaviour
zScan()
supports string"0"
as the parameter for #2$it
argument:Actual behaviour
zScan()
returnsfalse
when trying to pass the string"0"
as the parameter for$it
:I'm seeing this behaviour on
Steps to reproduce, backtrace or example script
Prior to 6.1.0, it used to support the string '0' cursor. This behaviour is used in by the current version of Laravel, and is an unexpected breaking change: https://github.com/laravel/framework/blob/5caf767f708aa6e8a3774104ecc7dd0471db805e/src/Illuminate/Cache/RedisStore.php#L298
I've checked
develop
branchThe text was updated successfully, but these errors were encountered: