Repository navigation
refactor(client)!: move Client and the streaming interface under Utopia\Client - #331
Merged
Merged
Conversation
…ia\Client Utopia\Client and Utopia\Psr18\StreamingClientInterface sat outside the package's own namespace, so client declared the bare Utopia\ prefix and could not take the standard Utopia\<Ns>\ shape. They are now Utopia\Client\Client and Utopia\Client\Psr18\StreamingClientInterface, src/Client is flattened, and tests move to Utopia\Client\Tests. src/compat.php keeps the old names working through a lazy autoloader until the next major, so span, cdn, domains, messaging and storage keep working unchanged; CompatTest pins both aliases.
Contributor
|
PHP never autoloads a name while checking a declared type, so the lazy aliases left storage's S3 device, whose property is typed against Utopia\Psr18\StreamingClientInterface, rejecting the moved Retry decorator. compat.php now calls class_alias up front, and CompatTest checks a consumer typed only against the old names in a fresh process.
This was referenced Sep 23, 2026
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
Moves client's two classes that sit outside its own namespace, so the package can take the standard
Utopia\Client\shape before it is absorbed into appwrite/appwrite. This is step B ofrfc/monorepo.mdfor client, released first so the absorb needs no interim handling. That handling is why appwrite/appwrite#13850 was closed.Utopia\ClientUtopia\Client\ClientUtopia\Psr18\StreamingClientInterfaceUtopia\Client\Psr18\StreamingClientInterfacesrc/Client/*is flattened intosrc/, and the manifest declaresUtopia\Client\→src/instead of the bareUtopia\.Utopia\Client\Testsandtests/Client/*is flattened. README, docs and CHANGELOG use the new names.src/compat.php(autoloadfiles) registersclass_aliasfor both old names at load time and keeps them until the next major. The aliases have to exist up front: PHP never autoloads a name while checking a declared type, so a lazy alias left storage's S3 device, typed against the old interface, rejecting the movedRetrydecorator. The first CI run caught this.CompatTestpins both aliases, and in a fresh process it checks a consumer typed only against the old names.This is the breaking change for a
0.5.0release:bin/monorepo release client 0.5.0once merged. Consumers on the old names keep working through the aliases.Validation
bin/monorepo validate: all packages validbin/monorepo check client: Pint, PHPStan and Rector passbin/monorepo test client: 188 tests (185 existing plus three compat tests)Follow-up
After
client/0.5.0is published: span, cdn, domains, messaging and storage here, plus agents in appwrite/appwrite, move to^0.5and the new names. The aliases are removed at client's next major.