Skip to content

Commit

Permalink
- Updated version constraints to be more flexible
Browse files Browse the repository at this point in the history
- Added inspection surpressions to some methods
- Added missing exceptions in tests to phpdoc
  • Loading branch information
Alexander Zamponi committed Feb 11, 2021
1 parent 4feb1aa commit 7edc4d9
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
composer.phar
composer.lock
phpunit.xml
.phpunit.result.cache
vendor/
.idea/
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -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;}}}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"keywords": [
"laminas", "LmcUser"
],
"minimum-stability": "dev",
"prefer-stable": true,
"homepage": "https://github.com/LM-Commons/LmcUserDoctrineORM",
"authors": [
{
Expand All @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions src/Mapper/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function __construct(EntityManagerInterface $em, ModuleOptions $options)
* @param $email
*
* @return UserInterface|object|null
* @noinspection PhpMissingParentCallCommonInspection
*/
public function findByEmail($email)
{
Expand All @@ -50,6 +51,7 @@ public function findByEmail($email)
* @param string $username
*
* @return UserInterface|object|null
* @noinspection PhpMissingParentCallCommonInspection
*/
public function findByUsername($username)
{
Expand All @@ -62,6 +64,7 @@ public function findByUsername($username)
* @param int|string $id
*
* @return UserInterface|object|null
* @noinspection PhpMissingParentCallCommonInspection
*/
public function findById($id)
{
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand Down
5 changes: 5 additions & 0 deletions test/Options/ModuleOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7edc4d9

Please sign in to comment.