Minimum Laravel version is currently 5.7 due to the requirement of symfony/console 4.2
Older Laravel versions use much older version (example: L5.1 LTS required 2.7.*)
This may not be the only dependency issue, but is as far as I got when attempting to install the package
I have this problem too, tried to install it in a 5.5 LTS app
I encountered this issue as well in Laravel 5.5.
What if you install it globally instead of within your project itself and then use the binary to run on your project?
You could do it these ways.
Create a file path-to-your-project/phpinsight.sh
#!/bin/sh
composer global require nunomaduro/phpinsights
cp ~/.composer/vendor/nunomaduro/phpinsights/stubs/laravel.php phpinsights.php
php -d memory_limit=-1 ~/.composer/vendor/bin/phpinsights --config-path=phpinsights.php
Create a file path-to-your-project/phpinsight.sh
#!/bin/sh
rm -rf ../phpinsights
(
mkdir -p ../phpinsights
cd ../phpinsights
touch composer.json
echo '{}' > composer.json
composer require nunomaduro/phpinsights
)
php -d memory_limit=-1 ../phpinsights/vendor/bin/phpinsights --config-path=../phpinsights/vendor/nunomaduro/phpinsights/stubs/laravel.php
Refer to the official documentation on the solution for this:
https://phpinsights.com/get-started.html#avoid-composer-conflicts
Personally, I also add the: --dev, flag when requiring the package itself.
It was requested for me to post this as an issue, I believe Nuno may work to make this more compatible, but the workarounds might be the only solution. I cant comment either way. Ive been using a variation of above script and works fine for me.
There are two options to avoid this issue here: https://phpinsights.com.
Most helpful comment
You could do it these ways.
Option 1
Create a file
path-to-your-project/phpinsight.shOption 2
Create a file
path-to-your-project/phpinsight.sh