Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Pollora harness (QA-06): development files stay out of the archive Composer downloads
/.claude export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.harness.json export-ignore
/AGENTS.md export-ignore
/api-surface.json export-ignore
/composer-dependency-analyser.php export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/pint.json export-ignore
/rector.php export-ignore
/renovate.json export-ignore
/tests export-ignore
2 changes: 1 addition & 1 deletion .github/workflows/harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ permissions: {}

jobs:
harness:
uses: Pollora/harness/.github/workflows/php-package.yml@v0.1.8
uses: Pollora/harness/.github/workflows/php-package.yml@v0.1.15
permissions:
contents: read
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"pestphp/pest": "^3.8",
"php-stubs/wordpress-stubs": "^7.1",
"phpstan/phpstan": "^2.1",
"pollora/harness": "^0.1.8",
"pollora/harness": "^0.1.15",
"szepeviktor/phpstan-wordpress": "^2.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Collectors/WpHooksCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private static function describeClosure(\Closure $closure): string
// A file included from a method (a mu-plugin WordPress loads from
// Pollora's Bootstrap) gives its closures that class's scope: name
// the class only when the closure is written in it
$scope = $scopeClass !== null && $scopeClass->getFileName() === $reflection->getFileName() ? $scopeClass->getName() : null;
$scope = $scopeClass instanceof \ReflectionClass && $scopeClass->getFileName() === $reflection->getFileName() ? $scopeClass->getName() : null;

if (! str_contains($reflection->getName(), '{closure')) {
return $scope !== null ? "{$scope}::{$reflection->getName()}" : $reflection->getName();
Expand Down
Loading