extend all src files in one way
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
extend all src files in one way
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.
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.
Re: extend all src files in one way
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.
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, give us a star
If you like Aimeos, give us a star