Skip to content

Document the new version option from the Symfony bin #12445

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

Merged
merged 1 commit into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions best_practices/creating-the-project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ to create files and execute the following commands:
.. code-block:: terminal

$ cd projects/
$ symfony new blog 3.4
$ symfony new --version=3.4 blog
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the version option would look better at the end than between the arguments ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think too but since there were already occurences like this in setup/symfony_server.rst I continued.


**Windows systems**:

.. class:: command-windows
.. code-block:: terminal

> cd projects/
> php symfony new blog 3.4
> php symfony new --version=3.4 blog

.. note::

Expand Down
18 changes: 7 additions & 11 deletions setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ with the ``new`` command:

.. code-block:: terminal

$ symfony new my_project_name 3.4
$ symfony new --version=3.4 my_project_name

This command creates a new directory called ``my_project_name/`` that contains
an empty project based on the most recent stable Symfony version available. In
Expand Down Expand Up @@ -106,24 +106,20 @@ Basing your Project on a Specific Symfony Version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In case your project needs to be based on a specific Symfony version, use the
optional second argument of the ``new`` command:
``version`` option of the ``new`` command:

.. code-block:: terminal

# use the most recent version in any Symfony branch
$ symfony new my_project_name 2.8
$ symfony new my_project_name 3.1
$ symfony new --version=3.3 my_project_name
$ symfony new --version=3.4 my_project_name

# use a specific Symfony version
$ symfony new my_project_name 2.8.3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any version lower to 3.3 does not work because symfony/skeleton did not exist (Could not find package symfony/skeleton with version 2.8.3.).

$ symfony new my_project_name 3.1.5

# use a beta or RC version (useful for testing new Symfony versions)
$ symfony new my_project 2.7.0-BETA1
Copy link
Contributor Author

@fancyweb fancyweb Oct 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BETA and RC does not work, I get Could not find package symfony/skeleton with version 3.4.0-RC1..

Even with more recent branches: Could not find package symfony/skeleton with version 4.3.0-BETA1. I guess we need to tag the skeleton too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The special version values are lts, stable, next, or previous.

We already document lts. I'm not sure about stable because it's the one used when you don't specify the version, so better not complicate things. About previous, I'm not sure either about documenting it in the docs. Finally, the next value may be interesting because it allows you to early test whatever the next Symfony version will be.

$ symfony new my_project 2.7.0-RC1
$ symfony new --version=3.3.10 my_project_name
$ symfony new --version=3.4.5 my_project_name

# use the most recent 'lts' version (Long Term Support version)
$ symfony new my_project_name lts
$ symfony new --version=lts my_project_name

Each version has its *own* documentation, which you can select on any documentation
page.
Expand Down
6 changes: 3 additions & 3 deletions setup/symfony_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ commands from the Symfony server:
.. code-block:: terminal

# creates a new project based on symfony/skeleton
$ symfony new my_project_name
$ symfony new --version=3.4 my_project_name

# creates a new project based on symfony/website-skeleton
$ symfony new --full my_project_name
$ symfony new --version=3.4 --full my_project_name

# creates a new project based on the Symfony Demo application
$ symfony new --demo my_project_name
$ symfony new --version=3.4 --demo my_project_name

You can create a project depending on a **development** version as well (note
that Composer will also set the stability to ``dev`` for all root dependencies):
Expand Down