mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-02 17:59:36 +07:00
fix(devmanual): Roll back recommendation for authoritative class maps
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
@@ -30,6 +30,11 @@ Added APIs
|
||||
Back-end changes
|
||||
----------------
|
||||
|
||||
Optimized class loader
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This documentation previously recommended using any composer class loader optimization in :ref:`app-custom-classloader`. Unfortunately authoritative class maps do not work with the upgrade process of Nextcloud apps. When app code is replaced during an app upgrade, the autoloader has to load *new* classes as well. Authoritative class loaders don't do that by design. Use the simple class map optimization only.
|
||||
|
||||
Removal of PSR-0 class loader
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Replacing Nextcloud's autoloader
|
||||
|
||||
Nextcloud's autoloader for apps is flexible and robust but not always the fastest. You can improve the loading speed of your app by shipping and optimizing a Composer class loader with the app.
|
||||
|
||||
First of all, familiarize yourself with the `Composer autoloader optimization options <https://getcomposer.org/doc/articles/autoloader-optimization.md>`_ and how they work. (Authoritative) class maps are a good fit for Nextcloud apps.
|
||||
First of all, familiarize yourself with the `Composer autoloader optimization options <https://getcomposer.org/doc/articles/autoloader-optimization.md>`_ and how they work. Only level 1 optimization is suited for Nextcloud because authoritative class maps break upgrade processes where code is replaced dynamically and APCu is not a required extension.
|
||||
|
||||
Once Composer is set up and class maps have been dumped, you can replace the generic Nextcloud class loader with the Composer class loader. This is done by placing a file at `composer/autoload.php`. If Nextcloud finds this file for an app, no generic class loader will be registered. The following contents will wire the file to Composer's generated ``autoloader.php`` file:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user