extend all src files in one way

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!
User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

extend all src files in one way

Post by ahmed31916 » 21 Jun 2022, 12:56

Hello Aimeos,

Can I copy all the files in the path:"vendor\aimeos\ai-client-html\src\Client"
and paste it to the "packages\myExt\src\Client" of the extension, so the templates will relay on it, ineasted of the vendor?

If it succeed, it will give us a lot of comfort.

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

Re: extend all src files in one way

Post by aimeos » 24 Jun 2022, 09:42

No, that won't work that way because then, there will be two files with the same name and composer may choose the wrong one leading to hard to find problems in your code base. Furthermore, you won't be able to get any bugfixes for that code because you've overwritten the complete file.

Instead, you should extend from the class you want the change, overwrite only the method you want to change and configure the new class name to be used instead.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply