From 18cc0b3218854fcab1a64c3774f39c99597aa0c9 Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Mon, 6 May 2024 09:37:03 -0300 Subject: [PATCH] Fix docs --- README.md | 35 ++++++----------------------------- composer.json | 4 ++-- docs/internals.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 31 deletions(-) create mode 100644 docs/internals.md diff --git a/README.md b/README.md index 0dec44d..319d1ae 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ The package provides an ability to record performance profiles. ## Installation -The package could be installed via composer: +The package could be installed with [Composer](https://getcomposer.org): ```shell -composer require --dev yiisoft/profiler +composer require yiisoft/profiler ``` If you use this package with [Yii Config](https://github.com/yiisoft/config) and there will be no `@runtime` alias in `yiisoft/aliases` configuration defined, application will throw "Invalid path alias" error. @@ -51,9 +51,6 @@ return [ ### Profiling ```php -flush(); ``` -## Testing - -### Unit testing - -The package is tested with [PHPUnit](https://phpunit.de/). To run tests: - -```shell -./vendor/bin/phpunit -``` - -### Mutation testing +## Documentation -The package tests are checked with [Infection](https://infection.github.io/) mutation framework with -[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it: +- [Internals](docs/internals.md) -```shell -./vendor/bin/roave-infection-static-analysis-plugin -``` - -### Static analysis - -The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis: - -```shell -./vendor/bin/psalm -``` +If you need help or have a question, the [Yii Forum](https://forum.yiiframework.com/c/yii-3-0/63) is a good place for that. +You may also check out other [Yii Community Resources](https://www.yiiframework.com/community). ## License diff --git a/composer.json b/composer.json index bc52e97..88e16e6 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "issues": "https://github.com/yiisoft/profiler/issues?state=open", "forum": "https://www.yiiframework.com/forum/", "wiki": "https://www.yiiframework.com/wiki/", - "irc": "irc://irc.freenode.net/yii", + "irc": "ircs://irc.libera.chat:6697/yii", "chat": "https://t.me/yii3en", "source": "https://github.com/yiisoft/profiler" }, @@ -63,4 +63,4 @@ "test": "phpunit --testdox --no-interaction", "test-watch": "phpunit-watcher watch" } -} +} \ No newline at end of file diff --git a/docs/internals.md b/docs/internals.md new file mode 100644 index 0000000..8dc4049 --- /dev/null +++ b/docs/internals.md @@ -0,0 +1,45 @@ +# Internals + +## Unit testing + +The package is tested with [PHPUnit](https://phpunit.de/). To run tests: + +```shell +./vendor/bin/phpunit +``` + +## Mutation testing + +The package tests are checked with [Infection](https://infection.github.io/) mutation framework with +[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it: + +```shell +./vendor/bin/roave-infection-static-analysis-plugin +``` + +## Static analysis + +The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis: + +```shell +./vendor/bin/psalm +``` + +## Rector + +Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or +use either newest or any specific version of PHP: + +```shell +./vendor/bin/rector +``` + +## Composer require checker + +This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all dependencies are correctly defined in `composer.json`. + +To run the checker, execute the following command: + +```shell +./vendor/bin/composer-require-checker +```