Skip to content

YAML BC break caused by #25389 #25405

@Majkl578

Description

@Majkl578
Q A
Bug report? yes
Feature request? no
BC Break report? yes
Symfony version master
Broken in #25389

The PR #25389 introduced a change that now breaks Doctrine ORM's test suite.

Here's the stack trace:

Doctrine\Tests\ORM\Functional\Ticket\DDC3711Test::testEntityListeners
Symfony\Component\Yaml\Exception\ParseException: Unable to parse at line 13 (near "  preFlush: [preFlushHandler]").

/www/doctrine/doctrine2/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php:809
/www/doctrine/doctrine2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php:115
/www/doctrine/doctrine2/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php:56
/www/doctrine/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:151
/www/doctrine/doctrine2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:333
/www/doctrine/doctrine2/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:78
/www/doctrine/doctrine2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:226
/www/doctrine/doctrine2/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php:869

Here's the YAML file causing the error:

Doctrine\Tests\Models\Company\CompanyContract:
  type: entity
  table: company_contracts
  inheritanceType: SINGLE_TABLE
  discriminatorMap:
    fix: CompanyFixContract
    flexible: CompanyFlexContract
    flexultra: CompanyFlexUltraContract

  entityListeners:
    CompanyContractListener:

      preFlush: [preFlushHandler]
      postLoad: [postLoadHandler]

      postPersist: [postPersistHandler]
      prePersist: [prePersistHandler]

      postUpdate: [postUpdateHandler]
      preUpdate: [preUpdateHandler]

      postRemove: [postRemoveHandler]
      preRemove: [preRemoveHandler]

  id:
    id:
      type: integer
      generator:
        strategy: AUTO
  fields:
    completed:
      type: boolean

Sorry for not specific issue title, I have absolutely no idea what the bug is related to.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions