- How do I install laravel-ready/license-connector in a Laravel app?
- Install it with Composer using composer require laravel-ready/license-connector, then publish the package config file with the vendor:publish command. Laravel's package auto-discovery registers the service provider, so no manual provider entry is usually needed. After publishing, set your licensing server URL and API credentials in the config or your .env file. Run php artisan config:clear if you cache configuration.
- Which PHP and Laravel versions does laravel-ready/license-connector support?
- Check the composer.json constraints on the exact tag you plan to use, because a major release can raise the minimum PHP and Laravel versions. Version 2.0.0 is a major bump, so confirm its floors against your current runtime matrix before upgrading. If v2 requires a newer framework release, treat the change as a platform upgrade rather than a routine package bump.
- How do I protect routes or features with the license middleware?
- The package ships middleware you register in your HTTP kernel or via the route middleware alias, then attach to the routes, groups, or feature endpoints you want gated. Requests pass only when the client can confirm a valid license against the licensing server. Apply it to the smallest set of routes that actually need enforcement so a licensing outage cannot take down unrelated parts of your app.
- How do I configure the license server URL and credentials?
- Publish the config file and set the licensing server base URL plus your license key or API credentials, preferably through environment variables so they differ per environment. Run php artisan config:cache afterwards so the values resolve correctly in production. Keep separate credentials for staging and production so test validations never touch live license records.
- What happens when the license server is unreachable or validation fails?
- Failure behavior depends on the package version and your configuration, so review the config options and test the exact scenarios you care about before shipping. Common patterns include blocking the request, falling back to a cached license, or allowing a grace period, and the difference matters for paying customers. Decide deliberately whether you prefer a false block or a temporary fail-open, then verify it against a staging licensing server.
- Is laravel-ready/license-connector compatible with the License Server package?
- Yes, it is built as the client counterpart to the License Server package and speaks the same HTTP contract. Compatibility is version-coupled, though, so confirm that the client major version matches a server version that supports it. Verify the pairing on staging before you roll v2 out to production.
- Can the connector check subscription status and verify available updates?
- Yes, the client exposes calls to validate a license, activate and deactivate it, check subscription status, and verify updates. That makes it useful for gating premium features, limiting activations per license, and delivering update entitlements. Wrap these calls in your own service layer so you can swap or fake them in tests.
- Is v2.0.0 a breaking change, and how do I migrate from v1.1.2?
- A v1 to v2 major bump means the public contract may have changed in a non-backward-compatible way, covering config keys, service provider bindings, facade methods, exceptions, and the HTTP contract with the server. The release notes reportedly contain only a compare URL, so treat every integration point as in scope until you review the diff. Pin v1.1.2 on main, branch for v2, publish and diff the config file between versions, and gate the upgrade on a passing integration test against a staging licensing server.
- How do I test license validation without hitting the production licensing server?
- Point the client at a staging or local licensing server and use throwaway license keys so test activations never pollute real records. In your automated tests, fake the underlying HTTP client so validation, activation, and update checks return canned responses without any egress. Also test the failure paths, including timeouts, invalid keys, and deactivated licenses, since those determine what your users actually see.
- Will laravel-ready/license-connector work in an air-gapped or offline environment?
- Not reliably, because the package's core function is outbound HTTP to a remote licensing server. In an air-gapped or heavily egress-restricted deployment you would need cached-license fallback or a fully offline validation mode, and that behavior is version-dependent. If your environment cannot reach the licensing server at all, evaluate whether a signed offline license file is a better fit than a remote connector.