Blacklist plugin for Sylius.


BitBag SyliusBlacklistPlugin

Slack Support

At BitBag we do believe in open source. However, we are able to do it just because of our awesome clients, who are kind enough to share some parts of our work with the community. Therefore, if you feel like there is a possibility for us to work together, feel free to reach out. You will find out more about our professional services, technologies, and contact details at

Like what we do? Want to join us? Check out our job listings on our career page. Not familiar with Symfony & Sylius yet, but still want to start with us? Join our academy!

Table of Content


This plugin allows you to integrate blacklist features with Sylius platform app.

We are here to help

This open-source plugin was developed to help the Sylius community. If you have any additional questions, would like help with installing or configuring the plugin, or need any assistance with your Sylius project - let us know!


$ composer require bitbag/blacklist-plugin

Add plugin dependencies to your config/bundles.php file:

return [

    BitBag\SyliusBlacklistPlugin\BitBagSyliusBlacklistPlugin::class => ['all' => true],

Import required config in your config/packages/_sylius.yaml file:

# config/packages/_sylius.yaml

    - { resource: "@BitBagSyliusBlacklistPlugin/Resources/config/config.yaml" }

Import routing in your config/routes.yaml file:

# config/routes.yaml

    resource: "@BitBagSyliusBlacklistPlugin/Resources/config/routing.yaml"

Add traits to your Customer entity class, when You don't use annotation.



namespace App\Entity\Customer;

use BitBag\SyliusBlacklistPlugin\Model\FraudStatusTrait;
use Sylius\Component\Core\Model\Customer as BaseCustomer;

class Customer extends BaseCustomer implements CustomerInterface
    use FraudStatusTrait;

Or this way if you use annotations:



namespace App\Entity\Customer;

use Doctrine\ORM\Mapping as ORM;
use BitBag\SyliusBlacklistPlugin\Entity\Customer\FraudStatusInterface;use BitBag\SyliusBlacklistPlugin\Model\FraudStatusTrait;
use Sylius\Component\Core\Model\Customer as BaseCustomer;

* @ORM\Entity 
* @ORM\Table(name="sylius_customer")
class Customer extends BaseCustomer implements CustomerInterface
    * @var string
    * @ORM\Column(type="string", nullable=false)
    protected $fraudStatus = FraudStatusInterface::FRAUD_STATUS_NEUTRAL;

If you don't use annotations, define new Entity mapping inside your src/Resources/config/doctrine directory.

<?xml version="1.0" encoding="UTF-8"?>

    <entity name="App\Entity\Customer\Customer" table="sylius_customer">
        <field name="fraudStatus" column="fraud_status" type="string" />

Create also interface, which is implemented by customer entity


namespace App\Entity\Customer;

use BitBag\SyliusBlacklistPlugin\Entity\Customer\FraudStatusInterface;
use Sylius\Component\Core\Model\CustomerInterface as BaseCustomerInterface;

interface CustomerInterface extends BaseCustomerInterface, FraudStatusInterface

Override Customer resource:

# config/packages/_sylius.yaml

                model: App\Entity\Customer\Customer

Override Customer grid:

# config/packages/_sylius.yaml

                    type: twig
                    label: bitbag_sylius_blacklist_plugin.ui.fraud_status
                        template: "@BitBagSyliusBlacklistPlugin/Customer/Grid/Field/fraudStatus.html.twig"
                    type: select
                    label: bitbag_sylius_blacklist_plugin.ui.fraud_status
                            bitbag_sylius_blacklist_plugin.ui.neutral: Neutral
                            bitbag_sylius_blacklist_plugin.ui.blacklisted: Blacklisted

Override Customer form template (@SyliusAdminBundle\Customer\_form.html.twig) by adding lines below

<div class="ui segment">
    <h4 class="ui dividing header">{{ 'bitbag_sylius_blacklist_plugin.ui.fraud_status'|trans }}</h4>
    {{ form_row(form.fraudStatus) }}

Update your database

$ bin/console doctrine:migrations:migrate

Note: If you are running it on production, add the -e prod flag to this command.


Available services you can decorate and forms you can extend

Run the below command to see what Symfony services are shared with this plugin:

$ bin/console debug:container | grep bitbag_sylius_blacklist_plugin


$ composer install
$ cd tests/Application
$ yarn install
$ yarn build
$ bin/console assets:install public -e test
$ bin/console doctrine:schema:create -e test
$ bin/console server:run -d public -e test
$ open http://localhost:8080
$ cd ../..
$ vendor/bin/behat
$ vendor/bin/phpspec run

About us

BitBag is a company of people who love what they do and do it right. We fulfill the eCommerce technology stack with Sylius, Shopware, Akeneo, and Pimcore for PIM, eZ Platform for CMS, and VueStorefront for PWA. Our goal is to provide real digital transformation with an agile solution that scales with the clients’ needs. Our main area of expertise includes eCommerce consulting and development for B2C, B2B, and Multi-vendor Marketplaces.
We are advisers in the first place. We start each project with a diagnosis of problems, and an analysis of the needs and goals that the client wants to achieve.
We build unforgettable, consistent digital customer journeys on top of the best technologies. Based on a detailed analysis of the goals and needs of a given organization, we create dedicated systems and applications that let businesses grow.
Our team is fluent in Polish, English, German and, French. That is why our cooperation with clients from all over the world is smooth.

Some numbers from BitBag regarding Sylius:

  • 50+ experts including consultants, UI/UX designers, Sylius trained front-end and back-end developers,
  • 120+ projects delivered on top of Sylius,
  • 25+ countries of BitBag’s customers,
  • 4+ years in the Sylius ecosystem.

Our services:

  • Business audit/Consulting in the field of strategy development,
  • Data/shop migration,
  • Headless eCommerce,
  • Personalized software development,
  • Project maintenance and long term support,
  • Technical support.

Key clients: Mollie, Guave, P24, Folkstar, i-LUNCH, Elvi Project, WestCoast Gifts.

If you need some help with Sylius development, don't be hesitated to contact us directly. You can fill the form on this site or send us an e-mail at!


For online communication, we invite you to chat with us & other users on Sylius Slack.

Demo Sylius Shop

We created a demo app with some useful use-cases of plugins! Visit to take a look at it. The admin can be accessed under link and bitbag: bitbag credentials. Plugins that we have used in the demo:

BitBag's Plugin GitHub Sylius' Store
ACL Plugin Private. Available after the purchasing.
Braintree Plugin
CMS Plugin
Elasticsearch Plugin
Mailchimp Plugin
Multisafepay Plugin
Wishlist Plugin
Sylius' Plugin GitHub Sylius' Store
Admin Order Creation Plugin
Invoicing Plugin
Refund Plugin

If you need an overview of Sylius' capabilities, schedule a consultation with our expert.

Additional resources for developers

To learn more about our contribution workflow and more, we encourage you to use the following resources:


This plugin's source code is completely free and released under the terms of the MIT license.


If you want to contact us, the best way is to fill the form on our website or send us an e-mail to with your question(s). We guarantee that we answer as soon as we can!