cepdtech / pokemon
Magento 2 module to integrate with PokeAPI
Package info
github.com/RadekBucki/Magento2PokemonApiIntegration
Type:magento2-module
pkg:composer/cepdtech/pokemon
1.0.0
2024-07-28 09:51 UTC
Requires
- magento/framework: *
This package is auto-updated.
Last update: 2026-02-28 13:25:44 UTC
README
Magento 2 module to integrate with PokeAPI
Setup
composer require cepdtech/pokemon
ADR
Write own Pokemon API client
There are 2 3rd party libraries, but both has problems:
- https://github.com/danrovito/pokephp
- doesn't support injection of base URL
- https://github.com/lmerotta/phpokeapi
- doesn't support PHP 8
In normal situation I will propose to use the first one (in the worst scenario (url changed) composer patch could be used), but because this is skill presentation project, I decided to write my own client.
Quality
Tested on:
- PHP 8.3
- Magento Community Edition 2.4.7
Tests
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/cepdtech/pokemon
Code sniffer
vendor/bin/phpcs --standard=Magento2 -p -s --colors --error-severity=1 --warning-severity=0 vendor/cepdtech/pokemon/
Copy-paste detector
vendor/bin/phpcpd vendor/cepdtech/pokemon/
Mess detector
vendor/bin/phpmd vendor/cepdtech/pokemon/ text dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml