Calling Developers!
We are reenergizing our code contribution process! Learn More

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

Options
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 Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options

    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
    Options

    @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 Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options

    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
    Options

    I really appreciate this ideology. 👏