From 3fc79348e88bfc5d4bd7609ad736f5dc2586530d Mon Sep 17 00:00:00 2001 From: Luiz Marin <67489841+luizcmarin@users.noreply.github.com> Date: Wed, 8 May 2024 06:00:53 -0300 Subject: [PATCH 1/2] Fix docs --- README.md | 34 +++++++--------------------------- UPGRADE.md | 2 +- docs/internals.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 28 deletions(-) create mode 100644 docs/internals.md diff --git a/README.md b/README.md index 8ad8439d..15260d58 100755 --- a/README.md +++ b/README.md @@ -27,10 +27,10 @@ provides a `ViewRender` that would allow you to use [Twig](https://twig.symfony. ## Installation -The package could be installed with composer: +The package could be installed with [Composer](https://getcomposer.org): -``` -composer require yiisoft/view-twig --prefer-dist +```shell +composer require yiisoft/view-twig ``` ## General usage @@ -214,32 +214,12 @@ And the view template of the main page (`site/index`) will be as follows:

``` -## 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/UPGRADE.md b/UPGRADE.md index 4beace75..9bde0d04 100755 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,4 +1,4 @@ -# Upgrading Instructions for Yii View Twig Renderer +# Yii View Twig Renderer Upgrading Instructions This file contains the upgrade notes for Yii Framework Twig Extension. These notes highlight changes that could break your application when you upgrade extension from one version to another. diff --git a/docs/internals.md b/docs/internals.md new file mode 100644 index 00000000..f2b7b5ef --- /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 +``` + +## Code style + +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 +``` + +## Dependencies + +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 +``` From 8e22349d4af32301bab967bea244c4ec866c8f25 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sat, 18 May 2024 07:50:34 +0300 Subject: [PATCH 2/2] Update internals.md --- docs/internals.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/internals.md b/docs/internals.md index f2b7b5ef..087a514a 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -36,9 +36,8 @@ use either newest or any specific version of PHP: ## Dependencies -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: +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