public function getCompilerPasses(): array
    {
        $mappingBagProvider = $this->getMappingBagProvider();

        return $mappingBagProvider instanceof MappingBagProvider
            ? array_merge(
                parent::getCompilerPasses(),
                [new MappingCompilerPass($mappingBagProvider)]
            )
            : parent::getCompilerPasses();
    }