efureev / laravel-support
PHP Support Package for Laravel
Requires
- php: >=8.5
- ext-json: *
- ext-mbstring: *
- illuminate/cache: ^13.0
- illuminate/console: ^13.0
- illuminate/contracts: ^13.0
- illuminate/database: ^13.0
- illuminate/http: ^13.0
- illuminate/support: ^13.0
- illuminate/validation: ^13.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.52.0
- fakerphp/faker: ^1.23
- larastan/larastan: ^3.12
- marcocesarato/php-conventional-changelog: ^1.17
- orchestra/testbench: ^11.1
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^13.0
- predis/predis: ^3.2
- squizlabs/php_codesniffer: ^3.9
Suggests
- ext-pdo_pgsql: Required by the PostgresArray query scopes and cast
- illuminate/redis: Required by RedisCacher for pattern-based cache invalidation
Provides
None
Conflicts
None
Replaces
None
- dev-master
- v5.0.0
- v4.x-dev
- v4.0.0
- v3.0.0
- v2.1.0
- v2.0.0
- v1.20
- v1.19.1
- v1.19.0
- v1.18.1
- v1.18.0
- v1.17.1
- v1.17.0
- v1.16.5
- v1.16.4
- v1.16.3
- v1.16.2
- v1.16.1
- v1.16.0
- v1.15.2
- v1.15.1
- v1.15.0
- v1.14.1
- v1.14.0
- v1.13.3
- v1.13.2
- v1.13.1
- v1.13.0
- v1.12.2
- v1.12.1
- v1.12.0
- v1.11.1
- v1.11.0
- v1.10.3
- v1.10.2
- v1.10.1
- v1.10.0
- v1.9.0
- v1.8.0
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.1
- v1.0.0
- v0.11.5
- v0.11.4
- v0.11.3
- v0.11.2
- v0.11.1
- v0.11.0
- v0.10.3
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.6
- v0.9.5
- v0.9.4.2
- v0.9.4.1
- v0.9.4
- v0.9.3.2
- v0.9.3.1
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- v0.8.0
- v0.7.9
- v0.7.8
- v0.7.7
- v0.7.6
- v0.7.5
- v0.7.4
- v0.7.3
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.0
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.1
- v0.2.0
- v0.1.0
- v0.0.3
- v0.0.2
- v0.0.1
- dev-php7
- dev-add-sortable
This package is auto-updated.
Last update: 2026-09-15 11:21:04 UTC
README
Validation rules, Eloquent traits and service-provider scaffolding for Laravel packages and applications. No dependencies beyond the Illuminate components it actually uses.
Requirements
- PHP
>= 8.5 - Laravel
>= 13.0
Install
composer require efureev/laravel-support
Auto-discovered — no manual provider registration. To override the shipped messages:
php artisan vendor:publish --tag=laravel-support-lang
What is in it
Full reference in docs/; the sharp edges are collected in
docs/pitfalls.md.
| Validation rules | Delimited validates each item of a delimited string; Authorized checks a gate against the model a key points at; HasValidate adds one-off validation and typed request reads |
| PostgreSQL arrays | a cast and four query scopes for native text[] / integer[] columns, plus the literal encoder underneath |
| Sortable | hand-ordered model stacks (drag-and-drop friendly), with a migration helper and optional global scopes |
| Service providers | AbstractServiceProvider with runtime-aware boot hooks and helpers for configs, routes, translations, views, policies, commands and bindings |
| Model cache | per-model caching with automatic invalidation and a pluggable cacher |
| Model traits | bind a model into a request or service, resolve it from input, forbid selected methods |
| Resources & pagination | nest a paginated resource collection inside another resource; make additional() merge |
| Repository | a thin Eloquent repository base |
| Global helpers | toCollect(), objectToArray() |
Upgrading
5.0 raises the PHP floor to 8.5, drops the efureev/support dependency and moves three exception
classes. See docs/upgrade-5.0.md.
Tests
The suite runs against a real PostgreSQL, and the Redis cacher against a real Redis — both bugs those cover were invisible to anything less.
composer test # PHPCS + PHPStan + PHPUnit composer test-cover # the same, with coverage composer test:docker # the full gate in containers, no local services needed
Redis tests skip themselves when no server is reachable; composer test:docker and CI both
provide one.
Development
This is a library, so composer.lock is intentionally not committed and "lock": false is
set in composer.json. Every CI run resolves the latest matching dependency versions, which
surfaces incompatibilities with new Laravel/PHP releases early. Pin versions in the consuming
application, not here.
.gitattributes keeps tests, docs, CI and Docker out of the Composer archive — only src/,
resources/, composer.json, README.md, CHANGELOG.md and LICENSE reach a consumer's
vendor/. Verify with git archive --format=tar HEAD | tar -t.
Changelog
See CHANGELOG.md.
License
The MIT License (MIT). See LICENSE.