Skip to content

Commit

Permalink
Refactoring: introduce our InvalidArgumentException and don't rely on…
Browse files Browse the repository at this point in the history
… contributte|nett/utils at all
  • Loading branch information
f3l1x authored and mabar committed Jan 7, 2020
1 parent 6f00993 commit bb204c0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/DI/OrmExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
use Doctrine\ORM\Mapping\UnderscoreNamingStrategy;
use Nette\DI\Definitions\Statement;
use Nette\DI\Helpers;
use Nette\InvalidArgumentException;
use Nette\Schema\Expect;
use Nette\Schema\Schema;
use Nettrine\ORM\EntityManagerDecorator;
use Nettrine\ORM\Exception\Logical\InvalidArgumentException;
use Nettrine\ORM\Exception\Logical\InvalidStateException;
use Nettrine\ORM\ManagerRegistry;
use Nettrine\ORM\Mapping\ContainerEntityListenerResolver;
Expand Down
10 changes: 10 additions & 0 deletions src/Exception/Logical/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php declare(strict_types = 1);

namespace Nettrine\ORM\Exception\Logical;

use Nettrine\ORM\Exception\LogicalException;

class InvalidArgumentException extends LogicalException
{

}
2 changes: 1 addition & 1 deletion src/Mapping/ContainerEntityListenerResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Nettrine\ORM\Mapping;

use Doctrine\ORM\Mapping\EntityListenerResolver;
use InvalidArgumentException;
use Nette\DI\Container;
use Nettrine\ORM\Exception\Logical\InvalidArgumentException;

class ContainerEntityListenerResolver implements EntityListenerResolver
{
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/Unit/DI/OrmExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
use Nette\DI\Compiler;
use Nette\DI\Container;
use Nette\DI\ContainerLoader;
use Nette\InvalidArgumentException;
use Nettrine\Annotations\DI\AnnotationsExtension;
use Nettrine\Cache\DI\CacheExtension;
use Nettrine\DBAL\DI\DbalExtension;
use Nettrine\ORM\DI\OrmAnnotationsExtension;
use Nettrine\ORM\DI\OrmExtension;
use Nettrine\ORM\EntityManagerDecorator;
use Nettrine\ORM\Exception\Logical\InvalidArgumentException;
use Nettrine\ORM\ManagerRegistry;
use stdClass;
use Tests\Fixtures\DummyConfiguration;
Expand Down

0 comments on commit bb204c0

Please sign in to comment.