Update the class reference directive to support Symfony AI classes#196
Merged
javiereguiluz merged 1 commit intoNov 17, 2025
Merged
Conversation
Collaborator
Author
|
I'm merging without waiting for reviews 🙏 ... but we can make new PRs later tof ix this in a different way if needed. Thanks! |
stof
reviewed
Nov 17, 2025
| // because of monorepo structure, the first part of the classpath needs to be slugged | ||
| // 'Agent' -> 'agent', 'AiBundle' -> 'ai-bundle', etc. | ||
| $monorepoSubRepository = u($monorepoSubRepository)->snake('-')->lower(); | ||
| $classRelativePath = u($classRelativePath)->replace('\\', '/'); |
Member
There was a problem hiding this comment.
u() is useless here. AbstractString::split already returns an array of AbstractString. Casting that object to string to create a UnicodeString again is doing extra work.
This was referenced Nov 24, 2025
javiereguiluz
added a commit
that referenced
this pull request
Nov 28, 2025
…ort (javiereguiluz) This PR was merged into the main branch. Discussion ---------- Improve the class directive code and add Symfony UX support This addresses `@stof`'s comments about unoptimized code: #196 (comment) and adds support for Symfony UX classes too. Commits ------- bec9b30 Improve the class directive code and add Symfony UX support
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.
We need to publish Symfony AI docs on symfony.com ASAP. The GitHub links generated for the classes used in Symfony AI docs are wrong, so we must fix that somehow. This PR proposes a possible fix.
In the future we'll need something better ... but we'r ealso migrating to another doc builder project, so it's not worth it to try to make it perfect now.