Welcome Guest, Not a member yet? Register   Sign In
Documentation: Creating Composer Packages
#15

(08-01-2023, 01:38 AM)iRedds Wrote: @kenjis I placed the module in the vendor directory.
That is, if
"Acme\\" : "vendor/Acme/" - class autoloading works but short config name is not present and also Acme namespace is not visible via "php spark namespaces" command.
"Acme\\" : "Acme/" - everything works as expected.

Why did I specify vendor/Acme/?
If the developer can use the composer locally, but not on the server (that is, the developer stores the vendor directory in the repository and copies it to the server), then in this case he may well place his module in the vendor directory.
I believe that there should be no such restriction.

Okay, I got what you say.

We assume all packages in vendor/ are Composer packages (installed by composer),
and auto-discovery searches files in Composer package namespaces.
So your way does not work.

I think your way is a misuse, because Composer controls under vendor/.
If you put the module in vendor/, you should install it via composer.
Reply


Messages In This Thread
RE: Documentation: Creating Composer Packages - by kenjis - 08-01-2023, 05:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB