What are the Slack Archives?

Itโ€™s a history of our time together in the Slack Community! Thereโ€™s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you wonโ€™t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hey everyone if I want to move all the files related to the product module from `/vendor` directory

U040LMJF6TY
U040LMJF6TY Posts: 30 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

Hey everyone if I want to move all the files related to the product module from /vendor directory to src/Pyz/Zed how can I do that??

Comments

  • Alberto Reyer
    Alberto Reyer Posts: 690 ๐Ÿช - Explorer

    First you should question if this is really necessary.

    If you want to modify certain functionality you can extend the module including the functionality by providing the same class in the Pyz namespace and adapting the related Factory

    If you really want to modify the whole module, you can just copy over all files from the module and adapt the namespace by replacing Spryker with Pyz, but there is very rarely, I would even say never, the case to do so.

  • U040LMJF6TY
    U040LMJF6TY Posts: 30 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    @UL6DGRULR Thanks for the answer. I am exploring the architecture and finding ways to do the modifications. I was working with laravel and it is providing features to do that. That's why I asked the questions.

  • Alberto Reyer
    Alberto Reyer Posts: 690 ๐Ÿช - Explorer

    If you just copy the whole code you will from that time on have to maintain it.
    That's why Spryker provides the ability to only overwrite the pieces of the code, preferable by using composition over inheritance, so you need to maintain only the code you really need and the rest of the module is maintained by Spryker, which significantly lowers your maintenance burden.

  • U040LMJF6TY
    U040LMJF6TY Posts: 30 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    I really appreciate this ideology. ๐Ÿ‘