Skip to content

Conversation

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

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