Skip to content

Commit

Permalink
Revert "Merge pull request #675 from IceShack/feature/inheritPrivateP…
Browse files Browse the repository at this point in the history
…roperties0.12"

This reverts commit 6433464, reversing
changes made to 7155466.
  • Loading branch information
mcg-web committed Jul 8, 2020
1 parent 4440c09 commit 59cac21
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 62 deletions.
12 changes: 3 additions & 9 deletions src/Config/Parser/AnnotationParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,9 @@ private static function extractClassAnnotations(string $className): array
$classAnnotations = $annotationReader->getClassAnnotations($reflectionEntity);

$properties = [];
$reflectionClass = new \ReflectionClass($className);
do {
foreach ($reflectionClass->getProperties() as $property) {
if (isset($properties[$property->getName()])) {
continue;
}
$properties[$property->getName()] = ['property' => $property, 'annotations' => $annotationReader->getPropertyAnnotations($property)];
}
} while ($reflectionClass = $reflectionClass->getParentClass());
foreach ($reflectionEntity->getProperties() as $property) {
$properties[$property->getName()] = ['property' => $property, 'annotations' => $annotationReader->getPropertyAnnotations($property)];
}

$methods = [];
foreach ($reflectionEntity->getMethods() as $method) {
Expand Down
9 changes: 0 additions & 9 deletions tests/Config/Parser/AnnotationParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,6 @@ public function testTypes(): void
],
'builders' => [['builder' => 'MyFieldsBuilder', 'builderConfig' => ['param1' => 'val1']]],
]);

// Test a type extending another type
$this->expect('Cat', 'object', [
'description' => 'The Cat type',
'fields' => [
'name' => ['type' => 'String!', 'description' => 'The name of the animal'],
'lives' => ['type' => 'Int!'],
],
]);
}

public function testInput(): void
Expand Down
25 changes: 0 additions & 25 deletions tests/Config/Parser/fixtures/annotations/Type/Animal.php

This file was deleted.

19 changes: 0 additions & 19 deletions tests/Config/Parser/fixtures/annotations/Type/Cat.php

This file was deleted.

0 comments on commit 59cac21

Please sign in to comment.