Comments (7)
You could do it these ways.
Option 1
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
Option 2
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
from phpinsights.
I have this problem too, tried to install it in a 5.5 LTS app
from phpinsights.
I encountered this issue as well in Laravel 5.5.
from phpinsights.
What if you install it globally instead of within your project itself and then use the binary to run on your project?
from phpinsights.
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.
from phpinsights.
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.
from phpinsights.
There are two options to avoid this issue here: https://phpinsights.com.
from phpinsights.
Related Issues (20)
- Github actions skips config file HOT 1
- Configure insights (dokumentation)
- Configured excludes are ignored when specifying paths in the command
- Is there any sniff available for valid variable name when preset is Laravel
- DisallowedShortTernaryOperator suppress doesnt work
- How to add and config a PHP CS Fixer?
- Replace PHP cs fixer to Laravel pint? HOT 2
- Differences between switch and match sentences, impact on Cyclomatic Complexity HOT 5
- Provided files are ignored
- Support Symfony 7 HOT 4
- Add links to details or examples
- Ordered imports verification is incorrect
- Parameter type hint: Unparsable php code
- PHP CodeSniffer alternative HOT 2
- I am getting timeout error. Please guide me solution. HOT 2
- Laravel Lumen Error while running "php artisan insights" HOT 1
- Deprecated creation of dynamic property in SniffLoader
- Can not ignore SlevomatCodingStandard\Sniffs\Functions\FunctionLengthSniff
- Cannot install on laravel project based on php 8.3.4 | Your requirements could not be resolved to an installable set of packages. HOT 2
- Can't use with PHPUnit 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpinsights.