myparcelnl / sdk
This package is designed to send and receive data from MyParcel by means of an API.
Installs: 421 271
Dependents: 6
Suggesters: 0
Security: 0
Stars: 31
Watchers: 10
Forks: 30
Open Issues: 14
Requires
- php: ^7.4 || ^8.0
Requires (Dev)
- fakerphp/faker: ^v1.16.0
- phpunit/phpunit: ^9.6.22
- psr/container: ~1.0.0
- dev-main
- 10.1.0
- 10.0.1
- 10.0.0
- 9.0.2
- 9.0.1
- 9.0.0
- 8.1.1
- 8.1.0
- 8.0.0
- 7.25.1
- 7.25.0
- 7.24.0
- 7.23.0
- 7.22.1
- 7.22.0
- 7.21.0
- 7.20.1
- 7.20.0
- 7.19.0
- 7.18.1
- 7.18.0
- 7.17.0
- 7.16.2
- 7.16.1
- 7.16.0
- 7.15.4
- 7.15.3
- 7.15.2
- 7.15.1
- 7.15.0
- 7.14.1
- 7.14.0
- 7.13.2
- 7.13.1
- 7.13.0
- 7.12.1
- 7.12.0
- 7.11.0
- 7.10.1
- 7.10.0
- 7.9.1
- 7.9.0
- 7.8.5
- 7.8.4
- 7.8.3
- 7.8.2
- 7.8.1
- 7.8.0
- 7.7.7
- 7.7.6
- 7.7.5
- 7.7.4
- 7.7.3
- 7.7.2
- 7.7.1
- 7.7.0
- 7.6.2
- 7.6.1
- 7.6.0
- 7.5.1
- 7.5.0
- 7.4.4
- 7.4.3
- 7.4.2
- 7.4.1
- 7.4.0
- 7.3.1
- 7.3.0
- 7.2.2
- 7.2.1
- 7.2.0
- 7.1.0
- 7.0.0
- 6.1.0
- v6.0.0
- v6.0.0-beta.6
- v6.0.0-beta.5
- v6.0.0-beta.4
- v6.0.0-beta.3
- v6.0.0-beta.2
- v6.0.0-beta.1
- v5.2.10
- v5.2.9
- v5.2.8
- v5.2.7
- v5.2.6
- v5.2.5
- v5.2.4
- v5.2.3
- v5.2.2
- v5.2.1
- v5.2.0
- v5.1.0
- v5.0.0
- 4.x-dev
- v4.1.0
- v4.0.0
- 3.x-dev
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.4-beta.1
- v3.1.3
- v3.1.2-beta.3
- v3.1.2-beta.2
- v3.1.2-beta.1
- v3.1.1
- v3.1.0
- v3.1.0-RC.5
- v3.1.0-RC.4
- v3.1.0-RC.3
- v3.1.0-RC.2
- v3.1.0-RC.1
- v3.0.3
- v3.0.1
- v3.0.0-beta.1
- v3.0.0-alpha.3
- v3.0.0-alpha.2
- 2.x-dev
- v2.1.5
- v2.1.4
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.1.0-beta.4
- v2.1.0-beta.3
- v2.1.0-beta.2
- v2.1.0-beta.1
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.3-beta.1
- v2.0.2
- v2.0.1-beta.1
- v1.5.1
- v1.5.0
- v1.4.1
- v1.4.0
- v1.4.0-beta.2
- v1.4.0-beta.1
- v1.3.19
- v1.3.18
- v1.3.17
- v1.3.16
- v1.3.16-beta.1
- v1.3.15
- v1.3.14
- v1.3.14-beta.1
- v1.3.13
- v1.3.12
- v1.3.11
- v1.3.10
- v1.3.9
- v1.3.8
- v1.3.7
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.2.0-beta.2
- v1.2.0-beta.1
- v1.1.10
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.2.12
- v0.2.11
- v0.2.10
- v0.2.7
- v0.2.6
- v0.2.4
- v0.2.3
- 0.2.2
- 0.1.0
- dev-feat/add-GLS-carrier
- dev-dependabot/github_actions/actions/checkout-5
- dev-dependabot/github_actions/codecov/codecov-action-5
- dev-dependabot/github_actions/peter-evans/slash-command-dispatch-4
- dev-feat/add-GLS-support-clean
- dev-feat/add-GLS-support
- dev-feat/mocking-testsuite
- dev-feat/mock-api-tests
- dev-dependabot/github_actions/myparcelnl/actions-4
- dev-feat/add-ups-pickup-locations
- dev-feat/delivery_costs_matrix_ui
- dev-feat/magento_ui_updates
- dev-fix/update-regex-be
- dev-dependabot/composer/phpunit/phpunit-tw-11.3.6
- dev-dependabot/composer/psr/container-approx-2.0.2
- dev-fix/test/prevent-error-by-upgrading-suites
- dev-feat/new-dpz-range
- dev-gh-readonly-queue/main/pr-456-8846d358addc720f33398751ea39026b7243de9f
- dev-gh-readonly-queue/main/pr-454-1ba97706e3cc4794302cb38779f8b74035bb4eee
- dev-fix/prevent-passing-unknown-carrier-id
- dev-feat/add-method-for-fetching-single-order
- dev-develop
- dev-chore/bump-sdk-in-composer
- dev-wip-shipment
- dev-refactor/customs-item
- dev-feat/add-order-web-service
- dev-fix/label-description-max-45-characters
- dev-fix/pickup-location-error
- dev-fix-pickup-location-must-have-country
- dev-fix/allow-slash-before-number-suffix
- dev-feat/add-dropoff-to-pps-order
- dev-fix-send-drop-off-point-with-order
- dev-return-consignments-test
- dev-workflow-secrets-fix
- dev-test-buildkit
- dev-MY-30722-add-region-to-recipient
- dev-friendlier-api-error-messages
This package is auto-updated.
Last update: 2025-09-12 10:50:14 UTC
README
Requirements
- PHP >=7.4
- Composer
See installation for further instructions.
Documentation
For examples, guides and in-depth information, visit the PHP SDK documentation on the MyParcel Developer Portal.
Support
For questions and support please contact us via support@myparcel.nl or chat with our developers directly on Slack.
Testing
Test Framework
This SDK uses PHPUnit with Mockery for mocking HTTP requests. All tests are completely isolated and do not make real API calls.
Running Tests
# Run all tests ./vendor/bin/phpunit # Run specific test suite ./vendor/bin/phpunit --testsuite Unit # Run with test descriptions ./vendor/bin/phpunit --testdox
Writing Tests
All 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
.
Contribute
- 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
main
branch - 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
main
to get your changes merged and published