Please read the below before posting an issue. Thank you!
- If your question is about the TrustedShops API itself, please check out the TrustedShops Guides. This project doesn't handle any of that logic - we're just helping you form the requests.
If, however, you think you've found a bug, or would like to discuss a change or improvement, feel free to raise an issue and we'll figure it out between us.
This is a fairly simple wrapper, 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.
There are a small number of PHPUnit unit tests. To get up and running, copy .env.example
to .env
and add your API key details. Unit testing against an API is obviously a bit tricky, but I'd welcome any contributions to this. It would be great to have more test coverage.
You need to run composer before using FriendsOfPHP/PHP-CS-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
./vendor/bin/psalm
The SensioLabs Security Checker is a command line tool that checks if the application uses dependencies with known security vulnerabilitie.
./vendor/bin/security-checker security:check ./composer.lock
Detect overcomplicated expressions & Unused parameters, methods, properties
./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests
Maintaining code quality by adding the custom post-commit hook to yours.
cat ./bin/post-commit >> ./.git/hooks/post-commit