-
Notifications
You must be signed in to change notification settings - Fork 113
Conversation
if (!preg_match('/^2\.\d(?:\.\d{1,2})?(?:-(?:dev|BETA\d*|RC\d*))?$/i', $this->version)) { | ||
throw new \RuntimeException('The Symfony version must be 2.N or 2.N.M (where N and M are positive integers). The special "-dev", "-BETA" and "-RC" versions are also supported.'); | ||
if (!preg_match('/^[23]\.\d(?:\.\d{1,2})?(?:-(?:dev|BETA\d*|RC\d*))?$/i', $this->version)) { | ||
throw new \RuntimeException('The Symfony version must be 2.N or 2.N.M or 3.N or 3.N.M (where N and M are positive integers). The special "-dev", "-BETA" and "-RC" versions are also supported.'); | ||
} | ||
|
||
if (preg_match('/^2\.\d$/', $this->version)) { |
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.
this needs an update too
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.
Fixed!
@Pierstoval thanks for this! A new test for 3.0 version would be great. You just need to add a new item to this data provider: https://github.com/symfony/symfony-installer/blob/master/tests/Symfony/Installer/Tests/IntegrationTest.php#L96 |
@javiereguiluz I added the test but it'd need more integration to make it succeed, because of Symfony3 different structure, so it'll need more updates on the tests :) |
@Pierstoval and that's why the installer didn't have support for Symfony 3 yet. It's not a matter of changing just a number :) |
I'm on it ;) |
Done it! Just, there's still a problem: the Plus, I don't know when it'll be available (I don't know this info about the release process) but the http://symfony.com/versions.json should be updated in order to show the state of the |
If needed, I can patch a workaround for the |
*/ | ||
protected function isSymfony3() | ||
{ | ||
return strpos($this->version, '3') === 0; |
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.
return '3' === $this->version[0];
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.
Fixed, thanks! I didn't know this syntax would be fully compatible :)
I've tested this PR and everything works fine for me. I'll merge it soon unless someone raises a valid concern. @Pierstoval I'd like to do just a minor change: - " * Change your current directory to <comment>%s</comment>\n\n", $this->projectDir
+ " * Change your current directory to <comment>%s</comment>\n", $this->projectDir This change prevents the ugly double blank line in the command output: |
Done in eba3537 😄 |
@Pierstoval thanks for working on this. I've merged the changes and I'll release a new version of the installer soon, so we can test everything well and it's ready for the big Symfony 2.8 and 3.0 launch next week. Thanks! |
Hey guys, now released 😄