Welcome Guest, Not a member yet? Register   Sign In
$psr4 and namespace
#10

(04-01-2024, 06:04 AM)PhilInLoco Wrote: Investigating a bit, I saw that Composer just maps all the classes in the file autoload_classmap and I suppose I could do the same in the autoload file from CI. This is not very smart, but it works.

The classmap in autoload_classmap is for optimization by Composer.
Because looking for files from the filesystem takes time.
It is configured in https://github.com/codeigniter4/CodeIgni...r.json#L83

You can define classmap manually in the CI4 autoloader:
https://codeigniter4.github.io/CodeIgnit...l#classmap
But if you use Composer, you don't need to use it.
Reply


Messages In This Thread
$psr4 and namespace - by PhilInLoco - 03-31-2024, 01:27 PM
RE: $psr4 and namespace - by kenjis - 03-31-2024, 06:50 PM
RE: $psr4 and namespace - by PhilInLoco - 04-01-2024, 02:00 AM
RE: $psr4 and namespace - by kenjis - 04-01-2024, 02:06 AM
RE: $psr4 and namespace - by PhilInLoco - 04-01-2024, 02:21 AM
RE: $psr4 and namespace - by kenjis - 04-01-2024, 02:26 AM
RE: $psr4 and namespace - by PhilInLoco - 04-01-2024, 02:37 AM
RE: $psr4 and namespace - by InsiteFX - 04-01-2024, 03:56 AM
RE: $psr4 and namespace - by PhilInLoco - 04-01-2024, 06:04 AM
RE: $psr4 and namespace - by kenjis - 04-01-2024, 06:01 PM
RE: $psr4 and namespace - by PhilInLoco - 04-02-2024, 05:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB