v10: Breaking changes for PHP 8.4 and Laravel 12#1957
Merged
freekmurze merged 11 commits intomainfrom Feb 17, 2026
Merged
Conversation
…, add webhook notification channel, introduce BackupLogger, encryption enums, and new backup command options
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix PHPStan: remove unnecessary nullsafe operator before ?? in Notifiable - Fix null encryption config: use array_key_exists instead of ?? to properly handle null - Fix test constructor args: pass strings to BackupHasFailed/BackupWasSuccessful instead of domain objects - Fix encryption tests: use enum string values instead of ZipArchive integer constants - Fix event dispatch assertions: events are now always dispatched, --disable-notifications only suppresses notification handling - Fix EventHandler static state leak: reset EventHandler::enable() in TestCase setUp - Fix file inclusion test: clear default excludes that conflict with fake storage path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Lower PHP requirement from ^8.5 to ^8.4 (no 8.5-only features used) - Add PHP 8.4 to CI test matrix, run PHPStan on 8.4 - Fix backup tests: base_path() in testbench resolves inside vendor/, causing all files to be excluded by the vendor exclude rule. Use stubs directory as file source instead. - Update UnhealthyBackupWasFoundTest to match v10 notification format where failure details appear directly in content Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ConsoleOutput class was replaced by BackupLogger in v10, but the test file was left behind. Co-Authored-By: Claude Opus 4.6 <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
This is the v10 major release branch. It requires PHP 8.4+ and Laravel 12+, and contains several breaking changes aimed at modernizing the codebase and addressing long-standing community requests.
Serializable events
All events now carry primitive data (
string $diskName,string $backupName) instead ofBackupDestinationorBackupDestinationStatusobjects. This means events can be safely used with queued listeners, which was previously impossible (#1860).Breaking: If you listen to backup events, update your listeners to use
$event->diskNameand$event->backupNameinstead of$event->backupDestination.Decoupled notifications from events
Events now always fire, even when
--disable-notificationsis used. Notifications are gated separately viaEventHandler::enable()/EventHandler::disable(). This fixes the issue whereBackupWasSuccessfulwas never fired with--disable-notifications(#1744), and also means encryption (which depends on theBackupZipWasCreatedevent) works correctly regardless of notification settings.Replaced
ConsoleOutputsingleton withBackupLoggerThe global
consoleOutput()helper has been replaced bybackupLogger(), which uses a listener pattern. Console output is registered as a listener in the base command, making it easy to add custom log destinations.Notification discovery replaced with explicit map
EventHandlernow uses an explicit$eventToNotificationMaparray instead of string manipulation to find notification classes. Falls back to config-based discovery for custom notification classes.Resilient multi-destination backups
Added
continue_on_failureconfig option for backup destinations. When enabled, a failure on one destination won't abort the entire backup — it fires aBackupHasFailedevent for the failed destination and continues. Only throws if all destinations fail (#1708, #1934, #1939).Health check failure details
BackupDestinationStatusnow collects all health check failures instead of stopping at the first one.UnhealthyBackupWasFoundevent carries afailureMessagescollection.backup:monitorandbackup:listcommands display all failure reasons (#1509).New enums
Encryptionenum (none,default,aes128,aes192,aes256) replaces the old mixed null/false/string/int encryption configDumpFilenameBaseenum (database,connection) replaces stringly-typed config valuesEncryptBackupArchiveuses Config DTOThe encryption listener now receives the
ConfigDTO via constructor injection instead of callingconfig()directly.DefaultStrategyuses Config DTOThe default cleanup strategy now uses the typed
ConfigDTO ($this->config->cleanup->defaultStrategy->keepAllBackupsForDays, etc.) instead of raw array access. The recursiveremoveOldBackupsUntilUsingLessThanMaximumStoragemethod was also replaced with a while loop.New command options
--filename-suffix=— Append a suffix to the backup filename (Backup:run Filename Append #1802)--exclude=*— Exclude additional directories/files at runtime (Include/exclude folders at runtime #1869)--destination-path=— Override the backup destination path at runtime (Unable to specify destination path on runtime #1900)Graceful handling of missing directories
FileSelectionnow warns viabackupLogger()instead of failing when an included directory doesn't exist (#1671).Default excludes
storage/frameworkis now excluded by default (#1325).Backup verification
New
verify_backupconfig option. When enabled, the zip archive is opened after creation to verify it's valid and non-empty.Generic webhook notification channel
New
webhooknotification channel that POSTs JSON to a configurable URL. Works with Mattermost, Microsoft Teams, or any custom integration (#1711). All notification classes now include atoWebhook()method.Breaking changes
consoleOutput()helper replaced bybackupLogger()ConsoleOutputclass removedBackupJob::disableNotifications()removed — useEventHandler::disable()insteadCleanupJobno longer accepts$sendNotifications— events always fireCleanupStrategyconstructor changed fromRepository $configtoConfig $configDefaultStrategychanged from raw array config to typed Config DTOBackupDestinationStatus::getHealthCheckFailure()replaced bygetHealthCheckFailures()(collection)