diff --git a/.changes/9.0.7.md b/.changes/9.0.7.md
new file mode 100644
index 00000000..d8653f87
--- /dev/null
+++ b/.changes/9.0.7.md
@@ -0,0 +1,9 @@
+
+## 9.0.7 - 2024-02-05
+
+### Fixed
+
+- [#200](https://github.com/overtrue/phplint/issues/200) : Unable to create file `/github/home/.composer/config.json` in GitHub Action
+- [#201](https://github.com/overtrue/phplint/issues/201) : GitHub Action build docker on fly with wrong version
+
+**Full Changelog**: [9.0.6...9.0.7](https://github.com/overtrue/phplint/compare/9.0.6...9.0.7)
diff --git a/.changes/9.1.0.md b/.changes/9.1.0.md
new file mode 100644
index 00000000..eb6f8969
--- /dev/null
+++ b/.changes/9.1.0.md
@@ -0,0 +1,27 @@
+
+## 9.1.0 - 2023-12-17
+
+### Added
+
+- PHPStan dev tool to enforce code quality of this project (see Contributor guide)
+- Introduces a `DebugFormatterHelper` for asynchronous process
+- Introduces a `ProcessHelper` for asynchronous process
+- Introduces a new extension (`ProgressIndicator`) to let users know that the `phplint` command isn't stalled. Uses `--progress=indicator`.
+
+### Changed
+
+- Replaces Symfony components constraint to new LTS (6.4), and drop support to old one (5.4)
+- `ProgressPrinter` and `ProgressBar` extensions must now implement the `Overtrue\PHPLint\Output\ConsoleOutputInterface` specification
+- Reorganize dev tools under their own composer namespace (`check-style` begins `style:check`, and `fix-style` begins `style:fix`)
+- [#197](https://github.com/overtrue/phplint/issues/197) : Faster process linter
+- rename BOX config file to `box.json.dist`
+- Dockerfile bump default PHP version from 8.2 to 8.3 (to produce better perf)
+
+### Removed
+
+- drop support of PHPUnit 9
+- drop support of PHP 8.0
+- `setApplicationVersion` and `setConfigResolver` methods were removed from `Overtrue\PHPLint\Output\ConsoleOutputInterface`
+as there are no more required
+
+**Full Changelog**: [9.0.6...9.1.0](https://github.com/overtrue/phplint/compare/9.0.6...9.1.0)
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
new file mode 100644
index 00000000..fbe999ed
--- /dev/null
+++ b/.github/workflows/benchmark.yml
@@ -0,0 +1,125 @@
+---
+name: Benchmarking
+
+on:
+ workflow_dispatch:
+
+jobs:
+ benchmark-baseline:
+ name: "Benchmark Baseline"
+
+ runs-on: "${{ matrix.operating-system }}"
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ operating-system:
+ - "ubuntu-22.04"
+
+ php-version:
+ - "8.1"
+
+ steps:
+ - # https://github.com/actions/checkout
+ name: Checkout Code
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ ref: "9.1"
+ repository: "overtrue/phplint"
+
+ - # https://github.com/shivammathur/setup-php
+ name: Setup PHP runtime
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: "${{ matrix.php-version }}"
+ coverage: "none"
+
+ - # https://github.com/ramsey/composer-install
+ name: Install Composer dependencies
+ uses: ramsey/composer-install@v2
+ with:
+ composer-options: "--prefer-dist"
+
+ - # https://github.com/phpbench/phpbench
+ name: Install PHPBench
+ run: |
+ curl -Ls https://github.com/phpbench/phpbench/releases/download/1.2.15/phpbench.phar -o /usr/local/bin/phpbench
+ chmod +x /usr/local/bin/phpbench
+
+ - # https://github.com/phpbench/phpbench
+ name: Benchmark baseline
+ run: |
+ phpbench run tests/Benchmark --tag=${{ matrix.php-version }}
+
+ - # https://github.com/actions/upload-artifact
+ name: Upload PHPBench baseline
+ uses: actions/upload-artifact@v3
+ with:
+ name: "PHPBench-Baseline"
+ path: ".phpbench/"
+
+ benchmark-report:
+ needs: benchmark-baseline
+
+ name: "Benchmark Report"
+
+ runs-on: "${{ matrix.operating-system }}"
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ operating-system:
+ - "ubuntu-22.04"
+
+ php-version:
+ - "8.3"
+
+ steps:
+ - # https://github.com/actions/checkout
+ name: Checkout Code
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ ref: "9.1"
+ repository: "overtrue/phplint"
+
+ - # https://github.com/shivammathur/setup-php
+ name: Setup PHP runtime
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: "${{ matrix.php-version }}"
+ coverage: "none"
+
+ - # https://github.com/ramsey/composer-install
+ name: Install Composer dependencies
+ uses: ramsey/composer-install@v2
+ with:
+ composer-options: "--prefer-dist"
+
+ - # https://github.com/phpbench/phpbench
+ name: Install PHPBench
+ run: |
+ curl -Ls https://github.com/phpbench/phpbench/releases/download/1.2.15/phpbench.phar -o /usr/local/bin/phpbench
+ chmod +x /usr/local/bin/phpbench
+
+ - # https://github.com/actions/download-artifact
+ name: Retrieve PHPBench baseline results
+ uses: actions/download-artifact@v3
+ with:
+ name: "PHPBench-Baseline"
+ path: ".phpbench/"
+
+ - # https://github.com/phpbench/phpbench
+ name: Benchmark Reports
+ run: |
+ phpbench run tests/Benchmark --tag=${{ matrix.php-version }} --ref="8.1" --report=aggregate --report overview --output=html
+
+ - # https://github.com/actions/upload-artifact
+ name: Upload PHPBench report
+ uses: actions/upload-artifact@v3
+ with:
+ name: "PHPBench-Report"
+ path: ".phpbench/html/index.html"
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 926e1569..990ce4da 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -20,7 +20,6 @@ jobs:
- "ubuntu-22.04"
php-version:
- - "8.0"
- "8.1"
- "8.2"
- "8.3"
@@ -30,20 +29,12 @@ jobs:
name: Checkout code
uses: actions/checkout@v4
- - # https://github.com/shivammathur/setup-php
- name: Setup PHP runtime for PHPUnit 9
- uses: shivammathur/setup-php@v2
- if: ${{ matrix.php-version == '8.0' }}
- with:
- php-version: "${{ matrix.php-version }}"
- tools: phpunit:9.6
-
- # https://github.com/shivammathur/setup-php
name: Setup PHP runtime for PHPUnit 10
- if: ${{ matrix.php-version != '8.0' }}
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
+ coverage: "none"
tools: phpunit:10.5
- # https://github.com/ramsey/composer-install
@@ -52,11 +43,6 @@ jobs:
with:
composer-options: "--prefer-dist --no-scripts"
- - # https://github.com/sebastianbergmann/phpunit/tree/9.6
- name: Unit tests with PHPUnit 9
- if: ${{ matrix.php-version == '8.0' }}
- run: phpunit --configuration ./phpunit-9.xml --testdox --do-not-cache-result
- # https://github.com/sebastianbergmann/phpunit/tree/10.5
name: Unit tests with PHPUnit 10
- if: ${{ matrix.php-version != '8.0' }}
run: phpunit --no-progress --testdox --do-not-cache-result
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1bfb4bf8..ef587203 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -20,9 +20,9 @@ jobs:
os:
- ubuntu-22.04
php:
- - 8.1
+ - 8.2
tools:
- - box:4.5 # available since https://github.com/shivammathur/setup-php/releases/tag/2.27.0
+ - box:4.6 # available since https://github.com/shivammathur/setup-php/releases/tag/2.27.0
steps:
- # https://github.com/actions/checkout
@@ -34,8 +34,14 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
+ coverage: "none"
tools: ${{ matrix.tools }}
+ - # https://getcomposer.org/doc/06-config.md#platform
+ name: Setup Composer Platform
+ run: |
+ composer config platform.php 8.1
+
- # https://github.com/ramsey/composer-install
name: Install Composer dependencies
uses: ramsey/composer-install@v2
diff --git a/.gitignore b/.gitignore
index 4ea98549..1e07ad01 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,9 @@
composer.lock
/vendor/
.phpunit.cache/
-.phpunit.result.cache
.phplint.cache/
.idea
.php-cs-fixer.cache
-/vendor-bin/**/vendor
\ No newline at end of file
+/vendor-bin/**/vendor
+.phpbench/
+site/
\ No newline at end of file
diff --git a/.php-cs-fixer.release.php b/.php-cs-fixer.release.php
new file mode 100644
index 00000000..e0743c18
--- /dev/null
+++ b/.php-cs-fixer.release.php
@@ -0,0 +1,18 @@
+registerCustomFixers([
+ new ApplicationVersionFixer(),
+ ])
+ ->setRules([
+ ApplicationVersionFixer::name() => true,
+ ])
+ ->setFinder(
+ PhpCsFixer\Finder::create()
+ ->in([__DIR__.'/src/Console'])
+ )
+;
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f900fed4..8ad14149 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,42 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
+## 9.0.7 - 2024-02-05
+
+### Fixed
+
+- [#200](https://github.com/overtrue/phplint/issues/200) : Unable to create file `/github/home/.composer/config.json` in GitHub Action
+- [#201](https://github.com/overtrue/phplint/issues/201) : GitHub Action build docker on fly with wrong version
+
+**Full Changelog**: [9.0.6...9.0.7](https://github.com/overtrue/phplint/compare/9.0.6...9.0.7)
+
+## 9.1.0 - 2023-12-17
+
+### Added
+
+- PHPStan dev tool to enforce code quality of this project (see Contributor guide)
+- Introduces a `DebugFormatterHelper` for asynchronous process
+- Introduces a `ProcessHelper` for asynchronous process
+- Introduces a new extension (`ProgressIndicator`) to let users know that the `phplint` command isn't stalled. Uses `--progress=indicator`.
+
+### Changed
+
+- Replaces Symfony components constraint to new LTS (6.4), and drop support to old one (5.4)
+- `ProgressPrinter` and `ProgressBar` extensions must now implement the `Overtrue\PHPLint\Output\ConsoleOutputInterface` specification
+- Reorganize dev tools under their own composer namespace (`check-style` begins `style:check`, and `fix-style` begins `style:fix`)
+- [#197](https://github.com/overtrue/phplint/issues/197) : Faster process linter
+- rename BOX config file to `box.json.dist`
+- Dockerfile bump default PHP version from 8.2 to 8.3 (to produce better perf)
+
+### Removed
+
+- drop support of PHPUnit 9
+- drop support of PHP 8.0
+- `setApplicationVersion` and `setConfigResolver` methods were removed from `Overtrue\PHPLint\Output\ConsoleOutputInterface`
+as there are no more required
+
+**Full Changelog**: [9.0.6...9.1.0](https://github.com/overtrue/phplint/compare/9.0.6...9.1.0)
+
## 9.0.6 - 2023-12-02
### Fixed
diff --git a/Dockerfile b/Dockerfile
index 7d746abe..3907ed45 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1.4
-ARG PHP_VERSION=8.2
+ARG PHP_VERSION=8.0
+ARG PHPLINT_VERSION=9.0.7
FROM php:${PHP_VERSION}-cli-alpine
@@ -16,7 +17,7 @@ USER appuser
# Install Composer v2 then overtrue/phplint package
COPY --from=composer/composer:2-bin /composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
-RUN composer global require --no-progress overtrue/phplint ^9.0
+RUN composer global require --no-progress overtrue/phplint ${PHPLINT_VERSION}
# Following recommendation at https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#workdir
diff --git a/README.md b/README.md
index 01d20af8..4722b094 100644
--- a/README.md
+++ b/README.md
@@ -12,16 +12,19 @@
| Version | Status | Requirements |
|:--------|:------------------------------------------|:---------------|
-| **9.x** | **Active development** | **PHP >= 8.0** |
+| **9.1** | **Active development** | **PHP >= 8.1** |
+| 9.0 | Active support | PHP >= 8.0 |
| 6.x | Active support | PHP >= 8.2 |
| 5.x | Active support | PHP >= 8.1 |
-| 4.x | Active support | PHP >= 8.0 |
+| 4.x | End Of Life | PHP >= 8.0 |
| 3.x | End Of Life | PHP >= 7.4 |
**NOTE** if you have an older version of PHP lower than 8.0, we recommend to use the latest version [3.4.0](https://github.com/overtrue/phplint/releases/tag/3.4.0)
+Version 9.1 is based on 9.0 code but did not support anymore PHP 8.0 that reached End-Of-Life.
+
Major version 9.0 is a full code rewrites that have the same source code (`main` branch) for all PHP 8.x versions (`4.x`, `5.x` or `6.x`),
-with lot of improvement, full documentation, and full unit code tested.
+with a lot of improvement, full documentation, and full unit code tested.
## Table of Contents
diff --git a/bin/phplint b/bin/phplint
index b97cc9c8..b17c66a7 100755
--- a/bin/phplint
+++ b/bin/phplint
@@ -1,27 +1,9 @@
#!/usr/bin/env php
hasParameterOption(['--no-progress'], true)) {
$extensions = [];
} elseif (true === $input->hasParameterOption(['--progress'], true)) {
$progress = $input->getParameterOption('--progress', 'printer');
- if ('bar' === $progress) {
- $extensions = [new ProgressBar()];
- }
+
+ $extensions = match($progress) {
+ 'meter' => [new ProgressPrinter()],
+ 'bar' => [new ProgressBar()],
+ 'indicator' => [new ProgressIndicator()],
+ };
}
$extensions[] = new OutputFormat([
diff --git a/box.json b/box.json.dist
similarity index 93%
rename from box.json
rename to box.json.dist
index 368bd6e8..60d7afc0 100644
--- a/box.json
+++ b/box.json.dist
@@ -1,4 +1,5 @@
{
+ "compression": "GZ",
"chmod": "0700",
"banner": [
"This file is part of the overtrue/phplint package",
diff --git a/composer.json b/composer.json
index a6c05732..0c277959 100644
--- a/composer.json
+++ b/composer.json
@@ -21,21 +21,22 @@
}
],
"require": {
- "php": "^8.0",
+ "php": "^8.1",
+ "ext-dom": "*",
"ext-json": "*",
"ext-mbstring": "*",
- "symfony/cache": "^5.4 || ^6.0 || ^7.0",
- "symfony/console": "^5.4 || ^6.0 || ^7.0",
- "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0",
- "symfony/finder": "^5.4 || ^6.0 || ^7.0",
- "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0",
- "symfony/process": "^5.4 || ^6.0 || ^7.0",
- "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
+ "symfony/cache": "^6.4 || ^7.0",
+ "symfony/console": "^6.4 || ^7.0",
+ "symfony/event-dispatcher": "^6.4 || ^7.0",
+ "symfony/finder": "^6.4 || ^7.0",
+ "symfony/options-resolver": "^6.4 || ^7.0",
+ "symfony/process": "^6.4 || ^7.0",
+ "symfony/yaml": "^6.4 || ^7.0"
},
"require-dev": {
"php-parallel-lint/php-console-highlighter": "^1.0",
"brainmaestro/composer-git-hooks": "^2.8.5 || 3.0.0-alpha.1",
- "jetbrains/phpstorm-stubs": "^2021.3 || ^2022.3 || ^2023.0",
+ "jetbrains/phpstorm-stubs": "^2021.3 || ^2022.3 || ^2023.3",
"bamarni/composer-bin-plugin": "^1.4"
},
"autoload": {
@@ -51,11 +52,15 @@
"extra": {
"hooks": {
"pre-commit": [
- "composer fix-style"
+ "composer style:fix",
+ "composer code:check"
+ ],
+ "pre-push": [
+ "composer qa:check"
]
},
"branch-alias": {
- "dev-main": "9.0.x-dev"
+ "dev-main": "9.1.x-dev"
}
},
"scripts": {
@@ -71,18 +76,28 @@
"@composer bin all install --ansi"
],
"cghooks": "vendor/bin/cghooks",
- "check-style": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --using-cache=no --verbose --ansi --diff --dry-run",
- "fix-style": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --using-cache=no --verbose --ansi",
+ "qa:check": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.release.php --using-cache=no --verbose --ansi --diff --dry-run",
+ "qa:fix": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.release.php --using-cache=no --verbose --ansi",
+ "style:check": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --using-cache=no --verbose --ansi --diff --dry-run",
+ "style:fix": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --using-cache=no --verbose --ansi",
"tests:unit": "vendor/bin/phpunit --testsuite=cache,configuration,finder",
"tests:e2e": "vendor/bin/phpunit --testsuite=e2e",
"tests:all": "vendor/bin/phpunit",
- "lint:syntax": "./bin/phplint --ansi"
+ "lint:syntax": "./bin/phplint --ansi",
+ "code:check": "vendor/bin/phpstan analyse --configuration phpstan.neon.dist"
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts-descriptions": {
- "check-style": "Run style checks (only dry run - no fixing!).",
- "fix-style": "Run style checks and fix violations."
+ "qa:check": "Run QA style checks before pushing new tag and releasing a new version (only dry run - no fixing!).",
+ "qa:fix": "Run QA style checks and fix violations.",
+ "style:check": "Run style checks (only dry run - no fixing!).",
+ "style:fix": "Run style checks and fix violations.",
+ "tests:unit": "Run unit tests on following components: cache, configuration, finder",
+ "tests:e2e": "Run end to end tests",
+ "tests:all": "Run unit and end to end tests",
+ "lint:syntax": "Run PHPLint on it own source code",
+ "code:check": "Run PHPStan code analysis on PHPLint source code"
},
"bin": [
"bin/phplint"
diff --git a/config/bootstrap.php b/config/bootstrap.php
new file mode 100644
index 00000000..e722415d
--- /dev/null
+++ b/config/bootstrap.php
@@ -0,0 +1,51 @@
+getAlias(),
+ ];
+} else {
+ $possibleAutoloadPaths = [
+ // local dev repository
+ dirname(__DIR__),
+ // dependency
+ dirname(__DIR__, 4),
+ ];
+}
+
+$isAutoloadFound = false;
+foreach ($possibleAutoloadPaths as $possibleAutoloadPath) {
+ if (file_exists($possibleAutoloadPath . DIRECTORY_SEPARATOR . $autoloader)) {
+ require_once $possibleAutoloadPath . DIRECTORY_SEPARATOR . $autoloader;
+ $isAutoloadFound = true;
+ $vendorDir = $possibleAutoloadPath . DIRECTORY_SEPARATOR . dirname($autoloader);
+ break;
+ }
+}
+
+if ($isAutoloadFound === false) {
+ throw new RuntimeException(
+ sprintf(
+ 'Unable to find "%s" in "%s" paths.',
+ $autoloader,
+ implode('", "', $possibleAutoloadPaths)
+ )
+ );
+}
diff --git a/docs/architecture/README.md b/docs/architecture/README.md
index 6e22937a..c6224be8 100644
--- a/docs/architecture/README.md
+++ b/docs/architecture/README.md
@@ -10,6 +10,10 @@ To learn how PHPLint is able to improve speed analysis on multiple runs.
To learn how PHPLint options can customize your checks.
+## [Console](console.md#console)
+
+To learn more about PHPLint CLI application.
+
## [Event-Driven](event.md#event-driven-architecture-on-wikipediaeda)
To learn more about how to extend PHPLint features.
@@ -22,6 +26,10 @@ To learn more about how to extend PHPLint features.
To learn how PHPLint find files to check.
+## [Helper](helper.md#helper)
+
+To learn how PHPLint is able to debug asynchronous processes run in background.
+
## [Output](output.md#output-formats)
To learn how PHPLint can customize results output.
diff --git a/docs/architecture/cache.md b/docs/architecture/cache.md
index ac93c20d..40a158d1 100644
--- a/docs/architecture/cache.md
+++ b/docs/architecture/cache.md
@@ -17,8 +17,8 @@ You can change this directory with the `cache` option. See [Configuration](../co
![UML Diagram](../assets/cache-uml-diagram.svg)
-Generated by [bartlett/umlwriter][bartlett/umlwriter] package.
+Generated by [bartlett/graph-uml][bartlett/graph-uml] package via the `resources/graph-uml/build.php` script.
-[bartlett/umlwriter]: https://github.com/llaville/umlwriter
+[bartlett/graph-uml]: https://packagist.org/packages/bartlett/graph-uml
[symfony/cache]: https://github.com/symfony/cache
[filesystem-adapter]: https://symfony.com/doc/current/components/cache/adapters/filesystem_adapter.html
diff --git a/docs/architecture/configuration.md b/docs/architecture/configuration.md
index 985b8f27..487fbb87 100644
--- a/docs/architecture/configuration.md
+++ b/docs/architecture/configuration.md
@@ -20,8 +20,8 @@ When YAML configuration file exists and is loadable, it will be automatically us
![UML Diagram](../assets/config-uml-diagram.svg)
-Generated by [bartlett/umlwriter][bartlett/umlwriter] package.
+Generated by [bartlett/graph-uml][bartlett/graph-uml] package via the `resources/graph-uml/build.php` script.
-[bartlett/umlwriter]: https://github.com/llaville/umlwriter
+[bartlett/graph-uml]: https://packagist.org/packages/bartlett/graph-uml
[symfony/options-resolver]: https://github.com/symfony/options-resolver
[factory-method-pattern]: https://en.wikipedia.org/wiki/Factory_method_pattern
diff --git a/docs/architecture/console.md b/docs/architecture/console.md
new file mode 100644
index 00000000..6cb7859d
--- /dev/null
+++ b/docs/architecture/console.md
@@ -0,0 +1,12 @@
+# Console
+
+PHPLint is a CLI Application with a single command built over the [Symfony Console Component][symfony/console].
+
+## UML Diagram
+
+![UML Diagram](../assets/console-uml-diagram.svg)
+
+Generated by [bartlett/graph-uml][bartlett/graph-uml] package via the `resources/graph-uml/build.php` script.
+
+[bartlett/graph-uml]: https://packagist.org/packages/bartlett/graph-uml
+[symfony/console]: https://symfony.com/doc/current/components/console.html
diff --git a/docs/architecture/event.md b/docs/architecture/event.md
index 4f1f96b1..348e58b3 100644
--- a/docs/architecture/event.md
+++ b/docs/architecture/event.md
@@ -9,7 +9,7 @@ That's allow to easily add new `Extension` (like progress `bar` and `meter` widg
![UML Diagram](../assets/event-uml-diagram.svg)
-Generated by [bartlett/umlwriter][bartlett/umlwriter] package.
+Generated by [bartlett/graph-uml][bartlett/graph-uml] package via the `resources/graph-uml/build.php` script.
## The Dispatcher
@@ -40,6 +40,6 @@ $dispatcher = new EventDispatcher($extensions);
```
[eda]: https://en.wikipedia.org/wiki/Event-driven_architecture
-[bartlett/umlwriter]: https://github.com/llaville/umlwriter
+[bartlett/graph-uml]: https://packagist.org/packages/bartlett/graph-uml
[symfony/event-dispatcher]: https://github.com/symfony/event-dispatcher
[EventSubscriberInterface]: https://github.com/symfony/symfony/blob/5.4/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php
diff --git a/docs/architecture/extension.md b/docs/architecture/extension.md
index 2c87a609..7d62ccfa 100644
--- a/docs/architecture/extension.md
+++ b/docs/architecture/extension.md
@@ -7,7 +7,7 @@ Each extension is based on [Event Driven Architecture](./event.md)
![UML Diagram](../assets/extension-uml-diagram.svg)
-Generated by [bartlett/umlwriter][bartlett/umlwriter] package.
+Generated by [bartlett/graph-uml][bartlett/graph-uml] package via the `resources/graph-uml/build.php` script.
## OutputFormat
@@ -40,6 +40,15 @@ Here is preview of what it will look like :
![Progress Bar Verbose Max](../assets/progress-bar-verbose-max.png)
+## ProgressIndicator
+
+This extension is useful to let users know that the `phplint` command isn't stalled.
+Learn more with the official Symfony documentation on [ProgressIndicator Console Helper][symfony-progressindicator]
+
+![Progress Indicator Running](../assets/progress-indicator-running.png)
+
+![Progress Indicator Finished](../assets/progress-indicator-finished.png)
+
## Example(s)
Default progress printer widget:
@@ -62,6 +71,16 @@ $extensions = [new ProgressBar()];
```
+Default progress indicator widget:
+
+```php
+
-
-
- /path/to/tests/fixtures/syntax_error.php
+
+
+ /path/to/fixtures/syntax_error.php
+ /path/to/fixtures/php-8.2_syntax.php
```
-[bartlett/umlwriter]: https://github.com/llaville/umlwriter
+[bartlett/graph-uml]: https://packagist.org/packages/bartlett/graph-uml
[symfony/console]: https://github.com/symfony/console
[symfony-console-events]: https://symfony.com/doc/current/components/console/events.html
[chain-of-responsibility-pattern]: https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern
diff --git a/docs/architecture/process.md b/docs/architecture/process.md
index f6e706c7..693116fe 100644
--- a/docs/architecture/process.md
+++ b/docs/architecture/process.md
@@ -7,9 +7,9 @@ and build one `Overtrue\PHPLint\Process\LintProcess` instance for each command/f
## UML Diagram
-![UML Diagram](../assets/extension-uml-diagram.svg)
+![UML Diagram](../assets/process-uml-diagram.svg)
-Generated by [bartlett/umlwriter][bartlett/umlwriter] package.
+Generated by [bartlett/graph-uml][bartlett/graph-uml] package via the `resources/graph-uml/build.php` script.
## Example(s)
@@ -51,5 +51,5 @@ $results = $linter->lintFiles($finder->getFiles());
// - list of file that were analyzed (`getMisses()`) because contents changed since previous run
```
-[bartlett/umlwriter]: https://github.com/llaville/umlwriter
+[bartlett/graph-uml]: https://packagist.org/packages/bartlett/graph-uml
[symfony/process]: https://github.com/symfony/process
diff --git a/docs/assets/cache-uml-diagram.svg b/docs/assets/cache-uml-diagram.svg
index 15715eca..5943fc92 100644
--- a/docs/assets/cache-uml-diagram.svg
+++ b/docs/assets/cache-uml-diagram.svg
@@ -1,36 +1,36 @@
-
-