Skip to content

Commit

Permalink
update Architecture documentation related to version 9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville committed Dec 17, 2023
1 parent bf5aaab commit d510b14
Show file tree
Hide file tree
Showing 20 changed files with 1,421 additions and 926 deletions.
8 changes: 8 additions & 0 deletions docs/architecture/README.md
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/cache.md
Expand Up @@ -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
4 changes: 2 additions & 2 deletions docs/architecture/configuration.md
Expand Up @@ -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
12 changes: 12 additions & 0 deletions 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
4 changes: 2 additions & 2 deletions docs/architecture/event.md
Expand Up @@ -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

Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions docs/architecture/extension.md
Expand Up @@ -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

Expand Down Expand Up @@ -97,6 +97,6 @@ $extensions = [

```

[bartlett/umlwriter]: https://github.com/llaville/umlwriter
[bartlett/graph-uml]: https://packagist.org/packages/bartlett/graph-uml
[symfony-progressbar]: https://symfony.com/doc/current/components/console/helpers/progressbar.html
[symfony-progressindicator]: https://symfony.com/doc/current/components/console/helpers/progressindicator.html
4 changes: 2 additions & 2 deletions docs/architecture/finder.md
Expand Up @@ -12,7 +12,7 @@ you can replace the `Overtrue\PHPLint\Finder` object by any Symfony Finder insta

![UML Diagram](../assets/finder-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/finder]: https://github.com/symfony/finder
17 changes: 17 additions & 0 deletions docs/architecture/helper.md
@@ -0,0 +1,17 @@
# Helper

PHPLint uses two adapted Symfony Console helpers
([ProcessHelper][symfony/process-helper] and [DebugFormatterHelper][symfony/debug-formatter-helper])
for debugging asynchronous processes.

You've just to use verbose level 2 or 3 to see live results.

## UML Diagram

![UML Diagram](../assets/helper-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/process-helper]: https://symfony.com/doc/current/components/console/helpers/processhelper.html
[symfony/debug-formatter-helper]: https://symfony.com/doc/current/components/console/helpers/debug_formatter.html
6 changes: 3 additions & 3 deletions docs/architecture/output.md
Expand Up @@ -12,9 +12,9 @@ via the `Overtrue\PHPLint\Output\ChainOutput` object and its handlers (`Overtrue

## UML Diagram

![UML Diagram](../assets/extension-uml-diagram.svg)
![UML Diagram](../assets/output-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.

## `ConsoleOutput` handler

Expand Down Expand Up @@ -88,7 +88,7 @@ This handler is responsible to print PHPLint results on Junit XML format. For ex
</testsuites>
```

[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
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/process.md
Expand Up @@ -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)

Expand Down Expand Up @@ -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
42 changes: 21 additions & 21 deletions docs/assets/cache-uml-diagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d510b14

Please sign in to comment.