github phpstan/phpstan 1.5.0

latest releases: 1.12.4, 1.12.3, 1.12.2...
2 years ago

This release fixes 26 issues! 🎉

Improvements 🔧

  • Dropped support for PHP 7.1, PHPStan 1.5.0 runs on PHP 7.2-8.1. Users on PHP 7.1 accounted only for 0.8 % of installatoins.
  • Allow null as a return value when resolving return types (#1061), #5855, thanks @matthiasnoback!
  • Output elapsed time per file in debug mode (#1062), #5294, thanks @janedbal!
  • A bit more precise concatenation of unions of literal strings (#937), #6439, thanks @staabm!
  • OptimizedDirectorySourceLocator::locateIdentifiersByType() returns all located classes or functions (#1080), thanks @tomasfejfar!
  • Backward compatibility promise: ReflectionProvider cannot be extended/implemented by 3rd party code (phpstan/phpstan-src@e60d6d6)
  • implement ArraySearchFunctionTypeSpecifyingExtension (#1086), #6863, thanks @staabm!
  • added ArrayReplaceFunctionReturnTypeExtension (#1087), #5327, thanks @staabm!
  • Dynamic return type extension for curl_getinfo (#1072), thanks @PrinsFrank!
  • Support intersection types in template bounds (#1101), #6649, thanks @rvanvelzen!
  • Support value-of<BackedEnum> (#1082), #6775, thanks @staabm!

Bleeding edge 🔪

If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

includes:
	- vendor/phpstan/phpstan/conf/bleedingEdge.neon

Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

  • PHPStan now utilizes version-based naming of Git branches (1.5.x) instead of master
  • CI pipeline is faster thanks to several improvements:
    • Support for PHP 7.1 was dropped
    • Reproducible phpstan.phar checksum is computed and compared when running integration tests from phpstan/phpstan on pull requests in phpstan-src. The integration tests run only when the checksum was changed. This means that for example if only unit tests in phpstan-src were changed, PHAR didn't change and those integration tests from phpstan/phpstan don't have to run.
    • Rector downgrade cache was implemented. When transforming sources from PHP 8.0 to various lower PHP versions, cache is utilized instead of making Rector do the hard work each time.

Don't miss a new phpstan release

NewReleases is sending notifications on new releases.