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

I just can’t solve this one. I’m on Linode 1G RAM basic plan. Trying to install a package via Composer and it’s not letting me. My memory limit is set to “-1” on PHP.ini Is there anything else I can do to get this installed? Loading composer repositories with package information Updating dependencies (including require-dev) … Read more

How to require a fork with composer?

This is my composer.json, I want to use Nodge’s fork of lessphp project on Github “repositories”: [{ “type”: “package”, “package”: { “version”: “dev-master”, “name”: “nodge/lessphp”, “source”: { “url”: “https://github.com/Nodge/lessphp.git”, “type”: “git”, “reference”: “master” }, “autoload”: { “classmap”: [“lessc.inc.php”] } } }], “require”: { “php”: “>=5.3.3”, “nodge/lessphp”: “dev-master” }, But I get this error when I … Read more

How to deploy correctly when using Composer’s develop / production switch?

Composer has the option to load several dependencies only while being in development, so the tools will not be installed in production (on the live server). This is (in theory) very handy for scripts that only make sense in development, like tests, fake-data-tools, debugger, etc. The way to go is to add an additional require-dev … Read more

require(vendor/autoload.php): failed to open stream

I know that this issue has been posted many times, but for me it seems to be a different problem. Indeed, this error Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\site_web\send_mail.php on line 3 Fatal error: require(): Failed opening required ‘vendor/autoload.php’ (include_path=”C:\xampp\php\PEAR”) in C:\xampp\htdocs\site_web\send_mail.php on line 3 appears at the … Read more

Composer install error – requires ext_curl when it’s actually enabled

I’m trying to install Facebook PHP SDK with Composer. This is what I get $ composer install Loading composer repositories with package information Installing dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 – Installation request for facebook/php-sdk dev-master -> satisfiable by facebook/php-sdk[dev-master]. – facebook/php-sdk dev-master requires … Read more

Running Composer returns: “Could not open input file: composer.phar”

I am new to symfony2 and reading symblog. In third chapter while trying with data-fixtures I tried the command: php composer.phar update but I got the error: Could not open input file: composer.phar So I googled a little and tried php composer.phar install but still getting the same error. So please guide how to deal … Read more

What Are the Differences Between PSR-0 and PSR-4?

Recently I’ve read about namespaces and how they are beneficial. I’m currently creating a project in Laravel and trying to move from class map autoloading to namespacing. However, I can’t seem to grasp what the actual difference is between PSR-0 and PSR-4. Some resources that I’ve read are… Battle of the Autoloaders Laracasts PSR-4 autoloading … Read more

How to remove unused dependencies from composer?

I installed a package with composer, and it installed many other packages as dependencies. Now I uninstalled the main package with composer remove packageauthor/packagename, but all the old dependencies were not removed. I expected composer to clean up and only keep packages that are required according to composer.json and their dependencies. How can I force … Read more