Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checker doesn't see php-core-extensions section from config file #82

Closed
ondrejmirtes opened this issue Aug 22, 2018 · 4 comments
Closed
Assignees
Milestone

Comments

@ondrejmirtes
Copy link

Hi,
I'm running Composer Require Checker on a codebase, like this:

php temp/composer-require-checker-1.0.0.phar check --config-file /Users/ondrej/Development/telfa/composer-require-checker.json composer.json

The composer-require-checker.json looks like this:

{
	"symbol-whitelist": [
		"null",
		"true",
		"false",
		"static",
		"self",
		"parent",
		"array",
		"string",
		"int",
		"float",
		"bool",
		"iterable",
		"callable",
		"void",
		"object"
	],
	"php-core-extensions": [
		"Core",
		"date",
		"pcre",
		"Phar",
		"Reflection",
		"SPL",
		"standard"
	]
}

The problem is that it still reports PHP core extensions:

ComposerRequireChecker 1.0.0
The following unknown symbols were found:
+-----------------------+--------------------+
| unknown symbol        | guessed dependency |
+-----------------------+--------------------+
| Exception             | ext-Core           |
| filter_var            | ext-filter         |
| FILTER_VALIDATE_EMAIL | ext-filter         |
| SplObjectStorage      | ext-SPL            |
| var_dump              | ext-standard       |
| count                 | ext-standard       |
| DateTimeImmutable     | ext-date           |
| base64_encode         | ext-standard       |
| DATE_ISO8601          | ext-date           |
| var_export            | ext-standard       |
| date_get_last_errors  | ext-date           |
| preg_match            | ext-pcre           |
+-----------------------+--------------------+

It does not ignore the first part of the config file because the keywords are no longer reported.

@maglnet
Copy link
Owner

maglnet commented Aug 22, 2018 via email

@ondrejmirtes
Copy link
Author

Yes, php in require was the missing thing 😊 I wasn't able to figure that out from the output.

@maglnet
Copy link
Owner

maglnet commented Aug 22, 2018

Ok, great.
I think of the following improvement:
If the guessed dependency is one of the extensions listed within php-core-extensions the guessed dependency should be php.
Opinions?

@freiondrej
Copy link

@maglnet I definitely agree. Today I ran into the very same issue and only because of the discussion in this issue I was able to find out why are the php-core-extensions "ignored".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants