Skip to content

Commit

Permalink
Proxy generation fix (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgafka authored Oct 17, 2024
1 parent 61a96c2 commit 263e132
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/Ecotone/src/Messaging/Handler/Gateway/ProxyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,10 @@ public function generateCachedProxyFileFor(GatewayProxyReference $proxyReference
private function loadProxyClass(GatewayProxyReference $proxyReference): string
{
if (! self::isLoaded($proxyReference)) {
if ($this->serviceCacheConfiguration->shouldUseCache()) {
$file = $this->generateCachedProxyFileFor($proxyReference, false);
require $file;
} else {
$code = $this->generateProxyCode($proxyReference);
eval($code);
}
$file = $this->generateCachedProxyFileFor($proxyReference, !$this->serviceCacheConfiguration->shouldUseCache());
require $file;
}

return self::getFullClassNameFor($proxyReference);
}

Expand Down

0 comments on commit 263e132

Please sign in to comment.