[Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_CLOSE_CURLY_BRACES
Primary tabs
Текст ошибки
[Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_CLOSE_CURLY
_BRACES, got 'signed_agreement_to_increase_payment' at position 1009 in cla
ss App\Entity\Agreement
Решение
Как и указано в префиксе ошибки - это ошибка синтаксиса. Далее следует пояснение, в каком именно месте непредвиденный текст. В моём случае, была пропущена запятая при перечислении строк в аннотациях, где она должна была быть:
/**
* @ORM\Entity()
* @ORM\Table(name="agreement")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({
* "signed_agreement_to_decrease_term" = "App\Entity\SignedAgreementToDecreaseTerm"
* "signed_agreement_to_increase_payment" = "App\Entity\SignedAgreementToIncreasePayment",
* "signed_agreement_to_increase_term" = "App\Entity\SignedAgreementToIncreaseTerm",
* "signed_agreement_to_reset_investment" = "App\Entity\SignedAgreementToResetInvestment"
* })
*/
abstract class Agreement {}Также может быть пропущена скобка, и т.п.
Источник
- https://stackoverflow.com/questions/9273299/symfony2-doctrinegenerateentities-throw-syntax-error
- Log in to post comments
- 5458 reads