Repository navigation
First release cut from packages/validators in appwrite/appwrite.
Breaking changes
The classes that lived in the bare Utopia\ namespace move under Utopia\Validator\ (appwrite/appwrite#14263):
| Before | After |
|---|---|
Utopia\Validator |
Utopia\Validator\Validator |
Utopia\PHPStan\DisallowAssertEqualsExtension |
Utopia\Validator\PHPStan\DisallowAssertEqualsExtension |
The package now autoloads Utopia\Validator\ from src/ and requires PHP 8.5.
Compatibility
src/compat.php, loaded through autoload.files, keeps the old names working:
Utopia\Validatoris aliased up front. Code that extends it or is typed against it keeps working, and validators built on either name pass type checks against the other.- The PHPStan extension is aliased lazily, only when PHPStan asks for the old name, because a production install doesn't have PHPStan's interfaces.
The aliases will be removed in 3.0.0, so move imports to the new names before then. Every other class (Text, Hostname, URL, and so on) keeps its name, so code that only uses those can accept ^1.0 || ^2.0.