tightenco/collect
最新稳定版本:v9.52.7
Composer 安装命令:
composer require tightenco/collect
包简介
Collect - Illuminate Collections as a separate package.
关键字:
README 文档
README
Collect - Illuminate Collections
Deprecated: With the separation of Illuminate's Collections package, Collect is no longer necessary ???? . We will maintain it for the 8.0 and 9.0 releases of Laravel for the convenience of package maintainers, and will stop mirroring new major versions after 9.0, but keep the existing package here for continued support.
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
- Has this ever, or will it ever, develop independently from Illuminate's Collections? No. Using an upgrade script, it's split automatically with every Laravel release to keep it in sync with Laravel's Collections, even mirroring the release numbers.
- Why is the package
tightenco/collectinstead ofilluminate/collect? It's not an official Laravel package so we don't want to use the Packagist namespace reserved by Laravel packages.One dayNow thatCollectionmay be extracted fromilluminate/supportto a new package. If so, we'll deprecate this package and point to the core version.illuminate/collectionshas been released, we're deprecating this package. - 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.
tightenco/collect 适用场景与选型建议
tightenco/collect 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.86M 次下载、GitHub Stars 达 1.51k, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「collection」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tightenco/collect 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tightenco/collect 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tightenco/collect 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This package provides type-safe extension of the laravel collection, forcing a single type of object.
Traits to build collections of specific objects
ItalyStrap Helpers
Froq! Collection.
Model and Collection classes
A simple collection library for PHP.
统计信息
- 总下载量: 20.86M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1541
- 点击次数: 22
- 依赖项目数: 461
- 推荐数: 6
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04
