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

Skip to content

Improve the class directive code and add Symfony UX support#198

Merged
javiereguiluz merged 1 commit into
symfony-tools:mainfrom
javiereguiluz:improve_code
Nov 28, 2025
Merged

Improve the class directive code and add Symfony UX support#198
javiereguiluz merged 1 commit into
symfony-tools:mainfrom
javiereguiluz:improve_code

Conversation

@javiereguiluz
Copy link
Copy Markdown
Collaborator

@javiereguiluz javiereguiluz commented Nov 24, 2025

This addresses @stof's comments about unoptimized code: #196 (comment) and adds support for Symfony UX classes too.

[$monorepoSubRepository, $classRelativePath] = $classPath->split('\\', 2);
$classRelativePath = $classRelativePath->replace('\\', '/');

$url = \sprintf('https://github.com/symfony/ux/blob/2.x/src/%s/src/%s.php', $monorepoSubRepository, $classRelativePath);
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.

Should we hardcode 2.x or should we have a configuration setting to allow linking to the appropriate version based on the version of the UX documentation being rendered ? Or is this meant to be used to reference UX classes from symfony-docs (and so not related to a UX version) ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We should allow to configure that version, yes. I opened #199 to handle this. Thanks!

@javiereguiluz javiereguiluz merged commit 1fa3d6a into symfony-tools:main Nov 28, 2025
3 checks passed
@javiereguiluz javiereguiluz deleted the improve_code branch November 28, 2025 13:59
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.

3 participants