Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantical Error #4

Open
MaykilKucin opened this issue Feb 20, 2019 · 4 comments
Open

Semantical Error #4

MaykilKucin opened this issue Feb 20, 2019 · 4 comments

Comments

@MaykilKucin
Copy link

MaykilKucin commented Feb 20, 2019

Hello Sven,

today i use your opentrans lib....
All things are working well, but when i want to serialize like in your example i get the following error:

Fatal error: Uncaught Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@jms\Serializer\Annotation\Expose" in property SE\Component\OpenTrans\Node\AbstractNode::$customEntries does not exist, or could not be auto-loaded. in C:\nginx-1.15.8\html\bmecat\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\AnnotationException.php:54 Stack trace: #0 C:\nginx-1.15.8\html\bmecat\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\DocParser.php(734): Doctrine\Common\Annotations\AnnotationException::semanticalError('The annotation ...') #1 C:\nginx-1.15.8\html\bmecat\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\DocParser.php(663): Doctrine\Common\Annotations\DocParser->Annotation() #2 C:\nginx-1.15.8\html\bmecat\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\DocParser.php(354): Doctrine\Common\Annotations\DocParser->Annotations() #3 C:\nginx-1.15.8\html\bmecat\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\AnnotationReader.php(254): Doctrine in C:\nginx-1.15.8\html\bmecat\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\AnnotationException.php on line 54

Here is the code i use:

`<?php

use \SE\Component\OpenTrans;

//$serializer = \JMS\Serializer\SerializerBuilder::create()->build();

// Pick a factory to create your document (i.e. an Order)
$loader = new OpenTrans\NodeLoader();

$factory = new OpenTrans\DocumentFactory\OrderFactory($loader);
$builder = new OpenTrans\DocumentBuilder($factory);
$builder->build(); // bootstraps the default document structure

$document = $builder->getDocument();
// ... build your document

$document->getHeader()->getOrderInfo()->setOrderId('00000000001');

$orderLine1 = new OpenTrans\Node\Order\ItemNode();
$orderLine1->setLineId('P00000001');

$document->addItem($orderLine1);
//var_dump($document);

$xml = $builder->serialize(); //-> here i get the error!!!!
`

Thank you in advance for your support.

Yours sincereley

Mika

@jkahnt
Copy link
Collaborator

jkahnt commented Feb 21, 2019

Hallo Mika,

which Composer Version do you use?

@MaykilKucin
Copy link
Author

MaykilKucin commented Feb 21, 2019 via email

@jkahnt
Copy link
Collaborator

jkahnt commented Feb 22, 2019

Hello Mika,

is it possible to upgrade your composer Version to the current build. I had the same problem and with an upgrade of composer I was able to fix it.

@MaykilKucin
Copy link
Author

MaykilKucin commented Feb 22, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants