Add support php 8.4,8.5 and laravel 13.x#56
Closed
chienle wants to merge 1 commit intoandersao:masterfrom
Closed
Conversation
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.
Laravel 13 & PHP 8.4/8.5 Support
Overview
This change set extends
prettus/laravel-validationto officially declare compatibility with Laravel 13 and PHP 8.4 / 8.5. All existing APIs, contracts, and validation behaviour remain fully backward-compatible back to Laravel 5.4 and PHP 7.1.Additionally, it modernises the development toolchain by formally introducing PHPUnit 10/11 as a declared dev-dependency and removing deprecated PHPUnit XML configuration attributes that would cause warnings or failures on current PHPUnit versions.
Changed Files
1.
composer.json1.1 Package Description
The description was updated to immediately communicate the supported version range directly on Packagist, removing ambiguity for users browsing the registry.
1.2 PHP Version Constraint
Two changes are made here:
Minimum PHP floor raised from
>=5.4.0to^7.1— PHP 5.4 through 7.0 have been end-of-life for years and are no longer tested or supported by any active Laravel version. Using an open-ended>=constraint allowed Composer to attempt resolution against EOL PHP versions, risking confusing errors. The explicit^7.1floor now matches the minimum requirement of the lowest still-supported Laravel versions accepted by this package.PHP 8.4 and 8.5 explicitly declared — Although the Composer semver constraint
^8.0already resolves to any8.xrelease (including 8.4 and 8.5), the explicit declarations serve two purposes: they clearly document which versions are actively targeted and tested, and they improve the Packagist compatibility matrix metadata used by users and automated tooling to discover packages.1.3
illuminate/supportConstraint1.4
illuminate/validationConstraint^13.0was appended to both illuminate packages. These are the only two runtime dependencies of this package. All prior version constraints are preserved without modification to ensure full backward compatibility.1.5
require-devSection Addedphpunit/phpunitwas previously undeclared inrequire-dev, meaning CI and contributors would receive whatever version Composer resolved transitively. It is now explicitly pinned to^10.0|^11.0to:phpunit.xml(see below) to properly resolve its XML Schema Definition atvendor/phpunit/phpunit/phpunit.xsd.2.
phpunit.xmlThe configuration file was modernised to remove attributes that have been removed or deprecated since PHPUnit 10, which would otherwise emit deprecation warnings or fatal errors when running the test suite.
Removed Attributes
backupGlobals="false"backupStaticAttributes="false"convertErrorsToExceptions="true"convertNoticesToExceptions="true"convertWarningsToExceptions="true"syntaxCheck="false"Added: XSD Schema Reference
Adding the
xsi:noNamespaceSchemaLocationreference enables IDE validation and auto-completion ofphpunit.xmlattributes, and produces a clear error when an unrecognised attribute is used in future configuration changes.Final
phpunit.xml:3.
.travis.ymlThe CI test matrix was updated to reflect the new supported PHP range.
PHP Version Matrix
PHP 5.4, 5.5, 5.6 and HHVM were removed — all have been EOL for over a decade and are incompatible with both current Laravel and current PHPUnit. The matrix now covers the active PHP versions within the declared constraint range, starting from 8.1 (the oldest PHP version with active community support at the time of this change).
Test Runner Command
The bare
phpunitcommand relied on a globally installed binary, which is unreliable across CI environments. Using the vendor-local binary path is the standard practice for PHP projects and guarantees the explicitly declared version inrequire-devis always the one being executed.Resolved Dependency Verification
After running
composer update --with-all-dependencies, Composer resolved the following key packages:illuminate/supportv13.2.0illuminate/validationv13.2.0phpunit/phpunit11.5.55This confirms that the declared constraints correctly allow resolution to the latest Laravel 13 release.
Compatibility Matrix (Post-Change)
No Breaking Changes
ValidatorInterfacecontractAbstractValidatorpublic APILaravelValidatorbehaviourValidatorExceptionstructureMigration Notes
No code changes are required in applications using this package. The update is purely additive to the version constraints.
To take advantage of Laravel 13 support, run: