php - How to use composer with a huge codebase? -


we have huge code-base (i mean huge, 2m+ lines) in php. know how guys managed integrate composer in kind of situation.

specially when code cannot decoupled in little projects (right now) because of complexity (even mixed legacy code) , it's being hold in same svn repository.

  • why should confident in quality of composer/packagist libraries?
  • what happens if packagist goes down?
  • what should if vendor repository goes down (github/bitbucket/whatever)?
  • what happens if of vendors decide delete library?
  • what if they've been hacked , set next version tag empty?

i know possible problems over-passed in 1 way or another. fact life of lot people depending on makes me feel bit crazy kind of decision.

what think? best options?

for first point - if have legacy, 2m+ tighthly-coupled codebase, common open source projects quality shouldn't bother ;).

for rest - can use staging build project dependencies , build full package there (by mean dependencies downloaded , bundles). of course still dependent on external packages on development cycle, not in deployment/production. whenever package goes down, have time , possibility replace it.

composer great tool bundling yor project dependencies, it's both answer question "how use external dependencies" , "how independent them", need specify point, @ want bring independency project.

i think should develop external dependencies in mind, lowering code base as possible , not put these problems on devs shoulders, want use code, libraries, play tiem... then, somewhere in deployment process, bundle (staging place). if dependencies disappear , have spend development time replace them:

it still cost less handling on own.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -