Skip to content

bug: Initial use of the package #15

@neznaika0

Description

@neznaika0

Thanks, @michalsn, for the chance to test 😄

There are shortcomings at the initial stage:

  • By default, SQLite3 in memory is used in the local test. Since there are typing differences between mariadb, the numeric types for Entity are not a string (for example, user.id ). The tests fail '1' !== 1.
  • I tried to set up the connection via .env - it doesn't work. I need to use phpunit.xml.dist.
  • After setting up the connection, another difference in packages is that my mariadb 12 returns the error SQL Error [1062] [23000]: (conn=16) Duplicate entry 'Test User 1' for key 'username' and Tests\ModelTest::testDatabaseErrorsOnUpdate fails.
  • Does not apply to the code: The creation of a issue on Github is indicated on the Feauters Request.

Solution:

  • We can use DataCaster for an Entity to get the same types or compare it with a type conversion (int) $id.
  • I haven't figured out yet why env is not relevant.
  • You can add a Regexp check or shorten the phrase to a column.

Do you have any suggestions or is it insignificant?
I will continue the review. Maybe I'll find something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions