- PHP >=7.4
- Composer
See installation for further instructions.
For examples, guides and in-depth information, visit the PHP SDK documentation on the MyParcel Developer Portal.
For questions and support please contact us via [email protected] or chat with our developers directly on Slack.
This SDK uses PHPUnit with Mockery for mocking HTTP requests. All tests are completely isolated and do not make real API calls.
# Run all tests
./vendor/bin/phpunit
# Run specific test suite
./vendor/bin/phpunit --testsuite Unit
# Run with test descriptions
./vendor/bin/phpunit --testdoxAll HTTP requests are automatically mocked using Mockery. When writing tests:
- Use $this->mockCurl()to get a Mockery mock instance
- Set up expectations for API calls with shouldReceive()
- Define mock responses that match real API responses
- All existing tests serve as examples of proper mocking patterns
For detailed examples, see test/Mock/EXAMPLE_UPDATE_TEST.md.
- Check for open issues or open a new issue to start a discussion around a bug or feature
- Fork the repository and branch off from the mainbranch
- Write one or more tests for the new feature or that expose the bug
- Important: Use Mockery for mocking HTTP requests (see Testing section above)
- Follow existing test patterns in the codebase
 
- Make code changes to implement the feature or fix the bug
- Ensure all tests pass: ./vendor/bin/phpunit
- Submit a pull request to mainto get your changes merged and published