Skip to content

Add a tips about the Build-in web server included in PHP 5.4 #1523

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 2 commits into from
Jul 9, 2012

Conversation

athieriot
Copy link
Contributor

Hi,

When I start looking at the Symfony 2.0 quick tour, I find out that it was pretty difficult to bootstrap a simple project without having a whole http/php/fastcgi configuration.

It can be somehow reluctant to new users not used to this kind of system management and who just want to start coding as fast as possible.

So, as the new version of PHP provide a perfect way to avoid such boilerplate, I propose to add a small tip at the beginning of the quick tour to talk about this alternative.

I though that the quick tour is the place where I wanted to find this information at my first visit. But if you think that a Cook Book would be better, I can change my Pull Request to reflect the change.

Thank you for, at least, looking at it.

Aurélien


.. code-block:: bash

php -S localhost:80 -t www
Copy link
Member

Choose a reason for hiding this comment

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

``www` is not the web folder of the application. When using the built-in webserver, you could use directly the appropriate folder (and symfony 2.1 has a command launching it for you)

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 set 'www' to be consistent with the documentation which refer to localhost/Symfony.
But my question about the Cook Books was about this kind of delicacies (Write more details about the command options).

I didn't knew about that in version 2.1, did you think I should wait?

@weaverryan
Copy link
Member

Hi Aurélien!

I think this is a really excellent thing to bring up, and the quick tour is the best place for it (we may also mention it in other places, but certainly it should be mentioned here).

Since there is a command for this in Symfony 2.1, we should use it, but I don't see any reason not to document this in 2.0. So, here's what I think we should do:

  1. Change the "www" in the code example to "/path/to/www", just so it's absolute.

  2. Add some note to clarify what "www" means. Something like this (added after the code block):

where "/path/to/www" is the path to some directory on your machine that you'll extract Symfony into so that the eventual URL to your application is "http://localhost/Symfony/app_dev.php". You can also extract Symfony first and then start the web server in the Symfony "web" directory. If you do this, the URL to your application will be "http://localhost/app_dev.php".
  1. After this PR is merged, open a separate pull request against the "master" branch of the docs that replaces this with something that talks about the new command (details here: https://github.com/symfony/symfony/pull/3465/files).

Thanks!

@athieriot
Copy link
Contributor Author

Hi Ryan,

Thank your for your review.
I update the message like you said and I'll be pleased to make a separate Pull Request for this awesome feature as soon as I can :)

Hope this one is ok for you.

Aurélien

weaverryan added a commit that referenced this pull request Jul 9, 2012
Add a tips about the Build-in web server included in PHP 5.4
@weaverryan weaverryan merged commit 6522ea2 into symfony:2.0 Jul 9, 2012
weaverryan added a commit that referenced this pull request Jul 9, 2012
@weaverryan
Copy link
Member

Hey Aurélien!

Looks great - I made some tweaks at sha: 9ed2ebb - the biggest is shortening the lines so that each breaks after the first word that crosses the 72nd character (so that we have lines that are approximately 73-78 in length).

I've also merged 2.0 into master, so you should be good to make the next PR to master!

Thanks for your help!

@wouterj
Copy link
Member

wouterj commented Mar 20, 2013

@athieriot ping, do you still want to document the new feature against the 2.1 branch? Otherwise, I'll plan it for the hack day.

@athieriot
Copy link
Contributor Author

Hi,

I am pretty sure that the new feature is already documented.
So I don't know if it's still needed?

Aurelien

@wouterj
Copy link
Member

wouterj commented Mar 21, 2013

Since Symfony 2.1, there is a server:run command which does exactly this (for PHP5.4). This message should get replaced with a short description of this command against the 2.1 branch.

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

Successfully merging this pull request may close these issues.

4 participants