PHP Insights v1.13.0 release
GitHub action output support
In this new version a new formatter has been added for rendering the results to a GitHub action supported output. This means if you run PHP Insights with GitHub actions, you can now use the parameter
--format=github-action and all of the insights will be displayed inline.
An example of the output and how to set it up can be found here.
Thanks @jibbarth, for this contribution!
Issues are now sorted, which means it is now much easier to fix all issues, as they are grouped by the file in each insight.
Thanks @Bastien_Phi, for this contribution!
It is now possible to define a custom output, simply supply a class which implements
Formatter and PHP Insights will be using that one.
phpinsights analyse --format=\\MyNamespace\\Class
Multiple formats in output
The tool now also supports specifying mulitple formatters, simply add multiple
phpinsights analyse --format=json --format=github-action
Improved JSON output
The JSON output now also contains an attribute called
diff, which contains the diff for the specified code. A schema file is available to see the full JSON output format.
More reliable results
Some improvements were made, so PHP Insights gives better results.
Don’t crash on empty namespace
A bug was fixed, which caused PHP Insights when a namespace was added without a name on the namespace.
Thanks @50bhan for fixing this!
Checking PHP version in composer
As v.1.12 added support for Slevomat Coding Standard v6, some new insights were added which supports native type hints from PHP 7.4. However many open source projects run php insights on multiple php version, which caused it to fail when testing on PHP 7.4, but not on any lower versions. This feature added support for checking the php version specified in
composer.json and disable native type hint checking if PHP version is before 7.4.
This project is powered by the community, so feel free to contribute as there always are ways to help out. We can be found on GitHub at nunomaduro/phpinsights.