Skip to content
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

Idea: Add a reference for linking to recipes #17

Open
weaverryan opened this issue Jan 5, 2019 · 6 comments
Open

Idea: Add a reference for linking to recipes #17

weaverryan opened this issue Jan 5, 2019 · 6 comments

Comments

@weaverryan
Copy link
Contributor

Sometimes we link to a file in a recipe. That's pretty easy - it's just a link to a file on GitHub. Except for one interesting complication. For example, on Symfony 4.1, if I want to link to a file in the FrameworkBundle recipe, I need to link to the 3.3 directory (e.g. https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/config/bootstrap.php). But on 4.2, suddenly there is a new recipe and so a new directory (e.g. https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/4.2/config/bootstrap.php).

This is a perfect example of something that we should not need to handle by hand, and in fact IF we handle it by hand, we will eventually mess it up (e.g. forget to update the URLs when there is a new recipe for Symfony 4.3).

@nikophil
Copy link
Collaborator

nikophil commented Feb 3, 2019

what do you recommand?
we could test if recipe for current version exists (i.e. https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/4.1/config/bootstrap.php returns 200)
and if not, we iterate on each lower version, until we find one which is working

@nikophil
Copy link
Collaborator

nikophil commented Feb 3, 2019

but that sounds a little bit cumbersome

@weaverryan
Copy link
Contributor Author

I think it probably must work like that. At least it’s during the build process only? Maybe we (during the build) clone the recipes repo into a tmp dir?

@weaverryan
Copy link
Contributor Author

Hmm, or possibly there may be a Flex endpoint that would give some info...

@nikophil
Copy link
Collaborator

nikophil commented Feb 3, 2019

how could we know ?

@weaverryan
Copy link
Contributor Author

Yea, I’m not sure the Flex api is technically public. So probably not a good option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants