File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,3 +19,5 @@ composer.lock
1919
2020# OS X
2121** /.DS_Store
22+
23+ resources /models /raw
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ This README is divided into several sections:
6767* [ Naming conventions] ( #naming-conventions )
6868* [ API versions] ( #api-versions )
6969* [ Working with DTOs] ( #working-with-dtos )
70+ * [ Contributing] ( #contributing )
7071
7172## Getting Started
7273
@@ -540,3 +541,19 @@ $response = $ordersApi->confirmShipment(
540541 confirmShipmentRequest: $confirmShipmentRequest,
541542)
542543```
544+
545+ ## Contributing
546+
547+ To regenerate the library, you can run
548+
549+ # composer clean
550+ # composer build
551+
552+ Composer has a number of pre-configured scripts in ` composer.json ` :
553+
554+ * ` build ` : Run all the stages to regenerate the PHP files
555+ * ` clean ` : Delete all the generated PHP and JSON files
556+ * ` lint ` : Run PHP-CS-Fixer
557+ * ` schema:download ` : Download the schemas from Amazon
558+ * ` schema:generate ` : Generate the PHP files from the schemas
559+ * ` schema:refactor ` : Make local modifications to the schemas before generation
Original file line number Diff line number Diff line change 2323 "require" : {
2424 "php" : " >=8.1" ,
2525 "ext-curl" : " *" ,
26+ "ext-dom" : " *" ,
2627 "ext-json" : " *" ,
2728 "ext-mbstring" : " *" ,
29+ "ext-simplexml" : " *" ,
2830 "guzzlehttp/guzzle" : " ^6.0|^7.0" ,
2931 "saloonphp/saloon" : " ^3.4" ,
3032 "openspout/openspout" : " ^4.23" ,
5456 }
5557 },
5658 "scripts" : {
59+ "build" : [
60+ " @schema:download" ,
61+ " @schema:refactor" ,
62+ " @schema:generate" ,
63+ " @lint"
64+ ],
65+ "clean" : " rm -rf src/Vendor src/Seller resources/models/seller resources/models/vendor resources/models/raw" ,
5766 "lint" : [
5867 " @pint" ,
5968 " @php-compatibility-check"
6069 ],
6170 "pint" : " php vendor/bin/pint" ,
6271 "php-compatibility-check" : " ./vendor/bin/phpcs -p ./src ./bin --standard=PHPCompatibility --runtime-set testVersion 8.1-" ,
6372 "post-install-cmd" : " \" vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility" ,
64- "post-update-cmd" : " \" vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility"
73+ "post-update-cmd" : " \" vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility" ,
74+ "schema:download" : " @php bin/console schema:download" ,
75+ "schema:generate" : " @php bin/console schema:generate" ,
76+ "schema:refactor" : " @php bin/console schema:refactor"
6577 },
6678 "config" : {
6779 "allow-plugins" : {
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments