PHPackages                             valantic-spryker/customer-storage - 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. [Database &amp; ORM](/categories/database)
4. /
5. valantic-spryker/customer-storage

ActiveLibrary[Database &amp; ORM](/categories/database)

valantic-spryker/customer-storage
=================================

Allows to publish non privacy related customer data into storage.

1.0.8(2y ago)013.5k↓28.8%proprietaryPHPPHP &gt;=8.0

Since Aug 7Pushed 2y ago5 watchersCompare

[ Source](https://github.com/valantic-CEC-Deutschland-GmbH/customer-storage)[ Packagist](https://packagist.org/packages/valantic-spryker/customer-storage)[ RSS](/packages/valantic-spryker-customer-storage/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (12)Versions (12)Used By (0)

customer-storage
================

[](#customer-storage)

[![Minimum PHP Version](https://camo.githubusercontent.com/905c670b6e3bc20026bddbc8923df4d38111e526b88f1252ac4ceb6643299d96/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e302d3838393242462e737667)](https://php.net/)

Description
===========

[](#description)

- Allows to publish non privacy related customer data into storage.

Install
=======

[](#install)

- `composer require valantic-spryker/customer-storage`
- register publisher plugins

```
    // Zed\Publisher\PublisherDependencyProvider.php
    /**
     * @return array
     */
    private function getCustomerStoragePlugins(): array
    {
        return [
            CustomerStorageConfig::PUBLISH_CUSTOMER => [
                new CustomerWritePublisherPlugin(),
                new CustomerDeletePublisherPlugin(),
                new CustomerGroupToCustomerWritePublisherPlugin(),
                new CustomerGroupToCustomerDeletePublisherPlugin(),
                new CustomerAddressWritePublisherPlugin(),
            ],
        ];
    }
```

- create customer storage queues

```
 // Client\RabbitMq\RabbitMqConfig.php
     /**
     * @return array
     */
    protected function getPublishQueueConfiguration(): array
    {
        return [
            [...]
            CustomerStorageConfig::PUBLISH_CUSTOMER,
            [...]
        ];
    }

    /**
     * @return array
     */
    protected function getSynchronizationQueueConfiguration(): array
    {
        return [
            [...]
            CustomerStorageConfig::SYNC_CUSTOMER_STORAGE,
            [...]
        ];
    }

    /**
     * @return \ArrayObject
     */
    protected function getQueueOptions(): ArrayObject
    {
        $queueOptionCollection = parent::getQueueOptions();

        $queueOptionCollection->append($this->createQueueOptionTransfer(CustomerStorageConfig::SYNC_CUSTOMER_STORAGE, CustomerStorageConfig::SYNC_CUSTOMER_STORAGE_ERROR));

        return $queueOptionCollection;
    }
```

- add processor to queue:worker command

```
    // Zed\Queue\QueueDependencyProvider.php
        /**
     * @param \Spryker\Zed\Kernel\Container $container
     *
     * @return array
     */
    protected function getProcessorMessagePlugins(Container $container): array
    {
        [...]
            CustomerStorageConfig::PUBLISH_CUSTOMER => new EventQueueMessageProcessorPlugin(),
            CustomerStorageConfig::SYNC_CUSTOMER_STORAGE => new SynchronizationStorageQueueMessageProcessorPlugin(),
        [...]
    }

```

- if you use default customer importer, ensure customer-storage publisher event is triggered

```
    // Zed\CustomerImport\Business\Model\CustomerImporterPlugin
    public function import(array $data): void
    {
        [...]
            QueueImporterPublisher::addEvent(
                CustomerStorageConfig::PUBLISH_CUSTOMER_WRITE,
                $idCustomer,
            );
        [...]
    }

```

- configure the data you like to expose

```
    // Zed\CustomerStorage\Business\Mapper\CustomerStorageMapper
    protected function getCustomerStorageData(SpyCustomerEntityTransfer $customerEntityTransfer): array
    {
        $data = [];
        $data['idCustomer'] = $customerEntityTransfer->getIdCustomer();
        $data['customerGroup'] = ($customerEntityTransfer->getSpyCustomerGroupToCustomers()->count() > 0) ? ($customerEntityTransfer->getSpyCustomerGroupToCustomers()[0]->getCustomerGroup()?->getName()) : null;
        $data['sponsorReference'] = $customerEntityTransfer->getSponsorReference();
        $data['priceGroup'] = $customerEntityTransfer->getPriceGroup();
        $data['store'] = $customerEntityTransfer->getSpyStore()?->getName();
        $data['country'] = $customerEntityTransfer->getBillingAddress()?->getCountry()?->getName();
        $data['zipCode'] = $customerEntityTransfer->getBillingAddress()?->getZipCode();

        return $data;
    }
```

- if you like to use `console publisher:trigger-events customer` -&gt; register publisher plugin

```
    // Zed\Publisher\PublisherDependencyProvider
    [...]
    new CustomerPublisherTriggerPlugin(),
    [...]
```

HowTos Cli
==========

[](#howtos-cli)

PHP Container: `docker run -it --rm --name my-running-script -v "$PWD":/data spryker/php:latest bash`

Run Tests: `codecept run --env standalone`

Fixer: `vendor/bin/phpcbf --standard=phpcs.xml --report=full src/ValanticSpryker/`

Disable opcache: `mv /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini /usr/local/etc/php/conf.d/docker-php-ext-opcache.iniold`

XDEBUG:

- `ip addr | grep '192.'`
- `$docker-php-ext-enable xdebug`
- configure phpstorm (add 127.0.0.1 phpstorm server with name valantic)
- `$PHP_IDE_CONFIG=serverName=valantic php -dxdebug.mode=debug -dxdebug.client_host=192.168.87.39 -dxdebug.start_with_request=yes ./vendor/bin/codecept run --env standalone`
- Run Tests with coverage: `XDEBUG_MODE=coverage vendor/bin/codecept run --env standalone --coverage --coverage-xml --coverage-html`

use nodejs
==========

[](#use-nodejs)

- docker run -it --rm --name my-running-script -v "$PWD":/data node:18 bash

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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 ~6 days

Recently: every ~13 days

Total

9

Last Release

963d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38a6621b395917bb33ea0dd7970ae8a6295c972e40c26b04d923a3c625abd043?d=identicon)[nxs\_schoenfeld](/maintainers/nxs_schoenfeld)

---

Top Contributors

[![nxsschoenfeld](https://avatars.githubusercontent.com/u/62562240?v=4)](https://github.com/nxsschoenfeld "nxsschoenfeld (14 commits)")[![HaukeBST](https://avatars.githubusercontent.com/u/104902456?v=4)](https://github.com/HaukeBST "HaukeBST (4 commits)")

---

Tags

sprykerspryker

### Embed Badge

![Health badge](/badges/valantic-spryker-customer-storage/health.svg)

```
[![Health](https://phpackages.com/badges/valantic-spryker-customer-storage/health.svg)](https://phpackages.com/packages/valantic-spryker-customer-storage)
```

PHPackages © 2026

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