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

Fix autoloader's callable's return type #720

Merged
merged 1 commit into from
Apr 21, 2023
Merged

Fix autoloader's callable's return type #720

merged 1 commit into from
Apr 21, 2023

Conversation

szepeviktor
Copy link
Contributor

@westonruter The bug is in scrivo/highlight.php

Copy link
Owner

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@szepeviktor
Copy link
Contributor Author

You're welcome.

@@ -7,9 +7,12 @@ parameters:
level: 9
paths:
# TODO: Move the PHP into an inc/ folder and then use that path. This will allow use of result cache.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szepeviktor by the way, are you familiar with this? Currently when I run phpstan in verbose mode, I get:

Result cache not used because only files were passed as analysed paths.

Is this truly only resolved by passing one or more directories? Seems somewhat of a strange requirement to use caching.

Copy link
Contributor Author

@szepeviktor szepeviktor Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems somewhat of a strange requirement to use caching.

PHPStan is an OOP-only too. In normal OOP code you have src/ with PSR-4-named class files.
That is the reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually "strange" goes for the WordPress ecosystem.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, yes, but understandably so. The WordPress ecosystem is much older than PSR-4 (this being the 20th year), and backwards-compatibility is a main goal in WordPress.

@westonruter westonruter merged commit 16d7464 into westonruter:develop Apr 21, 2023
@szepeviktor szepeviktor deleted the phpstan branch April 21, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants