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

PHP 7.4 is required #608

Closed

Conversation

kukulich
Copy link
Collaborator

Fixes #571

kukulich and others added 5 commits May 27, 2020 23:34
Verify `ReflectionSourceStubber` and `PhpInternalSourceLocator`  against `FFI`, `memcache`, `mongodb` and `redis` extension symbols
Ocramius and others added 24 commits May 28, 2020 12:00
Removed mus-typed docblock annotations
Exclude PhpStormStubsSourceStubber temporarily from the PHPStan analysis
Fixed `ReflectionClass::isInstance()` adapter compatibility with native reflection
PhpStormStubsSourceStubber fixes for case-insensitive classes/functions/constants
TRUE, FALSE, NULL constant names compatible with PHP
… exception

This failure was highlighted by random test execution order: hard to spot otherwise
…ed AST nodes

Before this change, the `MemoizingParser` would keep the AST in memory as-is, but
`nikic/php-parser`'s AST is mutable, and our tests do mutate that state.

Running `vendor/bin/phpunit --random-order-seed=1590604675 --order-by=random` does
highlight a number of failures caused by tests modifying the AST and tripping on
each other.

By making the memoization referentially transparent, we get rid of this huge design
issue completely at the cost of some performance.
…files

If, for some reason, files are no longer accessible after having been included by the PHP
process, then the `AutoloadSourceLocator` is supposed to skip them when looking for declared
constants.
…HP 7.2 for good

There's no point in trying to keep compatibility with multiple infection versions: killing the
support for PHP 7.2 instead.

This also means that this particular change will not land in `4.3.0`, but in a later release
instead.

Locking `composer.json` platform to PHP 7.3.0 to be sure that we don't update dependencies
against something that is too new (most developers on the project are already on PHP 7.4.6+)
…lode them manually

This leads to a lot of repetitive, but all-equal YAML, easy to split across multiple files
and to compare later on.

Ref: https://github.community/t/support-for-yaml-anchors/16128/33
… very-similar files

While this is repetitive, it allows for quick introspection to check if they are still
the same, or whether they need updating. Individual differences become much more evident,
if you don't have to scroll through thousands of lines of YAML garbage.

Ref: https://github.community/t/support-for-yaml-anchors/16128/33
…ed to look for constants

We were using `is_readable()` before, but that's a bit fragile: we've already written a well-tested
utility to verify file accessibility, so we use that instead.

Ref: Roave#606 (comment)
Windows images used by github actions don't seem to understand `php -dmemory_limit=-1`, possibly being
escaped somehow: working around the issue by removing the limit in the base configuration of PHP itself.
…ster` or pull requests

Pushes are not going to be relevant to us unless a pull request is opened against upstream.
@Ocramius
Copy link
Member

Not sure why github considered this as merged: will manually re-create and merge locally :)

@kukulich
Copy link
Collaborator Author

@Ocramius I've just force pushed and solved conflicts.

@Ocramius
Copy link
Member

Yup, seen: can't reopen the MR for some reason though, so re-creating it.

@Ocramius Ocramius mentioned this pull request May 28, 2020
@Ocramius Ocramius self-assigned this May 28, 2020
@Ocramius Ocramius added dependencies Pull requests that update a dependency file enhancement labels May 28, 2020
@Ocramius Ocramius added this to the 4.4.0 milestone May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants