PHP Composer mixed with Git Submodules and Symfony2

I have a project in which a large Symfony2 application, I want to introduce git submodules for the components that we build here ourselves. The problem here is that each component also requires the composer packages to function properly for themselves, and now I have composer packages for the symfony2 application and composer packages needed for this component, and I'm not sure how to handle / configure these dependencies here.

At the moment, I manually run the "build setup" for each component (git subodule), adding, implying that each component has its own "vendor" folder, this is far from ideal, so I come to the Stack to get good advice on how easy it is to maintain these dependencies dependencies of composers and component components.

I don’t need to check the synchronization of versions of symfony2 files with deps components, I just need to make them simple and convenient without performing a “composer update” with every git submodule that we configure.

Thanks!

EDIT

Now I am using the key repositoriesto create URLs for my github repositories for my companies. I can use a singular private repo, I will call it repo A. However, when I add Repo B and do Repo A requireRepo B, it will not be fixed properly.

composer.json for Repo A (user reporting component): https://gist.github.com/dragoonis/6ea92e062762c516baea

Composer.json for Repo B (database component): https://gist.github.com/dragoonis/e54b47b75a79b82ebaea

The following error message appears: https://gist.github.com/dragoonis/d79cd2c2dd5cc50bcd2a

The component package opinurate / database exists as one of the repos defined in the key respositories.

Conclusion

Satis "packagist", .

Satis 'http://packages.mydomain.com' URL 'repositories' composer.json. , , satis, URL git.

+4
3

, , git. , , .

, , Satis , , satis repo composer.json.

Satis - Packagist, , composer install, , . - Composer : https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md

packages.yourcompany.com composer.json . .

: , compartimentalizes, , "" composer.json, , Repo A , . . Satis "satis" composer.json.

"" composer.json Repo A B, .

+6

, , , , , , How Git , ?

0

You should use a .gitignore file containing something like this:

    web/bundles/
    app/cache/*
    app/logs/*
    app/sessions/*
    build/
    vendor

When developing, you should run php composer.phar updatefrom time to time. When your work is verified, you must commit the file composer.lockwith your development.

When deployed, you can simply run php composer.phar install.

-2
source

Source: https://habr.com/ru/post/1527473/


All Articles