-
Notifications
You must be signed in to change notification settings - Fork 170
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
Fix deprecation: PDOStatement::bindParam(): Passing null to $maxLength #586
Conversation
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.
Code looks fine, can you please add a test and a changelog entry?
@Jean85 I've added a test and changelog line. I couldn't just use a |
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.
Code looks fine, but the CI is broken. Please fix the Code Style (make cs
will do it for you) and fix the test, it's failing for this error:
PHP Fatal error: Class Sentry\SentryBundle\Tests\Tracing\Doctrine\DBAL\TestStatement must implement interface Traversable as part of either Iterator or IteratorAggregate in Unknown on line 0```
@Jeroeny are you up to finish the PR? Otherwise I would be happy to make the changes needed to merge it on your behalf |
@ste93cry Feel free to continue with these changes. I probably won't be able to spend time on it anytime soon. |
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
…to parameter getsentry#4 ($maxLength) of type int is deprecated in ./vendor/doctrine/dbal/src/Driver/PDO/Statement.php on line 83
add changelog
Co-authored-by: Alessandro Lai <[email protected]>
Co-authored-by: Alessandro Lai <[email protected]>
bba537e
to
4a05d4d
Compare
@Jean85 do you have a rough ETA when a new version will be released that contains this PR? |
Release of 4.2.7 is in process: https://github.com/getsentry/sentry-symfony/actions/runs/1865381549 |
@Jean85 thanks for your work on this issue. It looks like the |
No, there's just a manual step in the process that requires a Sentry employee approval. It'll be here soon. |
PHP version:
8.1.1
doctrine/dbal:
3.2.0
sentry/sentry-symfony:
4.2.5
Deprecated: PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated in ./vendor/doctrine/dbal/src/Driver/PDO/Statement.php on line 83
While it may seem that the deprecation is caused by that Doctrine
Statement
class, it is in fact caused by passing$length
asnull
to that method which is then passed on the thePDOStatement
method call. The fix is done the same way as in Doctrine: https://github.com/doctrine/dbal/blob/3.2.x/src/Driver/PDO/Statement.php#L83