Skip to content

Patch 1 #8478

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

Closed
wants to merge 39 commits into from
Closed

Patch 1 #8478

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2d50550
minor #7914 Fix a typo (GuilhemN)
javiereguiluz May 18, 2017
4283d7a
Revert "minor #7914 Fix a typo (GuilhemN)"
xabbuh May 18, 2017
80138ca
Merge branch '3.4'
weaverryan May 18, 2017
502e333
Merge branch '3.4'
weaverryan May 20, 2017
faf37e9
Merge branch '3.4'
weaverryan May 30, 2017
a95f4f0
Merge branch '3.4'
xabbuh Jun 3, 2017
6088d32
Merge branch '3.4'
weaverryan Jun 12, 2017
bd5d036
Update example comment to remove unnecessary text
pierredup Jun 12, 2017
568f952
minor #8028 Update example comment to remove unnecessary text (pierre…
weaverryan Jun 13, 2017
47024b4
Merge branch '3.4'
weaverryan Jun 13, 2017
49e24b9
remove debugging class cache and bootstrap section
Jun 14, 2017
b1f957f
Merge branch '3.4'
weaverryan Jun 16, 2017
ec1263f
minor #8043 Remove debugging class cache and bootstrap section (fbour…
xabbuh Jun 18, 2017
40aaf42
Merge branch '3.4'
xabbuh Jun 18, 2017
4b21133
[Stopwatch] Document the reset method
jmgq Jun 24, 2017
946d224
Merge branch '3.4'
weaverryan Jun 28, 2017
b2d8234
Merge branch '3.4'
weaverryan Jul 2, 2017
76ffdd7
Merge branch '3.4'
xabbuh Jul 4, 2017
93c420e
Merge branch '3.3' into 3.4
weaverryan Jul 6, 2017
22cb2be
Merge branch '3.4'
weaverryan Jul 6, 2017
10923ef
feature #8082 [Stopwatch] Document the reset method (jmgq)
xabbuh Jul 7, 2017
17d1c39
Merge branch '3.4'
xabbuh Jul 9, 2017
2565b47
Updated the installation instructions for Symfony 4
javiereguiluz Jul 9, 2017
d7dd8dd
minor #8135 Updated the installation instructions for Symfony 4 (javi…
xabbuh Jul 11, 2017
6472665
Merge branch '3.4'
xabbuh Jul 11, 2017
0d603cb
Merge branch '3.4'
xabbuh Jul 18, 2017
d3483b2
Merge branch '3.4'
xabbuh Jul 18, 2017
f1c92a1
Merge branch '3.4'
xabbuh Jul 19, 2017
0ddc1d6
Updated the Requirements article for Symfony 4.0
javiereguiluz Jul 20, 2017
d3f079e
Merge branch '3.4'
xabbuh Jul 20, 2017
b5e0c9e
minor #8198 Updated the Requirements article for Symfony 4.0 (javiere…
xabbuh Jul 20, 2017
73cac76
Merge branch '3.4'
xabbuh Jul 21, 2017
220a158
Merge branch '3.4'
xabbuh Jul 21, 2017
3231d9a
Merge branch '3.4'
xabbuh Jul 21, 2017
ef97812
Merge branch '3.4'
xabbuh Aug 1, 2017
ac970b2
Merge branch '3.4'
xabbuh Aug 29, 2017
f654343
Merge branch '3.4'
xabbuh Sep 3, 2017
5710d64
Merge branch '3.4'
xabbuh Sep 22, 2017
0c4470a
Update usage.rst
adouiri Oct 4, 2017
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: 4 additions & 0 deletions components/stopwatch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ while it is still running.
.. versionadded:: 3.4
Full precision support was introduced in Symfony 3.4.

The stopwatch can be reset to its original state at any given time with the
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::reset` method, which deletes
all the data measured so far.

You can also provide a category name to an event::

$stopwatch->start('eventName', 'categoryName');
Expand Down
47 changes: 0 additions & 47 deletions debug/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,53 +14,6 @@ configuration is optimized for two main purposes:
* Be as similar as possible as the production environment to avoid problems
when deploying the project.

Disabling the Bootstrap File and Class Caching
----------------------------------------------

And to make the production environment as fast as possible, Symfony creates
big PHP files in your cache containing the aggregation of PHP classes your
project needs for every request. However, this behavior can confuse your debugger,
because the same class can be located in two different places: the original class
file and the big file which aggregates lots of classes.

This recipe shows you how you can tweak this caching mechanism to make it friendlier
when you need to debug code that involves Symfony classes.

The ``app_dev.php`` front controller reads as follows by default::

// ...

$loader = require __DIR__.'/../app/autoload.php';
Debug::enable();

$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
// ...

To make your debugger happier, disable the loading of all PHP class caches
by removing the call to ``loadClassCache()``::

// ...

$loader = require_once __DIR__.'/../app/autoload.php';
Debug::enable();

$kernel = new AppKernel('dev', true);
// $kernel->loadClassCache();
$request = Request::createFromGlobals();

.. tip::

If you disable the PHP caches, don't forget to revert after your debugging
session.

Some IDEs do not like the fact that some classes are stored in different
locations. To avoid problems, you can either tell your IDE to ignore the PHP
cache files, or you can change the extension used by Symfony for these files::

$kernel->loadClassCache('classes', '.php.cache');

Useful Debugging Commands
-------------------------

Expand Down
33 changes: 20 additions & 13 deletions reference/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,36 @@
Requirements for Running Symfony
================================

Symfony 3.4 requires **PHP 5.5.9** or higher to run, in addition to other minor
Symfony 4.0 requires **PHP 7.1.3** or higher to run, in addition to other minor
requirements. To make things simple, Symfony provides a tool to quickly check if
your system meets all those requirements.
your system meets all those requirements. Run this command to install the tool:

.. code-block:: terminal

$ cd your-project/
$ composer require requirements-checker

Beware that PHP can define a different configuration for the command console and
the web server, so you need to check requirements in both environments.

Checking Requirements for the Web Server
----------------------------------------

Symfony includes a ``config.php`` file in the ``web/`` directory of your project.
Open that file with your browser to check the requirements.
The requirements checker tool creates a file called ``check.php`` in the
``public/`` directory of your project. Open that file with your browser to check
the requirements.

Once you've fixed all the reported issues, delete the ``web/config.php`` file
to avoid leaking internal information about your application to visitors.
Once you've fixed all the reported issues, uninstall the requirements checker
to avoid leaking internal information about your application to visitors:

Checking Requirements for the Command Console
---------------------------------------------
.. code-block:: terminal

Open your console or terminal, enter in your project directory, execute this
command and fix the reported issues:
$ cd your-project/
$ composer remove requirements-checker

.. code-block:: terminal
Checking Requirements for the Command Console
---------------------------------------------

$ cd my-project/
$ php bin/symfony_requirements
The requirements checker tool adds a script to your Composer configuration to
check the requirements automatically. There's no need to execute any command; if
there is any issue, you'll see them in the console output.
Loading