azjezz/psl
PSL (PHP Standard Library) offers a consistent, well-typed set of safer, async-ready APIs to replace PHP primitives. Covers async, collections, networking, I/O, cryptography, terminal UI, and type-safe data validation with predictable errors.
Psl\H2\ServerConnection) affecting untrusted client traffic. This is a must-upgrade for any Laravel app using PSL’s HTTP/2 server components directly (e.g., custom HTTP/2 endpoints). Complements Laravel’s built-in security checks (e.g., laravel-shift/laravel-debugbar).ArrayAccess/Iterator utilities to standardize Laravel collection handling.psl\Type\TypeGuard).psl\Http\Client for Laravel HTTP clients).psl\DateTime\Duration for Laravel scheduling).php-cs-fixer + psr/container for DI). PSL adds ~10MB to your dependency tree; justify if you need its opinionated utilities (e.g., psl\Filesystem\Path).Psl\H2\ServerConnection) and handle only trusted traffic. The 6.2.1 vulnerability is not applicable to:
psl\Http\Client).Illuminate\Http\Client).spatie/laravel-package-tools instead.symfony/polyfill or ramsey/uuid for niche needs."PSL is the ‘Underscore.js’ for PHP/Laravel—it standardizes 80% of boilerplate code (e.g., validation, HTTP calls, file handling) so our team spends less time arguing about formatting and more time shipping features. Critical update: PSL 6.2.1 patches a server-side HTTP/2 vulnerability that could let attackers bypass size limits or corrupt data in APIs using PSL’s HTTP/2 server components. This is a high-priority fix for any public-facing Laravel apps using PSL’s low-level HTTP/2 features.
Companies like [Example: Acme Corp] use it to reduce onboarding time by 30% and cut production bugs by 20%. It’s MIT-licensed, backed by 1.5K+ stars, and integrates seamlessly with Laravel’s ecosystem. Action required: Upgrade to 6.2.1 if you use Psl\H2\ServerConnection for untrusted traffic. The cost? A one-time migration effort (~2 dev-weeks) for a 10x long-term ROI in maintainability and security."
*"PSL gives us:
psl\Http\Client beats Guzzle for simple cases. Want type-safe collections? psl\Collection plays nice with Laravel’s Illuminate\Support\Collection.psl\Attributes) align with Laravel’s roadmap. Example: Use #[psl\Deprecated] to phase out legacy code.Psl\H2\ServerConnection. If your app uses this for untrusted traffic (e.g., public APIs, webhooks), upgrade immediately. For trusted internal traffic, this is still a recommended patch.composer require php-standard-library/psl:^6.2.1 and ./vendor/bin/psl check to your pipeline—no more flaky linting steps.
Downside: Steepest learning curve for junior devs, but docs include Laravel-specific examples. Let’s pilot it on [Project X] first and audit HTTP/2 usage in [Project Y] for the 6.2.1 fix."**"PSL is like Laravel’s ‘batteries optional’—it gives you sensible defaults for:
psl\Filesystem\Path::normalize() > str_replace hacks.psl\Http\Client (similar to Laravel’s HTTP client but stricter).psl\Validation\Validator with Laravel-like rules but type-safe.psl\Http\MockClient (no Guzzle dependency).
Security Alert: PSL 6.2.1 fixes a critical bug in Psl\H2\ServerConnection that could let attackers send malformed HTTP/2 data. If you’re using this for public APIs or webhooks, run:composer require php-standard-library/psl:^6.2.1
Not affected? You’re safe if you only use:
psl\Http\Client).composer require php-standard-library/psl:^6.2.1 and check out the Laravel Integration Guide. We’ll start with the psl\Array and psl\String utilities in [GitHub Issue #123] and audit HTTP/2 usage in [GitHub Issue #456]."*How can I help you explore Laravel packages today?