feo-cz / collect
Collect - Illuminate Collections as a separate package.
Requires
- php: ^7.1.3
- symfony/var-dumper: ^3.4.1
Requires (Dev)
- mockery/mockery: ^1.0
- nesbot/carbon: ^1.26
- phpunit/phpunit: ^7.0
- dev-laravel-5.8-ongoing
- 5.8.27
- 5.8.26
- 5.8.25
- 5.8.24
- v5.8.23
- v5.8.22
- v5.8.21
- v5.8.20
- v5.8.19
- v5.8.18
- v5.8.17
- v5.8.16
- v5.8.15
- v5.8.14
- v5.8.13
- v5.8.12
- v5.8.11
- v5.8.10
- v5.8.9
- v5.8.8
- v5.8.7
- v5.8.6
- v5.8.5
- v5.8.4
- v5.8.3
- v5.8.2
- v5.8.1
- v5.8.0
- v5.7.27
- v5.7.26
- v5.7.25
- v5.7.24
- v5.7.23
- v5.7.22
- v5.7.21
- v5.7.20
- v5.7.19
- v5.7.18
- v5.7.17
- v5.7.16
- v5.7.15
- v5.7.14
- v5.7.13
- v5.7.12
- v5.7.11
- v5.7.10
- v5.7.9
- v5.7.8
- v5.7.7
- v5.7.6
- v5.7.5
- v5.7.4
- v5.7.3
- v5.7.2
- v5.7.1
- v5.7.0
- v5.6.39
- v5.6.38
- v5.6.37
- v5.6.36
- v5.6.35
- v5.6.34
- v5.6.33
- v5.6.32
- v5.6.31
- v5.6.30
- v5.6.29
- v5.6.28
- v5.6.27
- v5.6.25
- v5.6.24
- v5.6.23
- v5.6.22
- v5.6.21
- v5.6.20
- v5.6.19
- v5.6.18
- v5.6.17
- v5.6.16
- v5.6.15
- v5.6.14
- v5.6.13
- v5.6.12
- v5.6.11
- v5.6.9
- v5.6.8
- v5.6.7
- v5.6.6
- v5.6.5
- v5.6.4
- v5.6.0
- v5.5.45
- v5.5.33
- v5.5.32
- v5.5.27
- v5.5.20
- v5.5.16
- v5.5.14
- v5.5.13
- v5.5.9
- v5.5.7
- v5.5.3
- v5.5.2
- v5.4.33
- v5.4.32
- v5.4.31
- v5.4.29
- v5.4.28
- v5.4.27
- v5.4.25
- v5.4.20
- v5.4.18
- v5.4.17
- v5.4.16
- v5.4.14
- v5.4.13
- v5.4.12
- v5.4.10
- v5.4.7
- v5.4.0
- v5.3.29
- v5.3.28
- v5.3.27
- v5.3.23
- v5.3.20
- v5.3.16
- v5.3.12
- v5.3.10
- v5.3.9
- v5.3.7
- v5.3.4
- v5.3.2
- v5.3.0-RC1
- v5.2.43
- v5.2.41
- v5.2.38
- v5.2.36
- v5.2.34
- v5.2.33
- v5.2.32
- v5.2.31
- dev-laravel-5.8.20-changes
- dev-laravel-5.7-ongoing
- dev-laravel-5.5-ongoing
- dev-laravel-5.6-ongoing
- dev-master
This package is not auto-updated.
Last update: 2024-11-13 14:47:47 UTC
README
Collect - Illuminate Collections
Import Laravel's Collections into non-Laravel packages easily, without needing to require the entire Illuminate\Support
package. (Why not pull Illuminate\Support
in framework-agnostic packages)
Written by Taylor Otwell as a part of Laravel's Illuminate/Support package, Collect is just the code from Support needed in order to use Collections on their own.
Lovingly split by Matt Stauffer for Tighten Co., with a kick in the butt to finally do it from @assertchris.
Installation
With Composer:
composer require tightenco/collect
Development
If you are a developer working on Collect and you're tasked with upgrading it to mirror a new version of Laravel, run ./upgrade.sh
from the root directory. You can pass a parameter to target a specific Laravel version (e.g. ./upgrade.sh 5.7.10
) or, if you don't pass a parameter, the script will find the latest tagged release and run against that.
The upgrader will pull down the appropriate source and test files for the specified version of Laravel and then run the tests.
./upgrade.sh
# or
./upgrade.sh 5.7.10
The upgrade script requires the use of
wget
. It's recommended to install homebrew, and runbrew install wget
Testing
Due to a dependency on Carbon, tests won't pass until you've run ./upgrade.sh
at least once locally.
vendor/bin/phpunit
FAQ
- Will this develop independently from Illuminate's Collections?
No. Right now it's split manually, but the goal is for it shortly to be split automatically to keep it in sync with Laravel's Collections, even mirroring the release numbers. - Why is the package
tightenco/collect
instead ofilluminate/collect
?
It's not an official Laravel package so we don't want to use the Packagist namespace reserved by Laravel packages. One dayCollection
may be extracted fromilluminate/support
to a new package. If so, we'll deprecate this package and point to the core version. - Why not just use an array?
What a great question. Tighten alum Adam Wathan has a book about that.
License
The Laravel framework is open-sourced software licensed under the MIT license. Collect consists almost entirely of Laravel source code, so maintains the same license.