Skip to content

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.

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