PHP/Symfony App, Composer & dependencies

en

#1

Hi,

I’ve developed an app with Symfony and tried to package it for ynh.

My question is : how do I manage my dependencies ?
For now, I’ve committed all my vendor directory to my git repo but I find it inelegant :frowning:

What’s the good practice while developping an PHP app for ynh with composer ?
Should my script install composer locally while installing my app ?

Thanks !
enuts_

And by the way, my app : https://github.com/SimonMellerin/pilea
And the ynh package (mostly usable) : https://github.com/SimonMellerin/pilea_ynh


#2

I’m no app packaging expert, but I believe that yes, you should just call composer during the install script rather than package its dependencies into the git repo ?

As far as I understand this is what roundcube does e.g. here : https://github.com/YunoHost-Apps/roundcube_ynh/blob/master/scripts/_common.sh#L37

Edit: thank you for your work btw ! :wink:


#3

Thanks your answer and the roundcube example it perfectly answers my question