Behat / Borg

behat.org 2.0. STALLED BECAUSE OF LACK OF TIME
9 stars 1 forks source link

Documentation packages refactoring #19

Closed everzet closed 9 years ago

everzet commented 9 years ago

This PR is a direct answer to the discussion in #7.

It separates notions of package and repository into separate domain concepts and basically builds thing discussed in https://github.com/everzet/Borg/issues/7#issuecomment-68584368 on top of it.

This should essentially fix issues 1, 4 and 5 of #7 and enable easy resolution of 2 and 3, which will come with a separate PR.

stof commented 9 years ago

I will review this PR this evening

everzet commented 9 years ago

:+1: thanks

stof commented 9 years ago

I see an issue currently: the package name validation in the domain and the package name requirement in routes are not consistent (the routing is stricter by allowing only some chars in the names). And the routing requirements are not compatible with Composer package names (which are allowing dots as well)

everzet commented 9 years ago

I see an issue currently: the package name validation in the domain and the package name requirement in routes are not consistent (the routing is stricter by allowing only some chars in the names). And the routing requirements are not compatible with Composer package names (which are allowing dots as well)

I think we can actually make route requirements much more liberating now. Lets just make sure there are no security tricks allowed, other than that - trying to get wrong documentation should just result us in being unable to find that documentation.

everzet commented 9 years ago

@stof "more liberating" = [^\/]++\/[^\/]++

stof commented 9 years ago

IMO, this will create other issues. If someone names its package v3.0/foo.html, it might create an issue for the foo.html page of the behat doc because of the URL patterns

everzet commented 9 years ago

@stof such a package will not get into the system because of the name constraints in *Package VOs.

stof commented 9 years ago

@everzet this is a valid composer package name

everzet commented 9 years ago

oh wait. No it will. v3.0/foo.html is a valid package name, is it :D

everzet commented 9 years ago

that's a very-very good point. Should we mount extensions documentation under different prefix (/extensions)? That should sort it out.

stof commented 9 years ago

anyway, let's discuss the URL patterns separately. They are not part of this domain refactoring. But yes, I think a prefix might help

everzet commented 9 years ago

@stof opened separate issue for that. Ok back to this refactoring. What else?

everzet commented 9 years ago

@stof anything else?

stof commented 9 years ago

:+1:

everzet commented 9 years ago

@stof next is support for develop, master and v2.0.x documentation versions :)

stof commented 9 years ago

I have an idea for a small improvement making it easier to handle consistent routing requirements. I will send it before this refactoring.