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

[appserver-io/doppelgaenger] Inline Functions in Session Beans #943

Closed
wagnert opened this issue Dec 26, 2015 · 1 comment
Closed

[appserver-io/doppelgaenger] Inline Functions in Session Beans #943

wagnert opened this issue Dec 26, 2015 · 1 comment
Assignees
Labels

Comments

@wagnert
Copy link
Member

wagnert commented Dec 26, 2015

It actually seems, that inline functions in Session Beans do not work, because Doppelgaenger tries to create a DOPPELGAENGEROriginal function for that. For example, you've an inline function like

// this is necessary to load the PSR-4 compatible Swagger library
\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($className) use ($application) {
        // load the application directory
        $webappPath = $application->getWebappPath();
        ...
});

Doppelgaenger libraries generates a function like

public function ( $visitor, Tobscure\JsonApi\Document $obj, array $type)
{
    ...
}

which results in something like

[26-Dec-2015 20:33:52 Europe/Berlin] PHP Parse error:  syntax error, unexpected '(', expecting identifier (T_STRING) in /opt/appserver/var/tmp/api/cache/AppserverIo_Apps_Api_Encoder_JmsSerializerEncoder.php on line 139

If you need an example, feel free to checkout the appserver.io API implementation from my fork.

@wick-ed
Copy link
Member

wick-ed commented Jan 5, 2016

@wick-ed wick-ed closed this as completed Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants