diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..15bd1729 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "CI" diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 4a229ba6..1a2f6ee8 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -12,6 +12,6 @@ on: jobs: coding-standards: name: "Coding Standards" - uses: "doctrine/.github/.github/workflows/coding-standards.yml@3.0.0" + uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.0.1" with: composer-root-version: "3.0" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 8663499e..6da2ec72 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -12,7 +12,9 @@ on: jobs: phpunit: name: "PHPUnit" - uses: "doctrine/.github/.github/workflows/continuous-integration.yml@3.0.0" + uses: "doctrine/.github/.github/workflows/continuous-integration.yml@5.0.1" with: composer-root-version: "3.0" php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]' + secrets: + CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" diff --git a/.github/workflows/release-on-milestone-closed.yml b/.github/workflows/release-on-milestone-closed.yml index 44c68ffe..3cac620a 100644 --- a/.github/workflows/release-on-milestone-closed.yml +++ b/.github/workflows/release-on-milestone-closed.yml @@ -8,7 +8,7 @@ on: jobs: release: name: "Git tag, release & create merge-up PR" - uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@3.0.0" + uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.0.1" secrets: GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 3f411296..54801f51 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,6 +12,6 @@ on: jobs: static-analysis: name: "Static Analysis" - uses: "doctrine/.github/.github/workflows/static-analysis.yml@3.0.0" + uses: "doctrine/.github/.github/workflows/static-analysis.yml@5.0.1" with: composer-root-version: "3.0" diff --git a/composer.json b/composer.json index 1c4633f8..db9f82e5 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "doctrine/common": "^3.0", "phpunit/phpunit": "^8.5 || ^9.5", "symfony/cache": "^4.4 || ^5.4 || ^6.0", - "vimeo/psalm": "4.30.0 || 5.3.0" + "vimeo/psalm": "4.30.0 || 5.24.0" }, "conflict": { "doctrine/common": "<2.10" diff --git a/psalm-baseline.xml b/psalm-baseline.xml index d2e52875..c99afb10 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,19 +1,24 @@ - - - - getName - - - $parentClass === false - + + + + + + + + + nsSeparator, '\\', $fileName)]]> + - - $value + + + + + - - $value + + diff --git a/src/Persistence/Reflection/EnumReflectionProperty.php b/src/Persistence/Reflection/EnumReflectionProperty.php index 0ea9098d..114b9dbb 100644 --- a/src/Persistence/Reflection/EnumReflectionProperty.php +++ b/src/Persistence/Reflection/EnumReflectionProperty.php @@ -168,4 +168,14 @@ public function getDocComment(): string|false { return $this->originalReflectionProperty->getDocComment(); } + + /** + * {@inheritDoc} + * + * @psalm-external-mutation-free + */ + public function isPrivate(): bool + { + return $this->originalReflectionProperty->isPrivate(); + } } diff --git a/src/Persistence/Reflection/RuntimeReflectionProperty.php b/src/Persistence/Reflection/RuntimeReflectionProperty.php index 6c53f8df..5f520564 100644 --- a/src/Persistence/Reflection/RuntimeReflectionProperty.php +++ b/src/Persistence/Reflection/RuntimeReflectionProperty.php @@ -23,6 +23,7 @@ class RuntimeReflectionProperty extends ReflectionProperty /** @var string */ private $key; + /** @param class-string $class */ public function __construct(string $class, string $name) { parent::__construct($class, $name); diff --git a/tests/Persistence/RuntimePublicReflectionPropertyTest.php b/tests/Persistence/RuntimePublicReflectionPropertyTest.php index 5354ec43..1f29ea53 100644 --- a/tests/Persistence/RuntimePublicReflectionPropertyTest.php +++ b/tests/Persistence/RuntimePublicReflectionPropertyTest.php @@ -61,7 +61,7 @@ public function testGetValueOnProxyPublicProperty(): void $mockProxy->__setInitializer($initializer); $reflProperty = new RuntimePublicReflectionProperty( - __NAMESPACE__ . '\RuntimePublicReflectionPropertyTestProxyMock', + RuntimePublicReflectionPropertyTestProxyMock::class, 'checkedProperty' ); @@ -82,7 +82,7 @@ public function testSetValueOnProxyPublicProperty(): void $mockProxy->__setInitializer($initializer); $reflProperty = new RuntimePublicReflectionProperty( - __NAMESPACE__ . '\RuntimePublicReflectionPropertyTestProxyMock', + RuntimePublicReflectionPropertyTestProxyMock::class, 'checkedProperty' ); diff --git a/tests_php81/Persistence/Reflection/EnumReflectionPropertyTest.php b/tests_php81/Persistence/Reflection/EnumReflectionPropertyTest.php index fead5f60..57590a8b 100644 --- a/tests_php81/Persistence/Reflection/EnumReflectionPropertyTest.php +++ b/tests_php81/Persistence/Reflection/EnumReflectionPropertyTest.php @@ -125,6 +125,12 @@ public function testGetDocComment(): void $reflProperty = new EnumReflectionProperty(new ReflectionProperty(TypedEnumClass::class, 'suit'), Suit::class); self::assertStringContainsString('@MyDoc', $reflProperty->getDocComment()); } + + public function testIsPrivate(): void + { + $reflProperty = new EnumReflectionProperty(new ReflectionProperty(TypedEnumClass::class, 'suit'), Suit::class); + self::assertFalse($reflProperty->isPrivate()); + } } #[Attribute(Attribute::TARGET_PROPERTY)]