Skip to content

Commit

Permalink
Merge pull request KnpLabs#534 from uginroot/master
Browse files Browse the repository at this point in the history
Sympony bandle name conventions
  • Loading branch information
TomasVotruba authored Mar 24, 2020
2 parents 24f7cac + 7051364 commit 7d9d3bc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ It currently handles:
composer require knplabs/doctrine-behaviors
```

Register bundle in `config/bundles.php`:

```php
<?php

return [
// ...
Knp\DoctrineBehaviors\Bundle\DoctrineBehaviorsBundle::class => ['all' => true],
// ...
];
```

## Usage

All you have to do is to define a Doctrine entity:
Expand Down
2 changes: 2 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ services:
resource: "../src"
exclude:
- "../src/Bundle/*"
- "../src/DoctrineBehaviorsBundle.php"
- "../src/Exception/*"
- "../src/PHPStan/*"
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ parameters:
- '#Cannot call method addChildNode\(\) on Knp\\DoctrineBehaviors\\Contract\\Entity\\TreeNodeInterface\|null#'

- '#Property Knp\\DoctrineBehaviors\\Provider\\LocaleProvider\:\:\$translator has no typehint specified#'
- '#PHPDoc tag @var has invalid value \(TranslatorInterface&LocaleAwareInterface\|null\)\: Unexpected token "\|", expected TOKEN_OTHER at offset 56#'
- '#PHPDoc tag @var has invalid value \(TranslatorInterface&LocaleAwareInterface\|null\)\: Unexpected token "\|", expected TOKEN_OTHER at offset \d+#'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Knp\DoctrineBehaviors\Bundle;
namespace Knp\DoctrineBehaviors;

use Knp\DoctrineBehaviors\Bundle\DependencyInjection\DoctrineBehaviorsExtension;
use Symfony\Component\DependencyInjection\Extension\Extension;
Expand Down
2 changes: 1 addition & 1 deletion tests/HttpKernel/DoctrineBehaviorsKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Knp\DoctrineBehaviors\Tests\HttpKernel;

use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Knp\DoctrineBehaviors\Bundle\DoctrineBehaviorsBundle;
use Knp\DoctrineBehaviors\DoctrineBehaviorsBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
Expand Down
4 changes: 2 additions & 2 deletions tests/ORM/UuidableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Knp\DoctrineBehaviors\Tests\ORM;

use Knp\DoctrineBehaviors\Model\Uuidable\UuidableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\UuidableInterface;
use Knp\DoctrineBehaviors\Tests\AbstractBehaviorTestCase;
use Knp\DoctrineBehaviors\Tests\Fixtures\Entity\UuidableEntity;
use Ramsey\Uuid\UuidInterface;
Expand All @@ -26,7 +26,7 @@ public function testUuidLoading(): void

$uuidableRepository = $this->entityManager->getRepository(UuidableEntity::class);

/** @var UuidableTrait $entity */
/** @var UuidableInterface $entity */
$entity = $uuidableRepository->find($id);

$this->assertNotNull($entity);
Expand Down

0 comments on commit 7d9d3bc

Please sign in to comment.