Repository navigation
Move all classes to the Jschaedl\ApiClient namespace (0.2.0) - #3
Merged
Merged
Conversation
Api\ was too generic for a library: any application or package could claim it as well. Every class moves to Jschaedl\ApiClient\ and the sources from src/Api/ to src/; class names, sub-namespaces and behaviour are unchanged. UPGRADE-0.2.md has a tested one-liner for the migration. Co-Authored-By: Claude Opus 5.5 <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
Breaking: every class moves from
Api\toJschaedl\ApiClient\, and the sources fromsrc/Api/tosrc/. Class names, sub-namespaces and behaviour are unchanged. Released as 0.2.0.Api\is too generic for a library namespace: any application or package can claim it too. In the first consuming app (api-platform), eight test files already declarenamespace Api\Match;.Jschaedl\ApiClient\follows the usualVendor\Packagepattern and maps to the Packagist namejschaedl/api-client."Jschaedl\\ApiClient\\": "src/"git mv, so history follows themUPGRADE-0.2.mdhas a one-liner for consumers. It was tested on PHP and YAML with BSD (macOS) and GNU grep: it rewritesusestatements (groupuseincluded), fully qualified names, strings and YAML service IDs, and leavesMyApi\/App\ApiResource\alone. Rector isn't recommended:RenameNamespaceRectorno longer exists in Rector 2, andRenameClassRectorleavesusestatements unchanged for classes that no longer exist.Verification
Api\references left outsideUPGRADE-0.1.md, which documents 0.1 and stays as it wasmake testson PHP 8.5: unit 64, integration 13, e2e 2make cs-check,make analyseandrector --dry-runare clean🤖 Generated with Claude Code