Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Updates in performance.rst #8410

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 11 commits into from
Prev Previous commit
Next Next commit
Changed autoloader generation to install-time (as it's the common use…
… case)
  • Loading branch information
Erdou committed Sep 20, 2017
commit 07baa05ed09c2f39a26d2a6bd42673227763f336
9 changes: 5 additions & 4 deletions 9 performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,26 +128,27 @@ Composer's autoloader to scan the entire application once and build a "class map
which is a big array of the locations of all the classes and it's stored
in ``vendor/composer/autoload_classmap.php``.

Execute this command to generate the class map (and make it part of your
Execute this command to generate the class map at install time (and thus make it part of your
deployment process too):

.. code-block:: bash

$ composer install --no-dev --optimize --classmap-authoritative --apcu
$ composer install --no-dev --optimize-autoloader --classmap-authoritative --apcu-autoloader

``--no-dev``
Excludes the classes that are only needed in the development environment
(e.g. tests).
``--optimize``
``--optimize-autoloader``
Dumps every PSR-0 and PSR-4 compatible class used in your application.
``--classmap-authoritative``
Prevents Composer from scanning the file system for classes that are not
found in the class map.
``--apcu``
``--apcu-autoloader``
You need to install APCu PHP extension to use this option.
It will cache the classmap in APCu. It won't generate the classmap though,
so you need to always use it with ``--optimize-autoloader``


.. tip::

If your production server still uses the legacy APC PHP extension instead of
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.