RuntimeException vendor does not exist and could not be created

Googlers, do not use composer with sudo: Add your user in the www-data group (this action require you to logout and login again) sudo usermod -a -G www-data `whoami` Give the right permissions to /var/www sudo chown root:root /var/www sudo chmod 755 /var/www/ Give these permissions to your project sudo chown -R www-data:www-data /var/www/<project> sudo … Read more

Override PHP base dependency in composer

You can use –ignore-platform-reqs option for composer commands like install, update etc. –ignore-platform-reqs: ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these. See also the platform config option. https://getcomposer.org/doc/03-cli.md So you can try with composer install –ignore-platform-reqs

How to develop and include a Composer package?

Instead of creating a new repository, you can tell composer to use any local path: https://getcomposer.org/doc/05-repositories.md#path For instance, lets say that you have your PHP projects under ~/devel/projects You may have your main project in ~/devel/projects/main_project, and your “local package” in ~/devel/projects/local_package Define your composer configuration for the local package. In ~/devel/projects/local_package/composer.json. { “name”: “your_vendor_id/your_local_package”, … Read more

Difference between composer prefer-dist and prefer-source?

According to http://getcomposer.org/doc/03-cli.md, the –prefer-source option will prefer to create a package directory that is a “version control repository”. This is equivalent to you typing: $ git clone … or $ svn checkout … The –prefer-dist option will prefer to create a non-“version control repository”, which is equivalent to you typing: $ git clone … … Read more