Description
Described well here: https://symfonycasts.com/screencast/api-platform/api-resource#comment-5541407296
Basically, if you pass the entity class name to make:entity
- e.g. bin/console make:entity CheeseListing
, then it does NOT ask:
Mark this class as an API Platform resource?
The problem is that, in interact()
, if the name
argument is passed, we immediately return:
maker-bundle/src/Maker/MakeEntity.php
Lines 97 to 101 in 884f10d
That should not happen. If the name
argument is passed, then:
A) We obviously should not ask for the entity name -
maker-bundle/src/Maker/MakeEntity.php
Lines 115 to 119 in 884f10d
B) We should also not ask for it here:
maker-bundle/src/Maker/MakeEntity.php
Lines 104 to 110 in 884f10d
C) But we should ask about the api-resource and broadcast:
maker-bundle/src/Maker/MakeEntity.php
Lines 121 to 143 in 884f10d
So basically, this if (
maker-bundle/src/Maker/MakeEntity.php
Lines 99 to 101 in 884f10d
return
... the first two sections should probably just be moved inside of it: maker-bundle/src/Maker/MakeEntity.php
Lines 103 to 119 in 884f10d
Cheers!