diff --git a/.gitignore b/.gitignore index 53234a5..f359b0f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ composer.phar composer.lock phpunit.xml +.phpunit.result.cache vendor/ .idea/ diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000..38a2429 --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +C:37:"PHPUnit\Runner\DefaultTestResultCache":243:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:2:{s:95:"LmcUserDoctrineORMTest\Options\ModuleOptionsTest::testEnableDefaultEntitiesReturnsTrueByDefault";d:0.014;s:76:"LmcUserDoctrineORMTest\Options\ModuleOptionsTest::testDisableDefaultEntities";d:0;}}} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a51b765..3593c31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 3.0.2 - 2021-02-11 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Updated version constraints to be more flexible +- Added inspection surpressions to some methods +- Added missing exceptions in tests to phpdoc + ## 3.0.1 - 2021-01-21 ### Added diff --git a/composer.json b/composer.json index 0914956..9196d2a 100644 --- a/composer.json +++ b/composer.json @@ -6,8 +6,6 @@ "keywords": [ "laminas", "LmcUser" ], - "minimum-stability": "dev", - "prefer-stable": true, "homepage": "https://github.com/LM-Commons/LmcUserDoctrineORM", "authors": [ { @@ -28,11 +26,11 @@ ], "require": { "php": ">=7.3", - "lm-commons/lmc-user": ">=3.3.3", - "doctrine/doctrine-orm-module": "~3.0" + "lm-commons/lmc-user": "^3.3.3", + "doctrine/doctrine-orm-module": "^3.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "^1.0.0", "phpspec/prophecy-phpunit": "^2.0", "phpspec/prophecy": "^1.12", "phpunit/phpunit": "^9.3" diff --git a/src/Mapper/User.php b/src/Mapper/User.php index dbf404f..eaa73e4 100644 --- a/src/Mapper/User.php +++ b/src/Mapper/User.php @@ -38,6 +38,7 @@ public function __construct(EntityManagerInterface $em, ModuleOptions $options) * @param $email * * @return UserInterface|object|null + * @noinspection PhpMissingParentCallCommonInspection */ public function findByEmail($email) { @@ -50,6 +51,7 @@ public function findByEmail($email) * @param string $username * * @return UserInterface|object|null + * @noinspection PhpMissingParentCallCommonInspection */ public function findByUsername($username) { @@ -62,6 +64,7 @@ public function findByUsername($username) * @param int|string $id * * @return UserInterface|object|null + * @noinspection PhpMissingParentCallCommonInspection */ public function findById($id) { @@ -76,6 +79,7 @@ public function findById($id) * @param HydratorInterface|null $hydrator * * @return ResultInterface|UserInterface + * @noinspection PhpMissingParentCallCommonInspection */ public function insert(UserInterface $entity, $tableName = null, HydratorInterface $hydrator = null) { @@ -89,6 +93,7 @@ public function insert(UserInterface $entity, $tableName = null, HydratorInterfa * @param HydratorInterface|null $hydrator * * @return ResultInterface|UserInterface + * @noinspection PhpMissingParentCallCommonInspection */ public function update(UserInterface $entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) { diff --git a/test/Options/ModuleOptionsTest.php b/test/Options/ModuleOptionsTest.php index c3ab9e0..7779a1c 100644 --- a/test/Options/ModuleOptionsTest.php +++ b/test/Options/ModuleOptionsTest.php @@ -24,6 +24,11 @@ public function testEnableDefaultEntitiesReturnsTrueByDefault(): void self::assertTrue($moduleOptions->getEnableDefaultEntities()); } + /** + * @return void + * @throws ExpectationFailedException + * @throws InvalidArgumentException + */ public function testDisableDefaultEntities(): void { $moduleOptions = new ModuleOptions();