Skip to content

"Main" vs versioned links / main broken #385

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

Closed
jrfnl opened this issue Dec 2, 2024 · 4 comments
Closed

"Main" vs versioned links / main broken #385

jrfnl opened this issue Dec 2, 2024 · 4 comments

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Dec 2, 2024

It appears the main branch of this repo has been removed.
This was the branch ReadTheDocs would previously default to and which would always point to the documentation of the latest release.

As a consequence of this, a lot of links to the PHPUnit documentation are in the form of https://docs.phpunit.de/en/main/[page].html and, as there doesn't appear to be any redirection in place, these links are now all broken and result in 404 pages.

Would it be an idea to either bring back the main branch ? Or to put rolling redirection in place for https://docs.phpunit.de/en/main/[page].html links to https://docs.phpunit.de/en/[#.#]/[page].html, where #.# would be updated whenever a new minor of PHPUnit is released ?

@sebastianbergmann
Copy link
Owner

sebastianbergmann commented Dec 2, 2024

It appears the main branch of this repo has been removed.

This is correct. This change was intentional and not a mistake.

This was the branch ReadTheDocs would previously default to and which would always point to the documentation of the latest release.

This is not correct: ReadTheDocs did build the main branch and made it available at https://docs.phpunit.de/en/main, but ReadTheDocs was manually configured to use the branch for the latest stable version of PHPUnit (at the moment 11.4 for example) as the default and therefore point to https://docs.phpunit.de/en/11.4 (for example) by default.

AFAIK, https://docs.phpunit.de/en/main was never "advertised" as an "official" artifact. Documentation for the next version must not be linked to (apart from pointing out mistakes in it, for example, of course). Permantently linking to https://docs.phpunit.de/en/main URLs does not make any sense to me as main will always be a moving target. The same holds true for latest, stable, etc.

TL;DR: https://docs.phpunit.de/en/main should have never existed and it no longer does. Links on the world wide web to this are not under my control. As far as I know, I cannot set up the redirects you ask for with ReadTheDocs.

@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 2, 2024

Thanks for your response @sebastianbergmann. Understood.

I ran into this for the README of PHPUnit Polyfills, which for the "current" release should generally always point to the latest version of the PHPUnit docs.

Based on the above, this would mean the links in that README would need to be manually updated every couple of months, whenever there is a new PHPUnit minor (which is kind of a pain in the neck 😔).

Do you know if ReadTheDocs offers a feature to always link to the "latest" version of the docs ?

@sebastianbergmann
Copy link
Owner

Do you know if ReadTheDocs offers a feature to always link to the "latest" version of the docs?

It does, but I have it disabled by choice:

Permantently linking to https://docs.phpunit.de/en/main URLs does not make any sense to me as main will always be a moving target. The same holds true for latest, stable, etc.

@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 3, 2024

@sebastianbergmann Guess I will just have to deal in that case. 🤷

jrfnl added a commit to Yoast/PHPUnit-Polyfills that referenced this issue Dec 6, 2024
Previously, the PHPUnit documentation would have a "main" branch/version, which contained the latest docs.
This branch has been removed, which means all the links to the PHPUnit docs in the README are now broken.

This commit fixes this up to point to the `11.5` branch, which is the latest PHPUnit minor.

Note: it will be a pain in the neck to have to continuously update these links whenever a new PHPUnit minor is released, but so be it. 🤷

Ref: sebastianbergmann/phpunit-documentation-english#385
jrfnl added a commit to Yoast/PHPUnit-Polyfills that referenced this issue Dec 6, 2024
Previously, the PHPUnit documentation would have a "main" branch/version, which contained the latest docs.
This branch has been removed, which means all the links to the PHPUnit docs in the README are now broken.

This commit fixes this up to point to the `11.5` branch, which is the latest PHPUnit minor.

Note: it will be a pain in the neck to have to continuously update these links whenever a new PHPUnit minor is released, so it would be nice to be able to automate this at some point.

Ref: sebastianbergmann/phpunit-documentation-english#385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants