-
Notifications
You must be signed in to change notification settings - Fork 114
Detect dev/beta versions and provide appropriate instruction #144
Conversation
Fabbot criticizes the double quotes, but they are used everywhere in the file. How should I handle this? |
@xelaris ignore it outside your own code for now, until we fix it everywhere. The reason is that until recently, fabbot was not able to fix quotes. It was implemented only recently. |
Thanks @stof. I fixed the unnecessary double quotes related to my change. |
👍 the code looks good to me. Thanks @xelaris. |
@@ -182,6 +182,15 @@ protected function checkSymfonyVersionIsInstallable() | |||
)); | |||
} | |||
|
|||
if (preg_match('/^(\d\.\d).*-(dev|beta)\d*$/', $this->version, $matches)) { |
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 the regular expression should be /^(\d\.\d).*-(dev|beta\d*)$/
instead. Usually there will be no number behind the -dev
suffix. And what about making the match case-insensitive to support version numbers like 2.7-BETA
?
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.
Anyway, what is the reason for the .*
part?
@xabbuh You are right about the number behind The Making it case-insensitive seems to be a good idea. Please have a look at the updated PR. |
IMO if a new comer tries to install a dev/beta version (that he may had read in a blog or forum) with the symfony installer and see the following message with composer, he will be so confused a symfony dev know how to update symfony/symfony if needed |
I think it's good to propose to install the dev versions, but only on the 2015-04-16 11:57 GMT+02:00 Antoine Makdessi [email protected]:
|
Ok, so why talking about composer? |
You're right, we should not talk about composer as it is not used when retrieving the correct Symfony version. |
@Pierstoval symfony.com does not generate pre-built archives for branches (which would require regenerating them on each commit) |
So there is no "currently possible" way to install Symfony 2.7 with the installer? |
I propose you the following. Instead of outputting the Composer installation instructions, which may confuse some users, we could link to the new documentation article that explains how to use and install an inestable Symfony version. This article isn't published in the docs yet (and it hasn't even been accepted yet) but here it is: symfony/symfony-docs#5186 |
If there is no way to generate a package for dev/beta versions, this is far better I think |
@94noni I'm afraid there is no way to generate those packages. As pointed by @stof, that would require us to generate a new package whenever a new pull request is merged. In any case, using a inestable version is a "niche" thing with a simple alternative solution, as explained in the new doc. That's why I think there is no need to complicate things. |
👍 for the docs |
@javiereguiluz Would it be much overhead to build them for beta versions too? Making that possible would make it easier for people to test them and hopefully find issues before the final release. |
it could be possible for beta versions IMO. these are releases after all |
To sum up the above discussion, what about doing the following:
|
|
@Pierstoval beware that URL is case sensitive:
|
Thanks for pointing that, it's kind of important, we should then choose to |
So |
@94noni nope :( This already works (today):
This doesn't work (today):
|
Is a PR welcome for integrating dev and 2.7 args? |
@94noni I don't see a way to resolve this for |
@xabbuh according to http://symfony.com/versions.json, "dev" => "2.7.0-BETA1" so if there is a zip ready on the server, it will be downloaded, no? (see discussion on the lts #105 (comment)) |
Can any branch present in the versions.json file can be considered as "installable" except If yes, there's not much to do in the installer to allow them to be installed, just need to add a check that matches "BETA" to ensure that the "probably uninstallable" branch is effectively installable, except |
@javiereguiluz @94noni Although @Pierstoval e.g. the 2.8 branch, listed by I think, regardless of the listed branches in To enable a user to specify beta versions explicitly as an argument, the validation has to be changed and the command should ensure the |
The |
@Pierstoval If your last comment is related to mine... I don't said dev versions should be downloaded, do I? Actually this PR was created to prevent the installer to try to download such versions. |
…oni, javiereguiluz) This PR was merged into the 1.0-dev branch. Discussion ---------- Improve the installation of -dev and -BETA versions This finishes #159, which is related to #144 and #143. The new behavior of the installer: 1) When installing a regular Symfony version, nothing changes from the previous installer. 2) When you install a `beta` version, you see a warning message:  3) When you try to install a `dev` version, you get a better error message and a link to the article that will solve your problem:  Commits ------- 6751701 Fixed again one test 3ea393a Fixed one test f45a29a Fixed again the version parser regexp 165813c Added new tests for BETA and RC versions 9e41335 Updated the version parser regular expression b26b217 Added support for RC versions and normalized version names 31765ca Made comparisons case insensitive because Composer doesn't differentiate 'BETA1' from 'beta1' 9b3cdc1 The trailing number is only available for BETA versions not for 'dev' versions d03938f Fixed syntax issues d67b4ad Improved the error message for "-dev" versions 4c26d2b Warn the user when downloading an unstable version 94a1f98 Simplified the new feature a bit d58812a Installation dev/beta versions (143)
see #143