How-to articles, tricks, and solutions about COMPOSER-PHP

Change composer global path (Windows)

To change the global path for Composer on Windows, you will need to update the system environment variables.

Composer loading from cache

When you use the Composer package manager to install PHP packages, it stores a local cache of the packages that you have installed.

Composer require local package

To require a local package in Composer, you can use the "path" option in the "require" section of your project's composer.json file.

Composer: Command Not Found

It looks like you are trying to use the composer command, but it is not recognized by your terminal.

Composer: file_put_contents(./composer.json): failed to open stream: Permission denied

This error message is indicating that the script is trying to write to the file "composer.json" in the current directory (indicated by "./"), but it doesn't have the necessary permissions to do so.

Composer: remove a package, clean up dependencies, don't update other packages

To remove a package with Composer, you can use the command composer remove [package-name].

Fatal error: Class 'Illuminate\Foundation\Application' not found

This error message indicates that the Laravel framework is unable to find the Application class from the Illuminate\Foundation namespace.

How do I install Composer on a shared hosting?

To install Composer on a shared hosting, you can use the following steps:

How to install PHP composer inside a docker container

To install PHP Composer inside a Docker container, you will need to do the following:

Installing specific laravel version with composer create-project

To install a specific version of Laravel using the Composer create-project command, you can specify the version number after the package name.

PHP Composer update "cannot allocate memory" error (using Laravel 4)

This error can occur when the composer process is trying to allocate more memory than is available to it.

Tell Composer to use Different PHP Version

To use a specific version of PHP with Composer, you can specify the version you want to use in the config section of your composer.json file.

The openssl extension is required for SSL/TLS protection

The openssl extension in PHP is required to provide SSL/TLS support.

Where to find composer's global packages?

Composer stores global packages in the "vendor/bin" directory within your system's home directory.