-
Notifications
You must be signed in to change notification settings - Fork 19
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
Migrate tightenco/collect
to illuminate/collections
#40
Conversation
1. Can use Tightenco namespace 2. Can use Illuminate namespace 3. Can use `collect()` helper
@adamtomat more real world testing will be required to fully assess the impact of the switch over. We will need to consider whether this is considered a breaking change too. |
Please consider adding some kind of switch that does not add class aliases. |
@szepeviktor the aliases don't prevent you from exclusively using the new namespaces and replacing the old ones in your own code. They just don't force everyone to do that and provides a more graceful upgrade path without unnecessary friction. |
Excuse me. I was not daring enough. "Some people vomit from class aliases." ... mainly lab-type 🧪 guys 👨🏻🔬 |
tightenco/collect
to illuminate/collections
* Add return type annotations Tells PHP 8.1 not to raise the deprecation warning around mixed return types without breaking backwards compatibility with PHP 8.0 and below. https://stackoverflow.com/a/71133750 * Specify the error level `null` is no longer accepted in PHP 8.1 * Update dependencies for PHP 8.1 support * Update CI PHP versions Drop support for PHP 7.3 and add support for PHP 8.1 * Allow `composer/installers` to be installed * Update minimum dependencies * Update more minimum dev dependencies * Increase minimum version of `statamic/stringy` * Increase Timber version to release supporting 8.1 * Migrate `tightenco/collect` to `illuminate/collections` (#40) * Ensure `dd()` and `dump()` are present * Ensure Collections are present 1. Can use Tightenco namespace 2. Can use Illuminate namespace 3. Can use `collect()` helper * Update to `illuminate/collections` * Test legacy function signatures are happy * Use a version of 8.x which supports PHP 8.1 Co-authored-by: Joe Lambert <joe@rareloop.com> * Default the domain to ‘’ for PHP 8.1 support This is the recommended approach to support PHP 8.1 and maintain backwards compatibility. It is also how WordPress have approached this. * Allow custom error levels to be report only (#44) Also added `E_DEPRECATED` to the list by default Co-authored-by: Joe Lambert <joe@rareloop.com> * Remove collection aliasing --------- Co-authored-by: Joe Lambert <joe@rareloop.com>
Migrate from
tightenco/collect
toilluminate/collections
.There will be a lot of user land code with reference to the Tighten namespace so add aliases that transparently use the Illuminate variants instead. Specifically we want to support the transparent use of
Collection
andArr
.The Tighten package also brought in
symfony/var-dumper
, exposingdd()
anddump()
which Illuminate doesn't. So to minimise upgrade issues we now also require this package fromlumberjack-core
.