Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Rql Laravel Package

geekimo/php-rql

PHP RQL provides a PHP implementation of Resource Query Language for parsing and building expressive API query strings, with support for filters, comparisons, logical operators, sorting, and pagination. Useful for clean, consistent REST query handling.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Verify the runtime first. 3.0.0 is a PHP 8 compatibility release, and the major version bump strongly implies the PHP requirement moved to ^8.0 (dropping 7.x). Check the package's composer.json require.php constraint and your app's own constraint before upgrading:
    composer require vendor/package:^3.0
    composer why-not php 8.0   # surface transitive packages still pinning PHP 7
    
  • Read the upgrade path before touching code. With only "Fix php 8 compatibility" in the notes, the CHANGELOG and any UPGRADING.md are the real source of truth. A 3.0.0 that only mentions PHP 8 usually means: dropped PHP 7 support, and possibly signature/type changes required by PHP 8 (union types, return types, removed dynamic properties).
  • Publish and inspect the package surface. If the service provider exposes assets:
    php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider"
    php artisan migrate   # only if the package ships migrations
    
    Then look at, in order: the service provider (what gets bound), the config file (what is tunable), and the package's own test suite (the best documentation of intended usage).
  • First use case: a smoke test, not a feature. Resolve the package's main entry point from the container and exercise one happy path on PHP 8 before wiring it into controllers or jobs:
    $result = app(Vendor\Package\Contracts\Client::class)->ping();
    
    Or write a single feature test. This isolates "does it boot on PHP 8" from "did I integrate it correctly."

Implementation Patterns

  • Constructor injection over facades. Resolve the package's contract in the constructor of controllers, jobs, and listeners. This keeps the package swappable and makes it trivial to bind a fake in tests.
    public function __construct(private Vendor\Package\Contracts\Client $client) {}
    
  • Bind contracts in a service provider, not in the package. If you need a custom HTTP client, logger, or config-driven implementation, bind it in AppServiceProvider or a dedicated PackageServiceProvider. This is the primary extension point for most Laravel packages.
  • Keep configuration in config/. Move any package env vars into config/package.php and reference them with config('package.key'). Never call env() outside config files — it breaks under config:cache.
  • Wrap calls in jobs and events. If the package performs I/O (HTTP, storage, third-party API), call it from a queued job and emit a domain event on success/failure. This gives you retries, backoff, and observability for free.
  • Test with fakes and the container. Use Queue::fake(), Http::fake(), and RefreshDatabase as appropriate. If the package ships a fake or a testing trait, prefer it over mocking the concrete class.
  • Upgrade workflow for a major bump.
    1. Branch, bump the constraint to ^3.0.
    2. Run the full suite on a PHP 8.0/8.1/8.2 matrix in CI.
    3. Fix deprecation warnings (see below) before merging.
    4. Deploy to staging with php artisan optimize:clear and a fresh opcache.
  • Pin in production. Commit composer.lock and deploy with composer install --no-dev --optimize-autoloader. Major-version compatibility fixes are exactly the kind of release where a transitive dependency can surprise you.

Gotchas and Tips

  • A major version with a one-line changelog is a red flag, not a small release. Treat 3.0.0 as potentially breaking. Diff the package's public API against 2.x (or check the tags on the repo) if no upgrade guide exists. Pay attention to changed method signatures, renamed config keys, and removed methods.
  • PHP 8 strictness will surface latent bugs. Common failures after this kind of upgrade:
    • Passing null to non-nullable internal function parameters (now deprecated, will become a TypeError).
    • Dynamic properties on classes without #[AllowDynamicProperties] (deprecated in 8.2).
    • Required parameters declared after optional ones.
    • ${var} string interpolation (deprecated in 8.2).
    • Changed 0 == "foo" and string-to-number comparison semantics.
  • composer update --ignore-platform-reqs is a trap. It lets you install a package that will fatal at runtime. If you are blocked, set config.platform.php in composer.json to your real production version and resolve the conflict properly.
  • Clear every cache after upgrading. Config, route, view, and opcache all cache compiled code that may reference old signatures:
    php artisan optimize:clear
    composer dump-autoload -o
    
    In FPM, restart the pool or call opcache_reset().
  • Avoid relying on named arguments into package methods. PHP 8 makes named arguments easy to use, but a minor package release that renames a parameter silently breaks your call. Use positional arguments against third-party code.
  • Check Laravel version constraints too. A PHP 8 fix does not guarantee compatibility with your Laravel version. Verify the illuminate/support constraint in the package's composer.json matches your app.
  • Debugging checklist: composer diagnose, php -v, composer show vendor/package, then php artisan about to confirm the framework sees the expected versions. For runtime errors, php artisan tinker and resolve the class directly to reproduce outside the request lifecycle.
  • Extension points to reach for before forking: container bindings for the package's contracts, the manager's extend() method if it exposes one, published config, and package events/listeners. Forking should be the last resort — a fork means you own the PHP 8 compatibility work going forward.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core