-1

I'm working on implement API Services in Symfony 5. I installed friendsofsymfony via composer. Now I receive this message:

"Argument 1 passed to Doctrine\ORM\Mapping\Index::__construct() must be of the type array or null, string given, called in /home/jluishg/progra/symfony/scgadm/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 971"

Any suggestion? Thx in advance for your help.

jluishg
  • 1
  • 1

1 Answers1

0

Solved: the problem was in entity files. In the index annotations I define some index attributes. Before install FOSREST bunddle the sintax was this

@ORM\Index(name="id_cto", columns="id_cto") -- without "{" , "}"

After install FOSREST bunddle the error message reported appears.

The solution is the use of array format in index attributes

@ORM\Index(name="id_cto", columns={"id_cto"}) -- with "{" , "}"

Thx

jluishg
  • 1
  • 1