Skip to content

Commit

Permalink
Loosen constraint for enum ignore setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino committed Sep 27, 2021
1 parent 0b7eff1 commit b851362
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Schema/DataObject/Plugin/DBFieldTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function apply(ModelType $type, Schema $schema, array $config = []): void
$mapping = $config['enumTypeMapping'] ?? [];
foreach ($type->getFields() as $field) {
if ($field instanceof ModelField && $field->getModel() instanceof DataObjectModel) {
$ignored = $ignore[$type->getName()][$field->getName()] ?? null;
$ignored = $ignore[$field->getName()] ?? null;
if (!!$ignored) {
continue;
}
Expand Down
4 changes: 1 addition & 3 deletions tests/Schema/DataObject/Plugin/DBFieldTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ public function testEnumIgnore()
$schema = new Schema('test');
$plugin->apply($type, $schema, [
'ignore' => [
'DataObjectFake' => [
'myEnum' => true,
]
'myEnum' => true,
]
]);

Expand Down

0 comments on commit b851362

Please sign in to comment.