-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ODM annotatoin/attribute based check (#41)
* add document annotation based test * add ODM annotation/attribute detection
- Loading branch information
1 parent
f0de67e
commit 3f36b2d
Showing
7 changed files
with
112 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use ShipMonk\ComposerDependencyAnalyser\Config\Configuration; | ||
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType; | ||
|
||
$config = new Configuration(); | ||
|
||
return $config | ||
->addPathToScan(__DIR__ . '/src', false) | ||
->addPathToScan(__DIR__ . '/tests', false) | ||
// test fixture | ||
->ignoreErrorsOnPath( | ||
__DIR__ . '/tests/EntityClassResolver/Fixture/Anything/SomeAttributeDocument.php', | ||
[ErrorType::UNKNOWN_CLASS] | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/EntityClassResolver/Fixture/Anything/SomeAttributeDocument.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Rector\SwissKnife\Tests\EntityClassResolver\Fixture\Anything; | ||
|
||
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; | ||
|
||
#[MongoDB\Document] | ||
class SomeAttributeDocument | ||
{ | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/EntityClassResolver/Fixture/Anything/SomeDocument.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Rector\SwissKnife\Tests\EntityClassResolver\Fixture\Anything; | ||
|
||
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; | ||
|
||
/** | ||
* @MongoDB\EmbeddedDocument() | ||
*/ | ||
class SomeDocument | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.