collect

A Collections-only split from Laravel's Illuminate Support

Github星跟踪图

Travis Status for tightenco/collect

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 run brew 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 of illuminate/collect?
    It's not an official Laravel package so we don't want to use the Packagist namespace reserved by Laravel packages. One day Collection may be extracted from illuminate/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.

主要指标

概览
名称与所有者tighten/collect
主编程语言PHP
编程语言PHP (语言数: 2)
平台
许可证
所有者活动
创建于2016-05-02 01:50:27
推送于2024-01-14 14:38:53
最后一次提交
发布数336
最新版本名称v9.52.7 (发布于 )
第一版名称v5.2.31 (发布于 )
用户参与
星数1.5k
关注者数33
派生数110
提交数564
已启用问题?
问题数51
打开的问题数3
拉请求数266
打开的拉请求数2
关闭的拉请求数28
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?