-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing with PDO backend. Fixes #9 #10
Closed
Closed
Conversation
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
- Adhere better to PSR-1 and PSR-2. - Some logical issues were fixed. - Utilized PHP 7.1 syntax, e.g. strict types.
Now all run in separate processes.
- Cf. issue #6. - `Connection` constructor now correctly applies the desired dialect. - Added tests targeting know cases for differences in dialects. - Refactored `AbstractIntegrationTest` to allow additional customization of the initialization of the connection, installation of the database, and creation of the `EntityManager`.
BTW I also merged your 2.7 branch back into master. |
The results are slightly different from the previous implementation in some cases though.
The PR was closed because I deleted my fork, but I think you can still reopen it if you feel like it. |
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This (hopefully) fixes #9, albeit with some caveats. Quoting the README, here are the missing features:
pdo-firebird
extension doesn't support this natively. You implemented it by using a query, but it requires the name of a sequence as an argument. Not sure if implementing it in PDO this way would be much of a win over not implementing it at all. Futhermore, I'm not sure if it works within a transaction (I think it was failing for me with a "transaction is already active" or similar message, but that was before I actually fixed transactions, so it's probably not an issue anymore.Support for Firebird SQL dialects. The underlying PDO driver claims to support dialects 1 and 3, but tests for dialect 1 just kept failing, even though the DSN I generated did include dialect version. I ended up just deleting the test.ext-pdo-firebird
only supports dialects starting with PHP version 7.4, so this driver will also only support it starting on PHP 7.4 and up. Futhermore, only dialects 1 and 3 are supported according to PHP documentation, so even though the test for dialect 2 passes, I'm not sure it always will. And dialect 0? I guess there's no such thing. The test for dialect 0, which expected it to be treated as 3, failed, so I assume in PDO it falls back to 1 instead of 3. Either way, I guess it shouldn't be used or tested against.I also removed some assertions about internal class architecture from the tests. Swapping the backend ruined those assertions. I think we're supposed to test how the unit works, as opposed to how it is constructed.