Skip to content
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

Setup static analysis with Psalm #1

Closed
wants to merge 2 commits into from
Closed

Setup static analysis with Psalm #1

wants to merge 2 commits into from

Conversation

greg0ire
Copy link
Owner

No description provided.

@greg0ire greg0ire force-pushed the sa-with-psalm branch 3 times, most recently from 7bcc967 to 8cce3ab Compare April 14, 2020 17:44
This should make it easier to work with Composer from machines using
different versions of PHP than the lowest one we use in the CI.
@greg0ire greg0ire force-pushed the sa-with-psalm branch 2 times, most recently from b3f71e0 to 6370f83 Compare April 14, 2020 20:08
greg0ire pushed a commit that referenced this pull request Apr 14, 2020
The new version contains some improvements in handling mocks (sebastianbergmann/phpunit#3602) and will help identify some existing issues in DBAL 3.0 tests:

There were 2 warnings:

1) Doctrine\Tests\DBAL\Driver\OCI8\OCI8StatementTest::testExecute with data set #0 (array('test', null, 'value'))
Method bindValue may not return value of type boolean

2) Doctrine\Tests\DBAL\Driver\OCI8\OCI8StatementTest::testExecute with data set #1 (array(null, 'test', 'value'))
Method bindValue may not return value of type boolean
@greg0ire greg0ire closed this Apr 15, 2020
@greg0ire greg0ire deleted the sa-with-psalm branch April 15, 2020 11:42
greg0ire pushed a commit that referenced this pull request Jan 29, 2024
<!-- Fill in the relevant information below to help triage your pull
request. -->

|      Q       |   A
|------------- | -----------
| Type         | bug
| Fixed issues | doctrine#6038

#### Summary

As described in the mentioned issue, `-0.5` from `-1 / 2` will raise
type error when trying to `setLength`

```
Argument #1 ($length) must be of type ?int, float given
```

https://github.com/doctrine/dbal/blob/8bc0d9ae42f20af54120396ef7a1b3248479c2b5/src/Schema/Column.php#L78

This PR check if length is `-1` and keep it as is before perform
division.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant