Conversation
2 similar comments
| "doctrine/annotations": "1.3.*" | ||
| "doctrine/annotations": "1.3.*", | ||
| "symfony/expression-language": "3.*" | ||
| }, |
There was a problem hiding this comment.
expression-language can be put as suggested?
There was a problem hiding this comment.
If you put it as suggested you can't use @CacheExpression annotation I think.
There was a problem hiding this comment.
you can put it in both require-dev (so you can test it) and in suggests.
Who requires usage of expression should include the package explictly
| } | ||
|
|
||
| $this->expressionLanguage = new ExpressionLanguage(new FilesystemAdapter('expr_cache')); | ||
| } |
There was a problem hiding this comment.
can we convert this into service based? This way it will be easier if someone wants to use anything else here...
There was a problem hiding this comment.
Your talkin' about the new FilesystemAdapter?
There was a problem hiding this comment.
Yep, but also maybe classes that extend the base ExpressionLanguage...
| public function calculateCachePrefix() : string | ||
| { | ||
| return 'xyz'; | ||
| } |
There was a problem hiding this comment.
can we also update the readme ?
Conflicts: src/ProxyManager/CacheableClassTrait.php tests/CacheWrapperTest.php tests/Helpers/CacheableClass.php
1 similar comment
4 similar comments
4 similar comments
|
|
||
| $expressionLanguage = new \ReflectionClass($container->getDefinition($config['expression_language'])->getClass()); | ||
| if ($expressionLanguage->getName() !== ExpressionLanguage::class) { | ||
| throw new CacheException(sprintf('You must provide a valid Expression Language service')); |
There was a problem hiding this comment.
Too exact class match. You should be able to provide anything that extends expressionLanguage.
There was a problem hiding this comment.
Of course I will fix it.
| 'emag.cache.expression.language'=> (new Definition(ExpressionLanguage::class))->addArgument(new Reference('emag.cache.filesystem.adapter')), | ||
| ]); | ||
| } elseif ($config['expression_language']) { | ||
| $container->setAlias('emag.cache.expression.language', $config['expression_language']); |
There was a problem hiding this comment.
i would reverse the if. it's cheaper... :)
| protected $readerForCacheMethod; | ||
|
|
||
| protected $__expressionLanguage; | ||
|
|
There was a problem hiding this comment.
To avoid parameter collision.
|
Will take a look into it, but it requires a few changes to be included in the new version with the refactor done for v5.0 |
551b036 to
7f19c25
Compare
9bc4395 to
3ea90d7
Compare
No description provided.