Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 2.12 KB

internals.md

File metadata and controls

62 lines (43 loc) · 2.12 KB

Internals

Unit testing

The package is tested with PHPUnit. To run tests:

./vendor/bin/phpunit

Mutation testing

The package tests are checked with Infection mutation framework with Infection Static Analysis Plugin. To run it:

./vendor/bin/roave-infection-static-analysis-plugin

Static analysis

The code is statically analyzed with Psalm. To run static analysis:

./vendor/bin/psalm

Code style

Use Rector to make codebase follow some specific rules or use either newest or any specific version of PHP:

./vendor/bin/rector

Dependencies

This package uses composer-require-checker to check if all dependencies are correctly defined in composer.json. To run the checker, execute the following command:

./vendor/bin/composer-require-checker

Translation

This package uses po4a in Github Action for translations.
Translation algorithm:

  • Install an application for working with .po translation files. For example, Poedit, Lokalize, Gtranslator or another.
  • Find folder with the name of the file you want to translate in /docs/po
  • Open the file with the .po extension in Poedit from the folder with the desired localization, for example /docs/po/attribute-resolver-factory.md/ru/attribute-resolver-factory.md.ru.po. If there is no localization yet, create an issue.
  • Translate necessary strings and push the changes
  • Open pull request to main repository

Warning: Do not change the translation in files in /docs/guide/{lang} manually

If you have changed English documentation:

  • Open pull request to main repository
  • Pull updated branch after successful completion of workflow Update docs translation in Github Action
  • Update translation in .po files by Poedit
  • Push changes