Skip to content

Latest commit

 

History

History
76 lines (47 loc) · 2.29 KB

File metadata and controls

76 lines (47 loc) · 2.29 KB

Submitting issues

Please read the below before posting an issue. Thank you!

If, you think you've found a bug, or would like to discuss a change or improvement, feel free to raise an issue.

Pull requests

This is a fairly simple converter, but it has been made much better by contributions from those using it. If you'd like to suggest an improvement, please raise an issue to discuss it before making your pull request.

Pull requests for bugs are more than welcome - please explain the bug you're trying to fix in the message.

Developing

🧪 Running tests

Run the test suite without code coverage (no Xdebug required):

./vendor/bin/phpunit --no-coverage

Run the test suite with code coverage (requires Xdebug or PCOV):

XDEBUG_MODE=coverage ./vendor/bin/phpunit

Note: Running ./vendor/bin/phpunit without --no-coverage and without a coverage driver will fail with "No code coverage driver available". Use --no-coverage for day-to-day local development.

🚔 Check Symfony 4 coding standards & best practices

You need to run composer before using FriendsOfPHP/PHP-CS-Fixer.

Ensure PHP Community Best Practicies using PHP Coding Standards Fixer

It can modernize your code (like converting the pow function to the ** operator on PHP 5.6) and (micro) optimize it.

./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle

Attempts to dig into your program and find as many type-related bugs as possiblevia Psalm

./vendor/bin/psalm

Catches whole classes of bugs even before you write tests using PHPStan

./vendor/bin/phpstan analyse ./ --error-format=checkstyle

Improve global code quality using PHPMD (PHP Mess Detector)

Detect overcomplicated expressions & Unused parameters, methods, properties

./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests

Checks compatibility with PHP interpreter versions

./vendor/bin/phpcf --target 7.3 --file-extensions php,inc,test ./

Enforce code standards with git hooks

Maintaining code quality by adding the custom post-commit hook to yours.

cat ./bin/post-commit >> ./.git/hooks/post-commit