Coder Social home page Coder Social logo

Comments (10)

mjpramos avatar mjpramos commented on May 22, 2024 1

Thanks! Works perfectly now :)

from phpinsights.

nunomaduro avatar nunomaduro commented on May 22, 2024

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.

ManojKiranA avatar ManojKiranA commented on May 22, 2024

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.

mjpramos avatar mjpramos commented on May 22, 2024

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.

ManojKiranA avatar ManojKiranA commented on May 22, 2024

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.

nunomaduro avatar nunomaduro commented on May 22, 2024

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.

mjpramos avatar mjpramos commented on May 22, 2024

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.

nunomaduro avatar nunomaduro commented on May 22, 2024

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.

Jibbarth avatar Jibbarth commented on May 22, 2024

@mjpramos Can you run a composer update and tell us if it's fixed for you ?

from phpinsights.

nunomaduro avatar nunomaduro commented on May 22, 2024

Thanks @Jibbarth for this!

from phpinsights.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.