diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..eabea0d --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.github/workflows/harness.yml b/.github/workflows/harness.yml index ad6e301..0164122 100644 --- a/.github/workflows/harness.yml +++ b/.github/workflows/harness.yml @@ -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 diff --git a/composer.json b/composer.json index 5472a49..dae5a35 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/src/Collectors/WpHooksCollector.php b/src/Collectors/WpHooksCollector.php index 5312896..6acac83 100644 --- a/src/Collectors/WpHooksCollector.php +++ b/src/Collectors/WpHooksCollector.php @@ -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();