-
Notifications
You must be signed in to change notification settings - Fork 83
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
Cleanup invalidation annotation #121
Conversation
@@ -6,3 +6,4 @@ | |||
} | |||
|
|||
$autoload = require_once $file; | |||
Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($autoload, 'loadClass')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is according to the last line in the installation section of the symfony doc for the sensio bundle.
seems to make sense - but my huge wtf is why the functional test for @Tag
works without this line. the @InvalidationRoute|Path
do not work without the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really weird indeed! Glad you got the annotation tests working, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i add a note to the annotations reference
print_r($value, true) | ||
)); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing the validation early to notice problems as soon as possible
Thanks! I don’t particularly like the way expression route params look now as they take up much space. Consistency, with |
* @InvalidatePath("/posts") | ||
* @InvalidatePath("/posts/latest") | ||
* @InvalidatePath("/articles") | ||
* @InvalidatePath("/articles/latest") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed all examples to use /articles rather than /posts to avoid any confusion with the http POST method (i was confused while jumping around in the doc for a sec, so thought for somebody new to all this, its better to use this name)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one.
Okay, i think thats it. Please check the additional changes i did. Then lets merge and tag beta of component and bundle, ok? |
…notation Cleanup invalidation annotation
Looks good, thanks! |
@@ -181,6 +181,10 @@ private function addMatch(NodeBuilder $rules) | |||
->ifTrue(function ($v) {return !empty($v['additional_cacheable_status']) && !empty($v['match_response']);}) | |||
->thenInvalid('You may not set both additional_cacheable_status and match_response.') | |||
->end() | |||
->validate() | |||
->ifTrue(function ($v) {return !empty($v['match_response']) && !class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage');}) | |||
->thenInvalid('Configured a match_response but ExpressionLanugage is not available') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed in 8597598
To prepare for #117 i wrote some more functional tests. One big wtf though.
Also split the tag specific controller into a separate controller for better readability.
And make InvalidateRoute explicit about expression.