Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Feature issue #82 Add a command to list versions #84

Closed
wants to merge 1 commit into from
Closed

Feature issue #82 Add a command to list versions #84

wants to merge 1 commit into from

Conversation

Pierstoval
Copy link
Contributor

Can you @javiereguiluz or @xabbuh tell me if this command sounds good for this feature ? I think I may need some feedback about it to further make the best work I can ;)

@javiereguiluz
Copy link
Member

@Pierstoval thanks you very much for having worked on this proposal. Unfortunately, I must say that we don't really need this command for the installer. Let me explain the reasons.

The idea of having a symfony.com/versions.json file is to allow the installer to be smarter in some special cases. So far, these are all the different cases allowed for the installer:

1. Provide no version:

$ symfony new blog

It installs the version called latest, which is understood by symfony.com, so the installer has nothing to do.

2. Provide an specific full version which is not installable:

$ symfony new blog 2.3.0

The installer contains all the needed logic to decide if a version is installable or not, so there is no need to do anything else in this case.

3. Provide an specific full version which is installable:

$ symfony new blog 2.3.23

The installer will simply install the given version, so again there is nothing else to do here.

4. Provide a specific full version which is unavailable:

$ symfony new blog 2.3.400

The installer will display an error because there is no package to download for that version. This is probable good enough, but we could improve the installer to display an error message saying: "2.3.400 version is not available because, right now, the highest 2.3 version is 2.3.23". This information can be obtained through the symfony.com7versions.json file

5. Provide the branch which you want to base your project on:

$ symfony new blog 2.5

This is a very useful feautre and a common requirement which right now the installer doesn't support. The isntaller should retrieve the latest version number from symfony.com/versions.json and then download the appropriate package.

To sum up, what we need right now is the 5th use case and optionally, we could also implement 4th use case, although is a low priority need. I think that you could reuse some code of the command that you proposed in this PR to implement the mentioned use case. What do you think?

@Pierstoval
Copy link
Contributor Author

That's great indeed, I'm gonna try to work on the 5th case in order to make the installer much more clever 😄
The 4th may be the object of a third PR, as it's not as useful as the 5th !

As this "versions" command is not much useful, we can either keep it for later, or close it, depending on your wish to see it some day :)

@javiereguiluz
Copy link
Member

I'm going to close this PR because ultimately we won't need this command and the core of this feature will be reused to allow installing "branch versions". This last feature is being developed in #90.

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

Successfully merging this pull request may close these issues.

2 participants