Skip to content

Commit c2247ed

Browse files
committed
minor #11567 Replace the PHP built-in server with the Symfony CLI one (fabpot)
This PR was merged into the 3.4 branch. Discussion ---------- Replace the PHP built-in server with the Symfony CLI one <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> I think it makes sense as the built-in web server has many limitations, but also because it seems to not work on PHP 7.3 (see symfony/symfony#30471). Commits ------- 473e072 replaced PHP built-in server with the Symfony CLI one
2 parents f974b57 + 473e072 commit c2247ed

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

configuration/micro_kernel_trait.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ Next, create an ``index.php`` file that creates a kernel class and executes it::
7474
$response->send();
7575
$kernel->terminate($request, $response);
7676

77-
That's it! To test it, you can start the built-in web server:
77+
That's it! To test it, start the :doc:`Symfony Local Web Server
78+
</setup/symfony_server>`:
7879

7980
.. code-block:: terminal
8081
81-
$ php -S localhost:8000
82+
$ symfony server:start
8283
8384
Then see the JSON response in your browser:
8485

@@ -335,12 +336,13 @@ this:
335336
├─ composer.json
336337
└─ composer.lock
337338
338-
As before you can use PHP built-in server:
339+
As before you can use the :doc:`Symfony Local Web Server
340+
</setup/symfony_server>`:
339341

340342
.. code-block:: terminal
341343
342344
cd web/
343-
$ php -S localhost:8000
345+
$ symfony server:start
344346
345347
Then see webpage in browser:
346348

create_framework/front_controller.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ web root directory:
153153
Now, configure your web server root directory to point to ``web/`` and all
154154
other files won't be accessible from the client anymore.
155155

156-
To test your changes in a browser (``http://localhost:4321/hello?name=Fabien``), run
157-
the PHP built-in server:
156+
To test your changes in a browser (``http://localhost:4321/hello?name=Fabien``),
157+
run the :doc:`Symfony Local Web Server </setup/symfony_server>`:
158158

159159
.. code-block:: terminal
160160
161-
$ php -S 127.0.0.1:4321 -t web/ web/front.php
161+
$ symfony server:start --port=4321 --passthru=front.php
162162
163163
.. note::
164164

create_framework/introduction.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,13 @@ start with the simplest web application we can think of in PHP::
101101

102102
printf('Hello %s', $name);
103103

104-
You can use the PHP built-in server to test this great application in a browser
105-
(``http://localhost:4321/index.php?name=Fabien``):
104+
You can use the :doc:`Symfony Local Web Server </setup/symfony_server>` to test
105+
this great application in a browser
106+
(``http://localhost:8000/index.php?name=Fabien``):
106107

107108
.. code-block:: terminal
108109
109-
$ php -S 127.0.0.1:4321
110-
111-
Otherwise, you can always use your own server (Apache, Nginx, etc.).
110+
$ symfony server:start
112111
113112
In the :doc:`next chapter </create_framework/http_foundation>`, we are going to
114113
introduce the HttpFoundation Component and see what it brings us.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy