Fix: merge persistent rules from config and plugin#12
Merged
Conversation
Previously, setting persistent rules via BotlyPlugin::make()->persistentRules()
caused any rules defined in config('botly.persistent_rules') to be ignored
because getPersistentRules() used a null-coalesce that short-circuited the
config lookup. Both sources are now merged, with config rules first followed
by plugin rules.
Fixes #5
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Laravel 11's security support window has ended, so Composer now refuses to install any 11.x release because they're flagged by security advisories, breaking the tests and phpstan matrices. Disable advisory blocking for the matrix install step so we can still test against Laravel 11. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The package supports filament/filament ^4.0|^5.0, but the matrix only ever tested the latest (v5) via prefer-stable. Filament 4 and 5 share the same Laravel/PHP support range (^11.28|^12|^13, PHP ^8.2), so Filament version is orthogonal to the Laravel axis. Rather than doubling the matrix, the base matrix is pinned to Filament 5 and a single Filament 4 job per Laravel line is added via include (+3 jobs per workflow). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Filament 5 pulls in Livewire 4, which requires PHP 8.3+, so Filament 5 is not installable on PHP 8.2. Pinning the base matrix to filament 5.* forced that impossible combo and broke the PHP 8.2 phpstan jobs (previously they resolved to Filament 4 implicitly). PHP 8.2 is now exercised against Filament 4. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Laravel 11 is EOL, so there's no value in spending CI time on it (the package still supports it as a transitive Filament dependency). Removing it also lets us drop the advisory-block workaround, since that only existed because EOL Laravel 11 releases are flagged by security advisories. PHP 8.2 coverage is kept on Laravel 12 + Filament 4. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5. Persistent rules defined in
config('botly.persistent_rules')were silently dropped whenever rules were also set viaBotlyPlugin::make()->persistentRules(...).The cause was a null-coalesce in
getPersistentRules()that short-circuited the config lookup as soon as the plugin had rules set:Both sources are now merged, with config rules first followed by plugin rules.
Testing
composer testpasses (Rector, Pint, PHPStan level 5, 37 Pest tests).🤖 Generated with Claude Code