overtrue/phplint
PHPLint is a fast PHP linting tool that runs multiple lint processes in parallel, speeding up code checks for large projects. Install via Composer, PHAR, Docker, or Phive, and configure it to fit your workflow.
Do not hesitate to read the FAQ and the Migration Guide.
Parallel Processing: Speed up analysis on large codebases
using the CPU auto-detection of fidry/cpu-core-counter package
or use the -j,--job flag.
The lint command is now modernized and use the Symfony invokable syntax.
The Console Argument Resolvers introduced with Symfony 8.1 is now available in a compatible format for PHP 8.2 / Symfony 7.4 LTS, and PHP 8.4+ / Symfony 8.1
A new Extension Architecture was introduced with five basic extensions/plugins :
CacheManager to handle all cached results runs (using symfony/cache package).
Read the Cache Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
DiagnoseManager to output diagnostic information either after running the lint command, or just with the diagnose command.
Read the Diagnose Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
OutputManager to handle results in different formats: console (default), sarif, checkstyle, junit, json.
Read the Output Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
ProfileManager to output a mini profiler information to identify what resources are consumed by PHPLint.
Read the Profile Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
ProgressManager to handle all progress bars format: auto (default) , dots, bar, indicator.
Read the Progress Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
a81901a : Fixed the project autoloader to be compatible with global _composer_autoload_path variable defined by Composer bin proxy7dc1d5d : Fixed a PHP error when cache_manager is not loaded and cache is asked6ccc8e0 : PHAR distribution do not check anymore the requirement before to run on a platform013ec7c : to help PHPLint 9.7 users to migrate easily to new version 9.87d109f7 : restore the cache option for a smooth migration for PHPLint 9.7 users8a973bc : collect and show all deprecations triggered by symfony/deprecation-contracts package8ece9ed : Fixed PathValueResolver for exclude parameter that should not be realpath resolved05fa0b8 : introduces the new VarDumpHelper for debugging purpose only1dc7edf : the logger instance is now inject directly into the Application Class Constructorb596c75 : default colors skin is moved outside application to be able to initialize them on the new ConsoleLogger class8f9ae8d : The profiler may be enabling with the profile mode (PLINT_MODE=profile)cd6325a : The profiler may now be disabled even on legacy modeb55f445 : Restore the extensions legacy option for a smooth UXfc8ec7d : Raise deprecations when running phplint with obsolete options59b5b5f : Use semantic rather than pretty string for short version identification0b006bb : Use Git tag, if possible, to identify current version9ca9b71 : The diagnose command is able to print information about the caching feature (use PLINT_DIAGNOSTIC=cache)f064b2b : Fixed a regression with caching feature since first RC95a4e78 : Introduces EventAwareInterface contract and extracted code from AbstractManager (to new EventAwareTrait)c90e1a0 : Allows to exclude some metadata from a collectionFull Changelog: 9.8.0-rc.3...9.8.0
This version is the last one on branch 9.7. Next one is the final stable 9.8.0
This is a maintenance version without features changes since version 9.7.2
actions/checkout GH action from v6 to v7.0.1actions/upload-artifact GH action from v4 to v7.0.1docker/build-push-action GH action from v6 to v7.4.0docker/login-action GH action from v3 to v4.6.0docker/setup-buildx-action GH action from v3 to v4.4.1docker/setup-qemu-action GH action from v3 to v4.4.0ramsey/composer-install GH action from v3 to 4.0.0shivammathur/setup-php GH action from v2 to 2.37.2jetbrains/phpstorm-stubs dependency constraint (keep always the most up-to-date stable version)Full Changelog: 9.7.2...9.7.3
This second release candidate of the new version 9.8 follows changes accordingly to the ROADMAP.
Any feedback will be greatly appreciated.
And if you want to help/contribute to make PHPLint 9.8 more stable,
do not hesitate to add new report with title prefixed by 9.8 |
[!IMPORTANT] If your issue/report contains contextual information (to identify more easily the problem), please provide the output of the
diagnosecommand, or diagnostic printed after thelintcommand execution.Remember you can add what you want (with
PLINT_DIAGNOSTICenvironment variable). Read the Diagnose Manager user Guide to learn more.You may also read the FAQ if you begin with this version, or just migrate from version 9.7.x
A benchmark report is available between version 9.7.2 and 9.8.0-rc.2
a81901a : Fixed the project autoloader to be compatible with global _composer_autoload_path variable defined by Composer bin proxy7dc1d5d : Fixed a PHP error when cache_manager is not loaded and cache is asked6ccc8e0 : PHAR distribution do not check anymore the requirement before to run on a platform013ec7c : to help PHPLint 9.7 users to migrate easily to new version 9.87d109f7 : restore the cache option for a smooth migration for PHPLint 9.7 users8a973bc : collect and show all deprecations triggered by symfony/deprecation-contracts package8ece9ed : Fixed PathValueResolver for exclude parameter that should not be realpath resolved05fa0b8 : introduces the new VarDumpHelper for debugging purpose only1dc7edf : the logger instance is now inject directly into the Application Class Constructorb596c75 : default colors skin is moved outside application to be able to initialize them on the new ConsoleLogger classFull Changelog: 9.8.0-rc.1...9.8.0-rc.2
This first release candidate of the new version 9.8 follows changes accordingly to the ROADMAP.
Any feedback will be greatly appreciated.
And if you want to help/contribute to make PHPLint 9.8 more stable,
do not hesitate to add new report with title prefixed by 9.8 |
[!IMPORTANT] If your issue/report contains contextual information (to identify more easily the problem), please provide the output of the
diagnosecommand, or diagnostic printed after thelintcommand execution.Remember you can add what you want (with
PLINT_DIAGNOSTICenvironment variable). Read the Diagnose Manager user Guide to learn more.
The lint command is now modernized and use the Symfony invokable syntax.
The Console Argument Resolvers introduced with Symfony 8.1 is now available in a compatible format for PHP 8.2 / Symfony 7.4 LTS, and PHP 8.4 / Symfony 8.1
With in minds to reach goal to reduce vendor dependencies, a new Extension Architecture was introduced with five basic extensions/plugins :
CacheManager to handle all cached results runs (using symfony/cache package).
Read the Cache Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
DiagnoseManager to output diagnostic information either after running the lint command, or just with the diagnose command.
Read the Diagnose Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
OutputManager to handle results in different formats: console (default), sarif, checkstyle, junit, json.
Read the Output Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
ProfileManager to output a mini profiler information to identify what resources are consumed by PHPLint.
Read the Profile Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
ProgressManager to handle all progress bars format: auto (default) , dots, bar, indicator.
Read the Progress Manager User Guide and learn more on architecture, if you want to contribute or adapt behaviors with the Developer Guide.
Full Changelog: 9.7.2...9.8.0-rc.1
#224 : Linting the very same file in different file-system locations should re-use a single cache file
Thanks to @StantonMatt for his contribution to fix this issue
#232 : Upgrade Dockerfile to use PHP 8.5 runtime
Full Changelog: 9.7.1...9.7.2
dump-autoload settingFull Changelog: 9.7.0...9.7.1
Full Changelog: 9.6.2...9.6.3
lint command support now the new cache-dir option that replace the legacy cache option,
marked as deprecated (and will be removed in next major version)Full Changelog: 9.6.1...9.6.2
--cache-ttl option less than default TTL is in effectFull Changelog: 9.6.0...9.6.1
--cache-ttl option on lint command to solve cache invalidation issueFull Changelog: 9.5.6...9.6.0
Make this package PHP 8.1 compatible again to allow using Symfony Components 6.4 without getting deprecations notices, when running with a PHP 8.4 runtime : requested by @gnutix
Upgrade Dockerfile to use PHP 8.4 runtime
Full Changelog: 9.5.5...9.5.6
bartlett/sarif-php-converters packageFull Changelog: 9.5.4...9.5.5
[!WARNING]
Only versions 9.5.x or greater are now actively supported.
Versions
9.1,9.2,9.3, and9.4won't receive any updates as they reach end-of-life.
Drop PHPUnit 10 support and upgrade to PHPUnit 11
Full Changelog: 9.5.3...9.5.4
Same as 9.5.0 (except for GitHub Workflows that still used PHP 8.1)
Full Changelog: 9.5.0...9.5.2
[!NOTE]
This bugfix version is only for the PHAR distribution.
Full Changelog: 9.4.0...9.4.1
checkstyle formatsarif format is now optional. Requires to install extra package bartlett/sarif-php-converters.[!NOTE]
sarifformat is a good example of how to use custom format not provided by current PHPLint distribution. Read how to use it at https://github.com/llaville/sarif-php-converters/blob/1.0/docs/converter/phplint.md
log-* and sarif-converter optionsprogress option is now detected on phplint binary launcher.Full Changelog: 9.3.1...9.4.0
bootstrap option to make it easier to load whatever you need before to run linter.examples/sarif_output.php) to show how to generate a SARIF report programmaticallyvendor-dir configurationFull Changelog: 9.2.0...9.3.0
bin/phplint) and autoloader (autoload.php replaced config/bootstrap.php)Full Changelog: 9.1.2...9.2.0
Full Changelog: 9.1.1...9.1.2
/github/home/.composer/config.json in GitHub ActionFull Changelog: 9.1.0...9.1.1
IMPORTANT Do not use version 9.0.7 (wrong fixes for Docker targets, including GitHub Actions)
/github/home/.composer/config.json in GitHub ActionFull Changelog: 9.0.6...9.0.8
/github/home/.composer/config.json in GitHub ActionFull Changelog: 9.0.6...9.0.7
DebugFormatterHelper for asynchronous processProcessHelper for asynchronous processProgressIndicator) to let users know that the phplint command isn't stalled. Uses --progress=indicator.ProgressPrinter and ProgressBar extensions must now implement the Overtrue\PHPLint\Output\ConsoleOutputInterface specificationcheck-style begins style:check, and fix-style begins style:fix)box.json.distsetApplicationVersion and setConfigResolver methods were removed from Overtrue\PHPLint\Output\ConsoleOutputInterface
as there are no more requiredFull Changelog: 9.0.6...9.1.0
This version is compatible PHP 8.0, 8.1, 8.2 and 8.3
CAUTION Next minor release 9.1 will drop support to PHP 8.0
Full Changelog: 9.0.4...9.0.5
Full Changelog: 9.0.3...9.0.4
Full Changelog: 9.0.2...9.0.3
Full Changelog: 9.0.1...9.0.2
Full Changelog: 9.0.0...9.0.1
How can I help you explore Laravel packages today?