Server issue XF\Cli\Command\Development\GenerateSchemaEntity: problem with ID's with backslash

nocte

Well-known member
Affected version
2.1
When I enter php cmd.php xf-dev:generate-schema-entity Vendor\Addon:Entity to the command line, I get this error: Entity class for VendorAddon:Entity (VendorAddon\Entity\Entity) could not be created..

I added an output of $id to the beginning of the execute function and it seems that the backlash is removed form the entered addon id.

My OS is macOS.

Edit: oh, I got it, I have to escape the backslash with a backslash :D
php cmd.php xf-dev:generate-schema-entity Vendor\\Addon:Entity
 
Last edited:
Just to confirm, this is shell specific. On Linux/FreeBSD-based shells, the backslash as seen as an escape option. You don't have to use the double backslash -- you can wrap the argument in quotes too. (On Windows, you don't need to do this.)

So nothing we can really do -- the backslash isn't received by our code.
 
Top Bottom