Confused about vendor files

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Confused about vendor files

Post by flomo » 03 May 2020, 12:08

I'm a bit confused about the Aimeos files. As I understand, the following happens, when installing Aimeos:

1. Composer downloads files to /vendor directory
2. Aimeos exports/copies files to the /ext directory
3. When we "php artisan vendor:publish", there are copies of files being made to the /public as well as to the /resources directory
4. When we create a custom extension, again, we copy files from /ext/ai... to /ext/custom-extension...

What is the purpose of the Aimeos files in /ext? Could these files not reside in the /vendor directory, as we are supposed to copy them in our custom-extension anyway when modifying?

Currently I have files like "aimeos.js" all over the place, which is a nightmare when upgrading. There doesn't seem to be a single source of truth.

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Confused about vendor files

Post by aimeos » 04 May 2020, 07:18

The extensions are stored in the ./ext/ directory so Aimeos can find them automatically. This is a common practice for applications offering extensions.

"php artisan vendor:publish" copies the CSS/JS files to the public directory because they must be accessible to frontend request. These files in ./public/ are also the files that are used. All others are only copies because: The real storage in Aimeos is ./ext/ai-client-html/client/html/theme/ but Laravel requires packages to provide them in ./vendor/aimeos/aimeos-laravel/public/ so "php artisan vendor:publish" can copy them to ./public/packages/aimeos/shop/themes/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Re: Confused about vendor files

Post by flomo » 04 May 2020, 07:37

Thanks for clarifying, that makes sense.

Does this mean, we have to exclude /ext from version control? Like /vendor?

User avatar
aimeos
Administrator
Posts: 7881
Joined: 01 Jan 1970, 00:00

Re: Confused about vendor files

Post by aimeos » 04 May 2020, 08:33

Yes, only custom extensions should be added to version control.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

flomo
Posts: 52
Joined: 26 Sep 2019, 15:11

Re: Confused about vendor files

Post by flomo » 04 May 2020, 08:41

That helped a lot, thank you!

Post Reply