phpinsights: SniffDecorator.php is throwing Runtime Exception

Q A
Bug report? yes
Feature request? no
Library version 1.14

I’m getting the following issue when I run the below command:

vendor/bin/phpinsights --no-interaction --min-quality=90 --min-complexity=80 --min-architecture=80 --min-style=95 --config-path=config/insights.php

image

I’m using “nunomaduro/phpinsights”: “^1.14”

My Observation:

This issue is not there in the version 1.13 but I’ve seen this issue has been fixed in 1.14 as well but still getting the same issue. Because when install package version with “^” symbol it is always fetching latest package i.e; version 1.14.

Also, when I see the code in SniffDecorator.php file on git repo 1.14 version I’m not seeing below piece of code

set_error_handler(static function (): bool {
            throw new \RuntimeException();
        }, E_NOTICE);

But when I download the package into my application using “composer require” command then inside “vendor/nunomaduro” I’m able to see the same lines of code mentioned above. This particular code snippet causing an issue.

I guess the gip available on git repo might not be properly made.

Hope you understand the issue and you gonna fix that in current latest branch/tag.

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29 (10 by maintainers)

Most upvoted comments

@bsomeshwer Great! Glad it worked 🙂

Hi @50bhan , Thank you! I have made the changes as you suggested and it’s all working fine now. Thanks a lot!!

Thanks @50bhan , I’ll send you here the verbose output. Let us check if that helps.