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

Merge 4.x to master. #8222

Merged
merged 130 commits into from Jul 13, 2022
Merged

Merge 4.x to master. #8222

merged 130 commits into from Jul 13, 2022

Conversation

AndrolGenhald
Copy link
Collaborator

No description provided.

AndrolGenhald and others added 30 commits May 29, 2022 00:16
They were caused by installing packages with `--ignore-platform-reqs`
which brought PHP 8.1 autoloaded packages and caused fatal errors when
running php-parallel-lint. Instead of ignoring platform requirements we
now remove packages that are incompatible with PHP 7.1 (phpunit and its
dependents).
Because installing packages with 8.1 and checking them as if we're
running 7.1 just doesn't work.
…ect-fputcsv-invalidnamedargument

Bugfix/splfileobject fputcsv invalidnamedargument
This keeps coming up in obscure places, hopefully this fixes it once and for all. I would reeeaaally love to have an immutable type system at some point...
…ation

Fix `TypeCombiner::combine` to not modify TIntRange arguments.
instead of from full text

50% faster than cutting from full text, improves performance up to 3% depending on file length and number of errors in file
…text-from-snippet

Performance: cut the selected_text from snippet
…tion

store origin location by ID to speed up psalm by up to 75%
I wasn't sure from reading the docs whether or not Psalm consider zero to be positive.
Clarify in docs that zero is not considered a positive-int
…array-offsets

Coerce null to empty string in array keys
@AndrolGenhald AndrolGenhald added the release:internal The PR will be included in 'Internal changes' section of the release notes label Jul 7, 2022
@AndrolGenhald
Copy link
Collaborator Author

Check PHP syntax is failing because it can't remove phpunit, running the suggested command gives:

$ composer why phpunit/phpunit
phpspec/prophecy-phpunit v2.0.1 requires phpunit/phpunit (^9.1)

I have no idea why this would be happening on this pull request and not on current master though.

@orklah
Copy link
Collaborator

orklah commented Jul 7, 2022

The "Drop incompatible packages" step is present in 4.x after cache composer:
https://github.com/vimeo/psalm/blob/4.x/.github/workflows/ci.yml#L27
but not on master:
https://github.com/vimeo/psalm/blob/master/.github/workflows/ci.yml#L24

So I guess GH run the 4.x CI on your PR

@orklah
Copy link
Collaborator

orklah commented Jul 7, 2022

Oh, that's actually a change in your merge PR: https://github.com/vimeo/psalm/pull/8222/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR37

EDIT: it was added in: #8028. It may not be relevant in master. @weirdan do you have thoughts on this?

@AndrolGenhald
Copy link
Collaborator Author

🤦 I should have checked that. Yeah, it's probably not relevant, If weirdan doesn't get back to us in a day or so I'll just remove it and see if the tests all pass.

@weirdan
Copy link
Collaborator

weirdan commented Jul 7, 2022

That step was required to get CI (that particular job) working on PHP 7.1. It's not required to run the job on 7.4 (the minimum supported version for 5.x) and so could be removed in master.

@orklah
Copy link
Collaborator

orklah commented Jul 7, 2022

@AndrolGenhald can you check if failure in real project is legit?

@AndrolGenhald
Copy link
Collaborator Author

It looks like a true positive to me, but it's not showing up on either 4.x or the current master. I'll investigate it further in a bit.

@AndrolGenhald
Copy link
Collaborator Author

Next time I'm checking the baseline before going and debugging the whole thing...

It's because the type changed from Iterator to Traversable<mixed, mixed>&Iterator, so it no longer matches the ArgumentTypeCoercions in the baseline (it should still match them, but that's a separate bug that's probably been around for a while, lots of stuff doesn't bother checking all types in an intersection, and even if it only checks Traversable that should still count as coercion).

I'm going to keep looking into why the type changed, I would think that would still be Iterator since Iterator<mixed, mixed> is a subtype of Traversable<mixed, mixed>.

@orklah
Copy link
Collaborator

orklah commented Jul 13, 2022

Don't bother too much, the goal is just to make sure there isn't something fundamentally broken. There will always be fringe edge cases when doing massive changes. The master branch is already pretty heavy so it's bound to happen

@AndrolGenhald
Copy link
Collaborator Author

Turns out it was actually one of my changes that made GenericTypeComparator get the actual templates (along with their bounds) when comparing instead of using mixed. I think the templates need to be replaced further up the chain somewhere, but I'm not sure exactly where, so I'll leave it for now.

@AndrolGenhald AndrolGenhald merged commit 2a72a24 into vimeo:master Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:internal The PR will be included in 'Internal changes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet