Skip to content

Instantly share code, notes, and snippets.

View igormukhingmailcom's full-sized avatar

Igor Mukhin igormukhingmailcom

  • Odesa, Ukraine
  • 06:50 (UTC +03:00)
View GitHub Profile
igormukhingmailcom / PriceAwareProductFixtureTrait.php
Last active July 8, 2020 12:43
Enable ability to specify Product's price/originalPrice at Sylius fixtures
namespace App\Fixture;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
trait PriceAwareProductFixtureTrait
igormukhingmailcom /
Last active February 6, 2024 08:25
Symfony/Sylius stupid issues that hard to debug and which may waste too many hours

Symfony/Sylius stupid issues that hard to debug and which may waste too many hours

1. [Doctrine\Common\Persistence\Mapping\MappingException] Class 'Your\SyliusPlugin\Entity\YourEntity' does not exist

When your plugin is AbstractResourceBundle and all your entities should be and actually placed at Model directory, you have that exception (notice ...\Entity\... at exception rather than ..\Model\...) for your Your\SyliusPlugin\Model\YourEntity.php that is weird.

This happens when you accidentally have your mapping file at src/Resources/config/doctrine/YourEntity.orm.xml (without ../model/.. part) rather than src/Resources/config/doctrine/model/YourEntity.orm.xml.

This issue may happen when you convert some of your application code (which use Entity directory) to plugin (which use Model directory).

# config/serializer/hateoas/AbstractSegmentedRepresentation.yml
exclusion_policy: ALL
expose: false
expose: true
groups: [ Default, Hateoas ]
expose: true
igormukhingmailcom /
Last active March 28, 2019 07:22
Sometime we can face some weird issue and spend a lot of time to find why it happen. Here I will be collecting some issues and reasons why they happening.
  • Fixture with name ""your_cusom_fixture"" is already registered.
    • Reason: Your fixture service registers twice (as app.fixture.bla by you and as App\Fixture\BlaFixture by DI autoconfigure)
    • Solutions:
      • Exclude fixtures folder from DI autoconfigure
      • Make your fixture comatible with DI autocomfigure
    • How that was found: Dumped $taggedServices at vendor/sylius/fixtures-bundle/src/DependencyInjection/Compiler/FixtureRegistryPass.php
igormukhingmailcom /
Created September 28, 2015 14:36

Keybase proof

I hereby claim:

  • I am igormukhingmailcom on github.
  • I am igormukhin ( on keybase.
  • I have a public key whose fingerprint is 5F5A 5E52 6A5E F02E 77A1 8419 241F CD97 41E5 A625

To claim this, I am signing this object:

igormukhingmailcom /
Created May 16, 2015 20:09
Symfony2 configuration for file uploads & cropping at EasyAdminBundle with JbFileUploaderBundle for multiple entities
# ^^^ YAML documents must begin with the document separator "---"
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.