File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
user_guide_src/source/concepts Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,36 @@ By default, it looks for Composer's autoload file at
101
101
``ROOTPATH . 'vendor/autoload.php' ``. If you need to change the location of that file for any reason, you can modify
102
102
the value defined in **app/Config/Constants.php **.
103
103
104
+ Priority of Autoloaders
105
+ =======================
106
+
104
107
If the same namespace is defined in both CodeIgniter and Composer, Composer's
105
108
autoloader will be the first one to get a chance to locate the file.
106
109
107
110
.. note :: Prior to v4.5.0, if the same namespace was defined in both CodeIgniter and Composer, CodeIgniter's autoloader was
108
111
the first one to get a chance to locate the file.
112
+
113
+ .. _autoloader-composer-support-improve-performance :
114
+
115
+ Improve Performance
116
+ ===================
117
+
118
+ .. versionadded :: 4.5.0
119
+
120
+ When you use Composer, you could improve the performance of autoloading with
121
+ Composer's classmap dump.
122
+
123
+ Add your ``App `` namespace in your **composer.json **, and run ``composer dump-autoload ``.
124
+
125
+ .. code-block :: text
126
+
127
+ {
128
+ ...
129
+ "autoload": {
130
+ "psr-4": {
131
+ "App\\": "app/",
132
+ },
133
+ ...
134
+ },
135
+ ...
136
+ }
You can’t perform that action at this time.
0 commit comments