-
Notifications
You must be signed in to change notification settings - Fork 25
Use github.com instead of api.symfony.com #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank you Wouter. |
@@ -42,7 +42,7 @@ public function resolve(Environment $environment, string $data): ResolvedReferen | |||
return new ResolvedReference( | |||
$environment->getCurrentFileName(), | |||
$methodName.'()', | |||
sprintf('%s/%s.html#method_%s', $this->symfonyApiUrl, str_replace('\\', '/', $className), $methodName), | |||
sprintf('%s/%s.php#method_%s', $this->githubUrl, str_replace('\\', '/', $className), $methodName), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these is no method_...
id on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, here is me hoping they'll add this one day 🙄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they did sth. else for other languages already 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, their own code navigation logic is based on server-side knowledge of the lines are which you need to navigate. The generated links are using their L*
anchors to navigate to specific line numbers. There is no special anchors in the page for the methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm correct, @OskarStark suggested them to add named anchors (i.e. class names or method names) besides line nr anchors and they were quite positive about that idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, they haven't done it yet, then. And we don't know which naming pattern they will use if they finally do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I did, but it's long time ago...
…aviereguiluz) This PR was merged into the main branch. Discussion ---------- Tweak the feature that links to Symfony repository URLs #136 was a very nice fix from Wouter, but I find the `GITHUB_URL` constant name too generic. Since we already have a `SYMFONY_DOC_URL`, I propose to rename it to `SYMFONY_REPOSITORY_URL`. Commits ------- ac3600b Tweak the feature that links to Symfony repository URLs
ref symfony/symfony-docs#16322