Uh oh!
There was an error while loading. Please reload this page.
Conversation
Issued by Coverage Checker: |
| public function generate(\ReflectionClass $originalClass, ClassGenerator $classGenerator, array $proxyOptions = []) | ||
| { | ||
| if (!\array_key_exists('methods', $proxyOptions)) { | ||
| throw new \InvalidArgumentException(sprintf('Generator %s needs a methods proxyOptions', __CLASS__)); |
There was a problem hiding this comment.
| thrownew \InvalidArgumentException(sprintf('Generator %s needs a methods proxyOptions', __CLASS__)); | |
| thrownew \InvalidArgumentException(sprintf('Generator %s needs a property "methods" in proxyOptions', __CLASS__)); |
also I'm not sure what you meant with this errors, that the array proxyOptions must have a key 'methods' in it or if the key 'methods' doesn't exist in the array, the Generator class that extends this one must have a method "getProxyOptions()" or something similare ?
There was a problem hiding this comment.
proxyOptions must have a "methods" key
| $factoryDefinition->setTags($definition->getTags()); | ||
| if ($definition->getFactory() !== null) { | ||
| $this->compiler->log($this, "Service {$taggedServiceName} is not compatible with service proxy"); |
| { | ||
| foreach ($this->proxies as $proxy) { | ||
| if ($proxy instanceof LazyLoadingInterface && !$proxy->isProxyInitialized()) { | ||
| $proxy->initializeProxy(); |
There was a problem hiding this comment.
What is LazyLoadingInterface doesn't exist
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| { | ||
| $instanceRef = new \ReflectionObject($object); | ||
| $methods = $instanceRef->getMethods(\ReflectionMethod::IS_PUBLIC); | ||
| $instanceRef = new \ReflectionClass($class); |
There was a problem hiding this comment.
although scanning all methods of a class permits us to throw errors on decorated private methods, the cost of loading annotation for each method maybe high in dev env
a1e73ed to
48b6ea4Compare
Time to open this PR.
Main change: remove the value holder proxy to create an extended class with the interceptor.
This fix some bug and limitation and add another bunch of limitation.
Removed limitations:
New limitations:
Also this PR add a few errors when an impossible operation is asked and add a cache warmer to generate proxies.
I kept the term proxy but is not a proxy anymore ;-)