# dhlparcel/magento2-plugin

> DHL Parcel plugin for Magento 2

`composer require dhlparcel/magento2-plugin`

Canonical URL: https://packagento.com/dhlparcel/magento2-plugin

## At a glance

- **Vendor**: dhlparcel (https://packagento.com/dhlparcel.md)
- **Latest version**: 1.0.53 — released 2026-03-13
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/dhlparcel/magento2-plugin and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require dhlparcel/magento2-plugin:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

DHL Parcel plugin for Magento 2

## README

---------------------------
DHL offers a convenient plug-in for Magento 2 online stores. This plug-in allows you to add multiple online delivery options and to print shipping labels directly in your online store, which makes shipping packages significantly easier and a lot more fun. Please note that this plug-in is only available for online stores that ship orders from the Benelux region.

## Install / Update
### Update instructions
- If you've installed a previous version with zip extraction, please remove the files found in `app/code/DHLParcel/Shipping` and proceed with the installation instructions (can be either composer or zip extraction).

- If you're installed a previous version with composer with the recommended version range, just run the following commands to complete the update  
  `composer update dhlparcel/magento2-plugin:~1.0.0`  
  `php bin/magento setup:upgrade`  
  `php bin/magento setup:di:compile (only for production environments)`

### Installation with composer
- Add the plugin to your composer with the command (recommended version range)  
  `composer require dhlparcel/magento2-plugin:~1.0.0`

- Enable the DHL module by executing the following from the Magento root:  
  `php bin/magento module:enable DHLParcel_Shipping`

- Upgrade the database  
  `php bin/magento setup:upgrade`

- When running in production, complete the installation by recompiling  
  `php bin/magento setup:di:compile`

### Installation with zip extraction
- Go to the Magento 2 directory

- Extract the contents of the `magento2.zip` file in a new directory: `app/code/DHLParcel/Shipping`  
  (If you're upgrading, remove the old files first)

- De plugin uses de Guzzle package to communicate with the API. Add Guzzle to the Magento root `composer.json`.  
  `composer require guzzlehttp/guzzle`

- De plugin uses fpdi-fpdf for merging pdf's. Add fpdi-fpdf to the Magento root `composer.json`.  
  `composer require setasign/fpdi-fpdf`

- Enable the DHL module by executing the following from the Magento root:  
  `php bin/magento module:enable DHLParcel_Shipping`

- Upgrade the database  
  `php bin/magento setup:upgrade`

- When running in production, complete the installation by recompiling  
  `php bin/magento setup:di:compile`

### When updating with zip with a version before 1.0.10 to current

- De plugin uses fpdi-fpdf for merging pdf's. Add fpdi-fpdf to the Magento root `composer.json`.  
  `composer require setasign/fpdi-fpdf`

## Recent Versions

| Version | Released |
|---|---|
| 1.0.53 | 2026-03-13 |
| 1.0.52 | 2026-01-21 |
| 1.0.51 | 2025-06-24 |
| 1.0.50 | 2025-02-18 |
| 1.0.49 | 2024-07-19 |
| 1.0.47 | 2024-05-28 |
| 1.0.46 | 2024-02-26 |
| 1.0.45 | 2024-02-19 |
| 1.0.44 | 2024-01-12 |
| 1.0.43 | 2023-08-29 |

Showing 10 of 49 versions. Full release history on https://packagento.com/dhlparcel/magento2-plugin.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| ext-json | * |
| guzzlehttp/guzzle | ^6.0 \|\| ^7.0 |
| setasign/fpdi-fpdf | ^2.0 |

## Quality

Latest release (1.0.53) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | 1 | – |
| 2.4.9 | – | – | 1 | 1 |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 787 | 54 errors, 733 warnings (ruleset: Magento2) — 67 auto-fixable with phpcbf |
| PHPMD | Warning | 89 | 89 rule violations (CyclomaticComplexity:21, NPathComplexity:19, MissingImport:9, ExcessiveClassComplexity:8, UnusedFormalParameter:8) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 21 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Warning | 1 | valid with 1 warning (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 154 | 154 | – | – |
| 2.4.8 | – | 155 | 157 | – |
| 2.4.9 | – | – | 152 | 153 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["dhlparcel/magento2-plugin"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

dhlparcel is a Magento 2 vendor on Packagento. See https://packagento.com/dhlparcel.md for their full catalogue.

