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

Enable strict types #2854

Merged
merged 1 commit into from
Apr 2, 2019
Merged

Enable strict types #2854

merged 1 commit into from
Apr 2, 2019

Conversation

Majkl578
Copy link
Contributor

No description provided.

@Majkl578 Majkl578 added this to the 3.0 milestone Sep 11, 2017
@Ocramius
Copy link
Member

Loads of string casts to be added 😅

@morozov morozov force-pushed the develop branch 2 times, most recently from 12fb8e1 to a14b808 Compare January 4, 2018 18:47
@morozov morozov force-pushed the develop branch 3 times, most recently from 7b7cffe to c5e8a7c Compare March 19, 2018 19:11
@morozov morozov force-pushed the develop branch 3 times, most recently from fd275f8 to c78e0e5 Compare April 9, 2018 15:30
@morozov morozov force-pushed the develop branch 2 times, most recently from 72cddfb to d8f1786 Compare June 6, 2018 21:46
@morozov morozov force-pushed the develop branch 3 times, most recently from 67bd64c to 7e5fb71 Compare July 2, 2018 00:52
@morozov morozov force-pushed the develop branch 2 times, most recently from a640b82 to e7b6c16 Compare March 18, 2019 06:13
@Majkl578 Majkl578 force-pushed the strict-types branch 2 times, most recently from ad01eea to beb6031 Compare March 30, 2019 01:56
@Majkl578 Majkl578 requested a review from morozov March 30, 2019 02:17
phpcs.xml.dist Outdated Show resolved Hide resolved
@@ -273,7 +275,7 @@ public function testGeneratesForeignKeySqlOnlyWhenSupportingForeignKeys()
}
}

protected function getBitAndComparisonExpressionSql($value1, $value2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I miss the PHP 7.1 strictness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, I added typehints.

Copy link
Member

@morozov morozov Apr 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. The change is correct. I was saying that this issue wouldn't be possible on PHP 7.1 which doesn't allow loosening argument types in subclasses. I oversaw it recently in #3498.

$extraParameters = array_slice(func_get_args(), 3);

if (count($extraParameters) !== 0) {
$extraParameters[0] = $extraParameters[0] ?? 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see how we can improve here. Unlike the userland optional arguments defaulting to some value, the internal arguments are counted, so we have to respect the expected number of arguments being passed and their types.

Copy link
Member

@morozov morozov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the issue in OCI8Exception, I don't see anything else worth reworking.

@morozov morozov merged commit 53e7d6f into doctrine:develop Apr 2, 2019
@Majkl578 Majkl578 deleted the strict-types branch April 2, 2019 04:09
morozov added a commit that referenced this pull request Apr 16, 2019
morozov added a commit that referenced this pull request May 6, 2019
morozov added a commit that referenced this pull request May 23, 2019
morozov added a commit to morozov/dbal that referenced this pull request May 31, 2019
morozov added a commit that referenced this pull request Jun 13, 2019
morozov added a commit that referenced this pull request Jun 27, 2019
morozov added a commit that referenced this pull request Jun 27, 2019
morozov added a commit that referenced this pull request Jun 27, 2019
morozov added a commit to morozov/dbal that referenced this pull request Aug 26, 2019
morozov added a commit that referenced this pull request Nov 2, 2019
@morozov morozov mentioned this pull request May 3, 2020
16 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants