How do I install Composer on a shared hosting?

This tutorial worked for me, resolving my issues with /usr/local/bin permission issues and php-cli (which composer requires, and may aliased differently on shared hosting). First run these commands to download and install composer: cd ~ mkdir bin mkdir bin/composer curl -sS https://getcomposer.org/installer | php mv composer.phar bin/composer Determine the location of your php-cli (needed later … Read more

How do I get Composer to download the latest commit in the master branch from GitHub for a package?

There is only one way to grab the head of the repository: “require”: { “behat/mink-selenium2-driver” : “dev-master” } “minimum-stability”: “dev” Oh well, at least two ways: “require”: { “behat/mink-selenium2-driver” : “dev-master as 1.1.x-dev” } “minimum-stability”: “dev” Probably at least three ways: “require”: { “behat/mink-selenium2-driver” : “dev-master#2e73d8134ec8526b6e742f05c146fec2d5e1b8d6” } “minimum-stability”: “dev” Because that repository actually aliased the … Read more

class does not comply with psr-4 autoloading standard. Skipping [duplicate]

The PSR-4 standard requires your files and directories to be case sensitive and the corresponding classes and namespaces to be in PascalCase. For a App\Controllers\BaseController class, the file should be located in: app/Controllers/BaseController.php Notice the uppercase C 2nd error: For any namespace after the top level namespace, there must be a directory with the same … Read more

but these conflict with your requirements or minimum-stability

Add minimum-stability and prefer-stable to your composer.json (not composer.lock): { “name”: “coderstephen/slack-client”, “keywords”: [“slack”, “api”, “realtime”], “license”: “MIT”, “description”: “A better Slack client, with RTM API support”, “authors”: [{ “name”: “Stephen Coakley”, “email”: “me@stephencoakley.com” }], “require”: { “php”: “>=5.5”, “devristo/phpws”: “dev-master”, “evenement/evenement”: “2.0.*”, “guzzlehttp/guzzle”: “~6.0”, “react/event-loop”: “^0.4.1”, “react/promise”: “^2.2” }, “require-dev”: { “phpunit/phpunit”: “~4.6”, “fzaninotto/faker”: … Read more

How to add non-public repositories from command line with composer?

You can run the following from the project root to add a repository to the project’s composer.json: composer config repositories.repo-name vcs https://github.com/<orgname or username>/repo Then you can require the specific repo with: composer require <orgname or username>/repo:dev-branchname The Composer documentation covers it at Modifying Repositories (CLI: composer config).

How to always use ignore-platform-reqs flag when running composer?

It’s recommended to fake php version, rather than ignore platform requirements. Add “platform”:{“php”:”5.5″} to your ~/.composer/config.json or use composer config -g -e to edit it. An example of sufficient config to fake php version: { “config”: { “platform”:{ “php”:”5.5″ } } } It may have much more options though. UPDATE: starting from v2.3.0 you can … Read more