On my local machine, I have php v7.0.3. A project of mine has a dependency on php v5.5. So as expected, a simple run of composer install crashes: I know I can ignore the platform via: yet I often forget to add the flag. Yet since the application runs inside a docker container, a mismatching php can install the dependencies
Tag: composer-php
Can’t move composer
When I install composer on my mac with: curl -sS https://getcomposer.org/installer | php And then try to move it like this: sudo mv php composer.phar /usr/local/bin/composer it’s telling me: …
ServiceProvider not found Laravel 5.0
I’m trying to create a custom package for Laravel 5.0 based on this tutorials The folder structure and service providers are exactly same, but some how the Serviceprovider is not updating autoload_namespace.php. I already added my service provider in app/config.php In my root composer.json I have following code. Under my packages folder files struture is as follows. I can’t use
permission denied for composer in /usr/local/bin/
I followed the documentation on https://getcomposer.org/doc/00-intro.md#globally to install composer globally on arch linux. When I do composer self-update, I get this message: [ErrorException] …
Where to find composer’s global packages?
For a plugin for Sublime Text I was required to install a composer package globally. In order to do this I had to run the following command: composer global require “asm89/twig-lint” “@stable” The …
Error: Class ‘Stripe’ not found
I’m trying to use the Stripe php api in a Bolt extension but it’s having trouble finding the class. I added the Stripe library to composer.json: And ran composer install. myextension/vendor/composer/autoload_classmap.php now shows the classes loaded: And now I’m trying to use it in the extension like this: But I get the error: Error: Class ‘Stripe’ not found File: extensions/local/andyjessop/myextension/Extension.php
installing cakephp 3 manually, without composer
I need to install CakePHP 3 in an old-fashioned upload-unzip-run way. The archive I’ve downloaded from cakephp/cakephp/tags does not contain the default folders like webroot, Model etc., which means it’s not complete. The official documentation does not cover this. Here’s a relevant Github issue I found, but the person ends up still using Composer. There’s also cakephp/app and it seems
How to test if composer.lock is up to date?
During development (multiple people in the team) sometimes composer install returns: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. Is there a way to check for this very quickly (in milliseconds, without making any changes)? I understand how composer works. However when
Can composer.phar be deployed with the code?
I’m using Composer for a small project. I’ve pushed composer.json and composer.lock to Git, and put the vendor/ folder into .gitignore, so I can install the dependencies at the server on deploy time. Can I push composer.phar to the Git repo or should I install a new copy for the server? Not sure if the installation process is machine-dependant. Answer
PHPUnit: “Class ‘Eloquent’ not found” when using @dataProvider
I’m running into an issue when writing unit tests with PHPUnit using @dataProvider in a Laravel app. The error I’m receiving is: PHP Fatal error: Class ‘Eloquent’ not found in /path/to/project/app/…