WIP - Introduce tests on platforms#549
Conversation
fa32670 to
8778452
Compare
| * @group platform | ||
| * @group mysql | ||
| */ | ||
| class MysqlQueryResultTypeWalkerTest extends PDOQueryResultTypeWalkerTest |
There was a problem hiding this comment.
Currently I extends PDOQueryResultTypeWalkerTest but later we'll work his own dataprovider
8778452 to
4498953
Compare
| fail-fast: false | ||
| matrix: | ||
| php-version: | ||
| - "8.2" |
There was a problem hiding this comment.
We definitelly need to check "before 8.1" and "after 8.1" as there were some major changes.
| $one = new One(); | ||
| $one->id = (string) $id++; | ||
| $one->intColumn = $intColumn; | ||
| $one->stringColumn = $stringColumn; |
There was a problem hiding this comment.
We definitelly need entities suited for platform testing (having float, decimal, bool, int, bigint columns).
| $em->persist($one); | ||
| } | ||
|
|
||
| foreach (self::combinations($dataJoinedInheritance) as $combination) { |
There was a problem hiding this comment.
I'm not sure we need this complexity. I ended with super simple test fetching a single expression and verifying that type in https://github.com/janedbal/php-database-drivers-fetch-test All we need here is to check that against the inferred PHPStan type.
And I feel this is the best approach to accomplish what we need as it can be quite readable in the test itself
There was a problem hiding this comment.
I just copied the existing QueryResultTypeWalkerTest with the whole dataprovider.
Do you think we should split it ?
- Only single expression for platforms tests
- single expression and complex expression for PDO tests in order to validate PHPStan for these
I thought this was better to keep the same data for every platform.
|
The matrix (at some level) should also contain:
|
Since the config must be passed to the entity manager in a I don't see how it would be in the matrix. Currently, the only solution I see is to create one entityManager for every platform/config and one test case for every entityManager... |
Related to #506 (comment) @janedbal,
I try to introduce tests on different platform. Does this solution would work for you ?
Edit: Are you also ok with this solution @ondrejmirtes ?
I had in mind to provide
@group platformon every platform tests, each with a special group like@group sql.And adding all different platform in github actions.