Comments (10)
Thanks! Works perfectly now :)
from phpinsights.
That's because you are using a different php binary in your CLI. Let's keep this open, maybe someone would like to help you.
from phpinsights.
Hey dude that'sβ not issue.Actually I was running my project in php 7.1.23 but still I had installed package and it's was working fine . Just try composer require nunomaduro/phpinsights --dev --ignore-platform-reqs
from phpinsights.
I updated my PHP CLI following the answer here link
Installation ran smoothly.
But now, when I try to use it, it gives me:
Fatal error: Uncaught TypeError: array_keys() expects parameter 1 to be array, null given in /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Adapters/Laravel/Preset.php:70
Stack trace:
#0 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Adapters/Laravel/Preset.php(70): array_keys(NULL)
#1 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/ConfigResolver.php(67): NunoMaduro\PhpInsights\Application\Adapters\Laravel\Preset::shouldBeApplied(Array)
#2 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/ConfigResolver.php(36): NunoMaduro\PhpInsights\Application\ConfigResolver::guess('/Applications/M...')
#3 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Console/Commands/AnalyseCommand.php(88): NunoMaduro\PhpInsights\Application\ConfigResolver::resolve(Array, '/Applications/M...')
#4 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Console/Commands/AnalyseCommand.php(68): NunoM in /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Adapters/Laravel/Preset.php on line 70
Thanks/Obg
from phpinsights.
I updated my PHP CLI following the answer here link
Installation ran smoothly.But now, when I try to use it, it gives me:
Fatal error: Uncaught TypeError: array_keys() expects parameter 1 to be array, null given in /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Adapters/Laravel/Preset.php:70 Stack trace: #0 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Adapters/Laravel/Preset.php(70): array_keys(NULL) #1 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/ConfigResolver.php(67): NunoMaduro\PhpInsights\Application\Adapters\Laravel\Preset::shouldBeApplied(Array) #2 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/ConfigResolver.php(36): NunoMaduro\PhpInsights\Application\ConfigResolver::guess('/Applications/M...') #3 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Console/Commands/AnalyseCommand.php(88): NunoMaduro\PhpInsights\Application\ConfigResolver::resolve(Array, '/Applications/M...') #4 /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Console/Commands/AnalyseCommand.php(68): NunoM in /Applications/MAMP/htdocs/cr/vendor/nunomaduro/phpinsights/src/Application/Adapters/Laravel/Preset.php on line 70
Thanks/Obg
Are you trying in laravel app or some other canβ you specify that
from phpinsights.
Can I see your composer.json? I think I know the issue. I need to adapt the code to be prepared to a composer.json without requirements section.
from phpinsights.
As I said in my first post, it's non framework. Just some simple PHP classes.
My composer.json:
{ "require-dev": { "nunomaduro/phpinsights": "^1.0" } }
from phpinsights.
Alright, we need to prepare the class https://github.com/nunomaduro/phpinsights/blob/master/src/Application/ConfigResolver.php and all presets https://github.com/nunomaduro/phpinsights/tree/master/src/Application/Adapters to that type of composer.json.
from phpinsights.
@mjpramos Can you run a composer update
and tell us if it's fixed for you ?
from phpinsights.
Thanks @Jibbarth for this!
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 3
- Can't use with PHPUnit 11 HOT 1
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.