diff --git a/README.md b/README.md index 7edafd7..25fa5a1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ Camelot Doctrine Inheritance Mapping ==================================== +**NOTE:** For legacy PHP support (7.1+) please use the 1.0 branch. + Installation ------------ diff --git a/composer.json b/composer.json index 41eb9c5..132c92e 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "keywords": ["doctrine", "orm", "inheritance-mapping", "symfony", "symfony-bundle"], "require": { - "php": "^7.1.3", + "php": "^7.4", "doctrine/annotations": "^1.7", "doctrine/orm": "^2.5.11" }, diff --git a/src/Annotation/DiscriminatorMapItem.php b/src/Annotation/DiscriminatorMapItem.php index a9492a4..45ef759 100644 --- a/src/Annotation/DiscriminatorMapItem.php +++ b/src/Annotation/DiscriminatorMapItem.php @@ -11,8 +11,7 @@ */ final class DiscriminatorMapItem { - /** @var string|null */ - private $value; + private ?string $value; public function __construct(array $data) { diff --git a/src/Annotation/DiscriminatorMapLoader.php b/src/Annotation/DiscriminatorMapLoader.php index aa57423..cb5adec 100644 --- a/src/Annotation/DiscriminatorMapLoader.php +++ b/src/Annotation/DiscriminatorMapLoader.php @@ -18,12 +18,9 @@ */ final class DiscriminatorMapLoader { - /** @var Reader */ - private $reader; - /** @var MappingDriver */ - private $mappingDriver; - /** @var array */ - private $cachedMap; + private Reader $reader; + private MappingDriver $mappingDriver; + private array $cachedMap; public function __construct(Reader $reader, Configuration $config) { diff --git a/src/EventSubscriber/DiscriminatorSubscriber.php b/src/EventSubscriber/DiscriminatorSubscriber.php index 50e4f69..d14a743 100644 --- a/src/EventSubscriber/DiscriminatorSubscriber.php +++ b/src/EventSubscriber/DiscriminatorSubscriber.php @@ -9,8 +9,7 @@ class DiscriminatorSubscriber implements EventSubscriber { - /** @var DiscriminatorMapLoader */ - private $loader; + private DiscriminatorMapLoader $loader; public function __construct(DiscriminatorMapLoader $loader) { diff --git a/tests/Fixtures/Entity/SingleTable.php b/tests/Fixtures/Entity/SingleTable.php index edb5326..0a71c45 100644 --- a/tests/Fixtures/Entity/SingleTable.php +++ b/tests/Fixtures/Entity/SingleTable.php @@ -13,10 +13,8 @@ */ class SingleTable { - /** @var UuidInterface|null */ - protected $id = null; - /** @var string|null */ - protected $title = null; + protected ?UuidInterface $id = null; + protected ?string $title = null; public function getId(): ?UuidInterface { diff --git a/tests/Fixtures/Entity/SingleTableChild.php b/tests/Fixtures/Entity/SingleTableChild.php index a380567..4816c8d 100644 --- a/tests/Fixtures/Entity/SingleTableChild.php +++ b/tests/Fixtures/Entity/SingleTableChild.php @@ -13,8 +13,7 @@ */ class SingleTableChild extends SingleTable { - /** @var int|null */ - private $awesomeness = null; + private ?int $awesomeness = null; public function getAwesomeness(): ?int { diff --git a/tests/Fixtures/Entity/SingleTableGrandchild.php b/tests/Fixtures/Entity/SingleTableGrandchild.php index 733d68a..c4dc4c6 100644 --- a/tests/Fixtures/Entity/SingleTableGrandchild.php +++ b/tests/Fixtures/Entity/SingleTableGrandchild.php @@ -13,8 +13,7 @@ */ class SingleTableGrandchild extends SingleTableChild { - /** @var int|null */ - private $vitality = null; + private ?int $vitality = null; public function getVitality(): ?int {