Skip to content

2.0.0

Latest

Choose a tag to compare

@utopia-php-monorepo utopia-php-monorepo released this 08 Oct 15:09
· 5 commits to main since this release

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\Validator is 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.

Changes: appwrite/appwrite@5ebc928~1...validators/2.0.0