How to make php composer a common tool for the whole company
Experienced students can share their experience, what points need to be focused, or general ideas, thank you
Currently there are many systems in the company, and the public libraries used by each system are also very different. They are all maintained by themselves.
Some systems have never used composer. Now I am wondering if I can use composer to make something more public and unified. Maintain public libraries, or public code
Build an internal composer warehouse within the company and change the code base to be organized using composer. . . Composer needs to use namespaces, and old code must be modified.
1. Plan public services yourself first, make construction drawings, and write down all the pros and cons clearly.
2. Convene a meeting with the heads of each system to review your construction drawings to see if there are any problems, and then understand the needs of other systems.
3. How to access and implement the entire document sharing with minimal impact on the changes.
ps: Of course, the company should have its own gitlab warehouse.
composer.json itself supports sourcing from the git warehouse. Therefore, as long as it is code controlled by git and meets the package specifications, it can be managed by composer.
The introduction of composer will cause a problem, each project holds a vendor. Our approach is to share the public parts, but this is very awkward. Because simple dependencies are fine, but complex dependencies are troublesome. If your company allows a project to hold its own vendor, that would be great. You can start doing it now. If you don’t have any good ideas, I call on everyone to write code that has nothing to do with the business into packages!