-
- Notifications
You must be signed in to change notification settings - Fork 23
Support for doctrine/dbal v4 #754
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
Conversation
| CI seems no longer running properly with your changes. jobs no longer start |
| Yeah, but I wasn't sure why exactly 😅 do you have any idea? I'll try to back to this in couple of days 😉 |
.github/workflows/tests.yml Outdated
| | ||
| - name: Install doctrine/dbal (optional dependency) | ||
| run: composer require doctrine/dbal:^3 --ignore-platform-req=php+ | ||
| run: composer require doctrine/dbal:${{ matrix.dbal-version }} --ignore-platform-req=php+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this command now needs to be wrapped into double quotes
51deb2d to f74b52f Compare f74b52f to 9a432ae Compare 9a432ae to f3f862b Compare …atement methods to validate queries syntax errors
| @staabm I guess now the PR is in state that would be ready for review, however there're still some jobs blocked and not triggered. I'm not sure what is the cause they don't want to start. I tried wrapping in double quotes of require dbal lib in both ways: - name: Install doctrine/dbal (optional dependency) run: "composer require doctrine/dbal:${{ matrix.dbal-version }} --ignore-platform-req=php+" ... run: composer require "doctrine/dbal:${{ matrix.dbal-version }}" --ignore-platform-req=php+but there's the same result. I'm not sure that's related 😞 🤔 Do you have any other idea? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since you changed the jobmatrix its fine that some jobs are no longer triggered.. I need to adjust the 'required branches' in the repo-settings as the jobs changed.
I think this PR is mostly done, just a few nits left.
| { | ||
| $sql = 'SELECT email adaid WHERE gesperrt freigabe1u1 FROM ada'; | ||
| $conn->query($sql); | ||
| $conn->executeQuery($sql); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
said differently: we also need the previous test with ->query() but just run it on 3.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connection::query method was deprecated in DBAL 3 and was deleted in DBAL 4.
Target solution is to use executeQuery in both, so I adjusted test to be valid for both versions.
Also, I added Connection::executeQuery and Connection::executeStatement in injected methods to validate in SyntaxErrorInQueryMethodRule class - IMO they should be there from the very beginning as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to keep that test-case, I'd need to create separate test data file and include it conditionally only for dbal3 (simillary as with doctrine-dbal3.php file). It's because of the Connection::query method is missing in dbal4 and it wouldn't be parsed by phpstan (it would skip analyzing query syntax, so expected test error wouldn't be thrown)
Will that be fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be precise: just copy the previous code into a new file and make it beeing analyzed by the corresponding rule-test.
we only need the 3.x only-api tested in the new file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@staabm done :)
| thank you! |
| Thanks as well :) any chances that could be released soon? |
No description provided.