cancel
Showing results for 
Search instead for 
Did you mean: 

Do I install custom extension into /vendor or /app/code?

SOLVED

Do I install custom extension into /vendor or /app/code?

We are developing a Magento 2.4.x website with the following:

 

- Custom developed theme, installed using Composer to /vendor

- 10+ third party extensions installed using Composer to /vendor (such as BSS Commerce One Page Checkout)

 

We are now developing our own extension which modifies both Magento 2 core files and also files within third party extensions.

 

Because we are overriding third party extensions installed in /vendor, do we need to install our custom extension in /app/code or can we also install this using Composer into /vendor?

 

Thanks,

Matt

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Do I install custom extension into /vendor or /app/code?

@matt_ryding 

Yes, it is okay to install the module using composer on the vendor. Since all override files are already mentioned in di.xml, no conflict occurred on both the original and override module..



If my answer is useful please accept as a solution and give Kudo
Thank you.

View solution in original post

26 REPLIES 26

Re: Do I install custom extension into /vendor or /app/code?

Hey @matt_ryding... 

Magento 2 use composer for managing modules, when you install a module through composer it is added to vendor/<vendor-name>/<module>.

You should not edit any code inside the vendor folder. If you’re developing your own module or if you want to continue the development of an existing module, add your files or clone a git repo to app/code/<vendor-name>/<module>.

If my answer is useful please accept as a solution and give Kudo
Thank You

 

Re: Do I install custom extension into /vendor or /app/code?

Hey @harshityadav 

 

Thanks for your update below.

 

I confirm that we are not modifying any code inside /vendor folder, maybe I have used the wrong terms for this.

 

We are continuing the development of an existing module and our development server stores our own module in app/code.

 

But, on our production server I would like to manage our module using Composer, which means it will be placed in /vendor.

 

Will this be OK, as our module extends an existing module which is also installed using Composer into /vendor?

Re: Do I install custom extension into /vendor or /app/code?

@matt_ryding 

Yes, it is okay to install the module using composer on the vendor. Since all override files are already mentioned in di.xml, no conflict occurred on both the original and override module..



If my answer is useful please accept as a solution and give Kudo
Thank you.

Re: Do I install custom extension into /vendor or /app/code?

@harshityadav 

 

Thank you very much, this is great to know and answers my question..

Re: Do I install custom extension into /vendor or /app/code?

I present you a website that offers free apps and games 2021 now, go to: android mods, to go to that site you can download apps you like.

Re: Do I install custom extension into /vendor or /app/code?

  1. Step 1: Upload the extension. Log into your hosting space via a FTP client. Unzip extension package and upload them into Magento root directory. Enter the following at the command line. ...
  2. Step 2: Configuration. Now time to setup it in backend. Go to Mageplaza  Extension Name  Configuration .  Entertainment Units

     

Re: Do I install custom extension into /vendor or /app/code?

I think they are specifically talking about adding code manually to vendor. Composer is the best option for production modules app/code is good for development.  

Re: Do I install custom extension into /vendor or /app/code?

I think yes. i have successfully encrypted https://fmwas.com

Re: Do I install custom extension into /vendor or /app/code?

I Have Also Install Successfully on Getintopc.app