/pdk

MyParcel Plugin Development Kit

Primary LanguagePHPMIT LicenseMIT

MyParcel Plugin Development Kit

Latest version Packagist Downloads Codacy grade Code coverage PHPStan License Chat with us

The MyParcel PDK (Plugin Development Kit) is meant for developing entire plugins on PHP E-Commerce platforms. If you're just looking to connect to our API without creating an entire plugin, you should check out our php SDK.

Requirements

  • PHP >=7.1
  • Composer

Documentation

For examples, guides and in-depth information, visit our Plugin Development Kit (PDK) documentation.

Support

Create an issue or contact us via our Developer Portal contact page.

Contributing

View our contribution guidelines for information on how to contribute to the PDK.

Prerequisites

  • Node 18
  • Yarn
  • Docker

Installation

Create .env:

cp .env.template .env

Install Yarn dependencies:

yarn

Install Composer dependencies:

docker compose up php

Running tests

Run all tests:

docker compose run php composer test

Linting

We use Prettier to format .json, .yml, .md and .html files.

Make sure Prettier is enabled in your IDE and runs on the following files:

{**/*,*}.{md,html,yml,json}

Set up Git hooks to run Prettier on each commit, correcting any formatting issues.

yarn prepare

You can also run Prettier manually:

# Check formatting issues
yarn lint

# Fix formatting issues
yarn lint:fix