Skip to content

Commit

Permalink
Add skip-property-types documentation and test case
Browse files Browse the repository at this point in the history
  • Loading branch information
wucdbm committed Jul 5, 2024
1 parent 1368e89 commit 4ce0156
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/tasks/doctrine_orm.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ grumphp:
doctrine_orm:
skip_mapping: false
skip_sync: false
skip_property_types: false
triggered_by: ['php', 'xml', 'yml']
```
Expand All @@ -25,6 +26,12 @@ With this parameter you can skip the mapping validation check.
With this parameter you can skip checking if the mapping is in sync with the database.
**skip_property_types**
*Default: false*
With this parameter you can skip checking if Entity field property types match the Doctrine types.
**triggered_by**
*Default: [php, xml, yml]*
Expand Down
12 changes: 12 additions & 0 deletions test/Unit/Task/DoctrineOrmTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function provideConfigurableOptions(): iterable
yield 'defaults' => [
[],
[
'skip_property_types' => false,
'skip_mapping' => false,
'skip_sync' => false,
'triggered_by' => ['php', 'xml', 'yml'],
Expand Down Expand Up @@ -120,5 +121,16 @@ public function provideExternalTaskRuns(): iterable
'--skip-sync',
]
];
yield 'skip-property-types' => [
[
'skip_property_types' => true,
],
$this->mockContext(RunContext::class, ['hello.php', 'hello2.php']),
'doctrine',
[
'orm:validate-schema',
'--skip-property-types',
]
];
}
}

0 comments on commit 4ce0156

Please sign in to comment.