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

Manually merge 3.0.x into master #3931

Merged
merged 27 commits into from
Apr 2, 2020
Merged

Manually merge 3.0.x into master #3931

merged 27 commits into from
Apr 2, 2020

Conversation

morozov
Copy link
Member

@morozov morozov commented Apr 2, 2020

Q A
Type improvement
BC Break yes (tiny)

This was quite an adventure because 2.10.x and master have some differences in static analysis configuration:

  1. The master branch runs PHPStan against the tests/ directory while 2.10.x doesn't.
  2. The PHP_CodeSniffer configuration in master requires language-level type declarations where possible while 2.10.x doesn't.

So the newly found issues had to be fixed right before or withing the merge:

  1. The signature of MasterSlaveConnection::connect() was changed from ($connection = null) to (?string $connection = null). The reason is that Upgrade to PHPStan v0.12 #3799 removed the {@inheritDoc} annotation from the method which made PHP_CodeSniffer spot the missing type declaration that should have been added in Enforced parameter and return value types in Connection classes #3568.
  2. Some unreachable code has been removed from tests since it's no longer allowed by PHPStan.
  3. Unconditionally skipped tests were enabled (if they passed) or removed (if they failed).
  4. A couple of tests got new assertions added to clarify the value types before using them.
  5. Some existing issues found by PHPStan have been temporarily suppressed in the configuration and will be fixed later.
  6. Some false-positives have been also suppressed and reported upstream (When analyzing usage of array_filter, ARRAY_FILTER_USE_KEY is not taken into account phpstan/phpstan#3132, PHPStan mistakenly assumes that an array can pass the is_numeric() test phpstan/phpstan#3133).

duncan3dc and others added 24 commits March 10, 2020 15:53
…tructor

Ensure the constructor arguments are passed to custom classes
1. Removed no longer existing entries
2. Added new entries
3. Sorted using `sort` (ignores case and the leading dot, same as `ls`)
Actualize the content of the .gitattributes file
Allowing us to use more advanced checks and have full generic support.

This also adds a baseline file, since we have new violations being
reported but don't want to address them right now.
By either defining their types or renaming to match parent class (or
interface).
Additionally, set the new value and get the old one in one ini_set() call.
@morozov morozov merged commit ac0e13a into doctrine:master Apr 2, 2020
@morozov morozov removed the WIP label Apr 2, 2020
@morozov morozov self-assigned this Apr 2, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 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.

4 participants