Update ShippingService.php
RequiresAdditionalSellerInputs is not always present in response, so allow nulled value
You edited a file that is auto generated. Have a look at this pull request: https://github.com/jlevers/selling-partner-api/pull/741
I've had a similar issue with a different class. You should add the change to the modifications.json and then regenerate the files.
It's explained in the contributing.md. Else your change would be revoked with the next generation process.
Thank you @KhorneHoly for stating out that dependency. I changed like in your PR both json files as well. Hope the change is complete in that way?!
@simonsolutions this looks good. It looks like you modified the JSON schema file directly and then added the modification to the modifications.json file, which is fine, but I just would like to test the addition to modifications.json by running the commands below, and ensuring that your resources/models/seller/merchant-fulfillment/v0.json and src/Seller/MerchantFulfillmentV0/Dto/ShippingService.php files stay the same:
$ php bin/console schema:refactor --schema merchant-fulfillment
$ php bin/console schema:generate --schema merchant-fulfillment
$ composer lint
In which configuration do you run these commands, within my project the console command is not found and on a separate folder for the repo the autoload is not found.
Are you in the root project directory for your fork of this repo when you run the commands?
I tried both, my project root and the fork's root directory
Can you show me the error you're getting?
In my project root (this library added)
There are no commands defined in the "schema" namespace.
Did you mean this?
doctrine:schema
and in the library's root:
PHP Warning: require(/xxxxx/vendor/jlevers/selling-partner-api/bin/../vendor/autoload.php): Failed to open stream: No such file or directory in /xxxxx/vendor/jlevers/selling-partner-api/bin/console on line 3
Warning: require(/xxxxx/vendor/jlevers/selling-partner-api/bin/../vendor/autoload.php): Failed to open stream: No such file or directory in /xxxxx/vendor/jlevers/selling-partner-api/bin/console on line 3
PHP Fatal error: Uncaught Error: Failed opening required '/xxxxx/vendor/jlevers/selling-partner-api/bin/../vendor/autoload.php' (include_path='.:/opt/homebrew/Cellar/php/8.3.9/share/php/pear') in /xxxxx/vendor/jlevers/selling-partner-api/bin/console:3
Stack trace:
#0 {main}
thrown in /xxxxx/vendor/jlevers/selling-partner-api/bin/console on line 3
Fatal error: Uncaught Error: Failed opening required '/xxxxx/vendor/jlevers/selling-partner-api/bin/../vendor/autoload.php' (include_path='.:/opt/homebrew/Cellar/php/8.3.9/share/php/pear') in /xxxxx/vendor/jlevers/selling-partner-api/bin/console:3
Stack trace:
#0 {main}
thrown in /xxxxx/vendor/jlevers/selling-partner-api/bin/console on line 3
It looks like you're trying to run the command from inside this library's folder in the vendor/ directory of your project. You need to actually clone this repository, install the dependencies, and make changes there. Trying to contribute to the library from inside the vendor/ folder of your project is not going to work.
Also, without doing that, you can't run the tests, linter, etc, which means that you can't fully check that your changes are valid before you commit them. There's more details on how to contribute in the contributor guide.
I tested this myself. Merging.