DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on

Do you commit the ./vendor in magento projects?

I came across a magento 2.3 project and I saw an intentional commit upon ./vendor also sometimes I saw manually editing code upon it.

This was an intentional action and not due to lack of knowledge. And the reason why is because composer may download breaking dependencies or may cause unstability because the versions are not too concrete. Therefore the latest subversions is installed upon composer install.

Furthermore, according to ma coleagues, any instability with vendor causes many manhours for debugging. As a result upon initial composer install they commit the ./vendor.

Is this also a practice you follow? Do you have an alternative approach? Is there a way to cement the installed versions regardless what dependencie's composer.json says?

Top comments (4)

Collapse
 
nordcomputer profile image
Mario

Nope, never...
I write own magento modules for our company - each one with an own github repository. I add the repository to the composer file, along with the module.

In principle, I only push the composer.lock and the composer.json to our magento repository. Everything else gets downloaded by composer that way.

If I need to change code from another vendor, I add it by a patch and add the patch file(s) to our repo.

I think, thats a very clean way of implementation.

Collapse
 
pcmagas profile image
Dimitrios Desyllas

Why end up with bad codebase?????

Collapse
 
nordcomputer profile image
Mario

With the way I am approaching it?

Thread Thread
 
pcmagas profile image
Dimitrios Desyllas

Well i found it like this and is not up to my hand some stuff.

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay