https://github.com/bafs/illuminate-light-collections
The Illuminate Collections package, without the unnecessary files (~140 contracts/class).
https://github.com/bafs/illuminate-light-collections
illuminate laravel
Last synced: 3 months ago
JSON representation
The Illuminate Collections package, without the unnecessary files (~140 contracts/class).
- Host: GitHub
- URL: https://github.com/bafs/illuminate-light-collections
- Owner: BafS
- Created: 2024-08-27T03:37:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-27T09:29:14.000Z (almost 2 years ago)
- Last Synced: 2025-05-07T12:43:19.527Z (about 1 year ago)
- Topics: illuminate, laravel
- Language: PHP
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Illuminate Light Collections
This package provides Illuminate Collections minus hundreds of contracts from
`Illuminate\Contracts` that are not used by this library.
This library can be used for external libraries or projects that don't depend on
Laravel framework.
## Install
```shell
composer req bafs/illuminate-light-collections
```
## Why?
Illuminate collections is a handy library to work will collections, but it requires
`illuminate/contracts` which provides hundreds of contracts from the Illuminate framework
and that are not useful when working outside the Laravel ecosystem. Only 3 contracts are
used by Collections (`Arrayable`, `CanBeEscapedWhenCastToString`, `Jsonable`).
## I don't like monkey patching, can I remove it too?
Yes, it's also possible to disable the monkey patching from the
[Macroable](https://github.com/illuminate/macroable) library (`illuminate/macroable`).
To do so, use the [Demacroable](https://github.com/BafS/Demacroable) package
(`bafs/illuminate-demacroable`) in your project (it will replace the Macroable trait with an empty one).