|
|
vor 7 Jahren | |
|---|---|---|
| .. | ||
| src | vor 7 Jahren | |
| stubs | vor 7 Jahren | |
| tests | vor 7 Jahren | |
| .gitignore | vor 7 Jahren | |
| .travis.yml | vor 7 Jahren | |
| collect-logo.png | vor 7 Jahren | |
| composer.json | vor 7 Jahren | |
| phpunit.xml | vor 7 Jahren | |
| readme.md | vor 7 Jahren | |
| upgrade.sh | vor 7 Jahren | |
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.
With Composer:
composer require tightenco/collect
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
Due to a dependency on Carbon, tests won't pass until you've run ./upgrade.sh at least once locally.
vendor/bin/phpunit
tightenco/collect instead of illuminate/collect?Collection may be extracted from illuminate/support to a new package. If so, we'll deprecate this package and point to the core version.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.