Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update the class reference directive to support Symfony AI classes#196

Merged
javiereguiluz merged 1 commit into
symfony-tools:mainfrom
javiereguiluz:fix_class_repository_urls
Nov 17, 2025
Merged

Update the class reference directive to support Symfony AI classes#196
javiereguiluz merged 1 commit into
symfony-tools:mainfrom
javiereguiluz:fix_class_repository_urls

Conversation

@javiereguiluz
Copy link
Copy Markdown
Collaborator

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.

@javiereguiluz
Copy link
Copy Markdown
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!

@javiereguiluz javiereguiluz merged commit b32f087 into symfony-tools:main Nov 17, 2025
3 checks passed
@javiereguiluz javiereguiluz deleted the fix_class_repository_urls branch November 17, 2025 14:57
// 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('\\', '/');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants