PHPackages                             panakour/shopware-dal-toolkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. panakour/shopware-dal-toolkit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

panakour/shopware-dal-toolkit
=============================

Shopware Data Abstraction Layer Toolkit

v0.0.2(1y ago)14MITPHPPHP ^8.3.0CI passing

Since Jan 21Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/panakour/shopware-dal-toolkit)[ Packagist](https://packagist.org/packages/panakour/shopware-dal-toolkit)[ GitHub Sponsors](https://github.com/panakour)[ RSS](/packages/panakour-shopware-dal-toolkit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Shopware Data Abstraction Layer Toolkit
=======================================

[](#shopware-data-abstraction-layer-toolkit)

 **A fluent and type-safe toolkit for working with Shopware's Data Abstraction Layer (DAL)**

 [![GitHub Workflow Status (master)](https://github.com/panakour/shopware-dal-toolkit/actions/workflows/tests.yml/badge.svg)](https://github.com/panakour/shopware-dal-toolkit/actions) [![Total Downloads](https://camo.githubusercontent.com/4f23cd8db82f5435288d89d0f4124c40f161f509b4e7b11494e3456a9e864d23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70616e616b6f75722f73686f70776172652d64616c2d746f6f6c6b6974)](https://packagist.org/packages/panakour/shopware-dal-toolkit) [![Latest Version](https://camo.githubusercontent.com/9793854c1f360c146d316c0183ea5d38fb60f1ed411ef41528d8be8d6d670456/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70616e616b6f75722f73686f70776172652d64616c2d746f6f6c6b6974)](https://packagist.org/packages/panakour/shopware-dal-toolkit) [![License](https://camo.githubusercontent.com/7e5b7d4c2ca6d783d832f4ab2cc77c187b7b26c00081f94b3b8bd7b9f6035f0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70616e616b6f75722f73686f70776172652d64616c2d746f6f6c6b6974)](https://packagist.org/packages/panakour/shopware-dal-toolkit) [![Code Coverage Badge](./coverage-badge.svg)](./coverage-badge.svg)

---

About
-----

[](#about)

Shopware DAL Toolkit provides a clean, type-safe abstraction layer for working with Shopware Data Abstraction Layer using PHP. It simplifies common operations like entity management and media handling while maintaining strong typing and best practices.

Very useful for programmatically integrating third party systems e.g synchronize with ERP or any other system.

Key Features:

- Type-safe entity operations with proper generic types
- Simplified media handling for both URLs and base64 images
- First-or-create pattern for common entities
- Comprehensive test coverage

Installation
------------

[](#installation)

Install this package as a dependency using [Composer](https://getcomposer.org).

```
composer require panakour/shopware-dal-toolkit
```

Usage
-----

[](#usage)

### Basic Entity Operations

[](#basic-entity-operations)

```
use Panakour\ShopwareDALToolkit\Dal;

// Create or retrieve the Dal service from the container
$dal = $container->get(Dal::class);
$currency = $dal->getCurrencyByIsoCode($context, 'EUR');

// Create a tax
$taxName = 'Custom Tax 19%';
$taxRate = 19.0;
$dal->createTax($context, $taxName, $taxRate);

// Create or retrieve a category
$categoryName = 'My Custom Category';
$categoryId = $dal->firstOrCreateCategory($context, $categoryName);
echo $categoryId; // newly generated or existing ID

// Create or retrieve a manufacturer
$manufacturerName = 'My Manufacturer';
$manufacturerId = $dal->firstOrCreateManufacturer($context, $manufacturerName);
echo $manufacturerId; // newly generated or existing ID
```

### Media Handling

[](#media-handling)

```
use Panakour\ShopwareDALToolkit\MediaServiceHelper;

// Retrieve the MediaServiceHelper from the container
$mediaHelper = $container->get(MediaServiceHelper::class);

// Assign media from a list of URLs and/or base64-encoded images
$images = [
    'https://placehold.co/100x110',
    'https://placehold.co/300x300',
    'data:image/png;base64,' . base64_encode($myRawPngContents),
];
$results = $mediaHelper->assignMedia($context, $images);

// Each item in $results has a 'mediaId' key
foreach ($results as $ref) {
    echo $ref['mediaId']; // Newly created media ID
}
```

### More usage:

[](#more-usage)

- View the [Integration tests](tests/Integration)
- Look directly to the classes [Dal.php](src/Dal.php) and [MediaServiceHelper.php](src/MediaServiceHelper.php)

Requirements
------------

[](#requirements)

- PHP 8.3+
- Shopware 6.6+

### For contribution

[](#for-contribution)

🧹 Keep a modern codebase with **Pint**:

```
composer lint
```

✅ Run refactors using **Rector**

```
composer refactor
```

⚗️ Run static analysis using **PHPStan**:

```
composer test:types
```

✅ Run unit tests using **PHPUnit**

```
composer test:unit
```

🚀 Run the entire test suite:

```
composer test
```

Copyright and License
---------------------

[](#copyright-and-license)

panakour/shopware-dal-toolkit is copyright © [Panagiotis Koursaris](mailto:panakourweb@gmail.com)and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance62

Regular maintenance activity

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Total

2

Last Release

439d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6680ff78b32fb6b99cd57ea2fdc49b5d5e449c0f9991aae0a15285ccf17fc1f4?d=identicon)[panakour](/maintainers/panakour)

---

Top Contributors

[![panakour](https://avatars.githubusercontent.com/u/12927166?v=4)](https://github.com/panakour "panakour (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

phphelperspackageshopwaretools

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/panakour-shopware-dal-toolkit/health.svg)

```
[![Health](https://phpackages.com/badges/panakour-shopware-dal-toolkit/health.svg)](https://phpackages.com/packages/panakour-shopware-dal-toolkit)
```

###  Alternatives

[transprime-research/piper

PHP Pipe method execution with values from chained method executions

174.6k2](/packages/transprime-research-piper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
