Apologies for long post. I thought to describe well. :)
ZF 2.5.1 // DoctrineORMModule v0.9 // Win7 Xampp latest
I've tried two Doctrine CLI entries to reverse engineer a database using
orm:convert-mapping. I follow with orm:generate-entities.
>From ZF2 project root...
Entry 1: ./vendor/bin/doctrine-module orm:convert-mapping
--namespace="References\\Entity\\" --force --from-database annotation
./ModuleRepository/src/References/src/
With a namespace named "References", this employs double-backslash for
namespace: --namespace="References\\Entity\\" and produces incorrect entity
in classes --- namespace References\\Entity\; Trying a follow-up
orm:generate-entities with ./vendor/bin/doctrine-module
orm:generate-entities ./ModuleRepository/src/References/src/
--generate-annotations=true produces exception due to namespace syntax
error...
Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting
identifier (T_STRING) in
C:\xampp5x6x8\htdocs\bix02plan\ModuleRepository\src\References\src\References\Entity\TRefsCat.php
on line 3
If I manually correct the class's namespace I can run orm:generate-entities
successfully. However, classes then include double-backslash syntax errors
like...
/**
* Set idRefCat
*
* @param \References\\Entity\\TRefsCat $idRefCat
*
* @return TRefsSubject
*/
public function setIdRefCat(\References\\Entity\\TRefsCat $idRefCat =
null)
Entry 2: ./vendor/bin/doctrine-module orm:convert-mapping
--namespace="References\Entity\" --force --from-database annotation
./ModuleRepository/src/References/src/
Entering a namespace with single backslashes produces classes without
syntax errors and correct namespaces. Following with orm:generate-entities
command (full CLI entry as above) produces getters and setters without
double-backslash syntax errors. There's a BUT -- the orm:convert-mapping
command also produces...
Warning:
include(C:\xampp5x6x8\htdocs\bix02plan/ModuleRepository/src/References/src/References/Entity/TRefsCat.php):
failed to open stream: No such file or directory in
C:\xampp5x6x8\htdocs\bix02plan\vendor\composer\ClassLoader.php on line 412
and
Warning: include(): Failed opening
'C:\xampp5x6x8\htdocs\bix02plan/ModuleRepository/src/References/src/References/Entity/TRefsCat.php'
for inclusion (include_path='.;C:\xampp5x6x8\php\PEAR') in
C:\xampp5x6x8\htdocs\bix02plan\vendor\composer\ClassLoader.php on line 412
I understand the warnings, but not the why. Could someone kindly explain
please. Also, are there there any effects on my application I should be
aware of (I don't see exceptions in the running development application).
TIA...
Mike
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.