laracasts / matryoshka

Russian Doll Caching in Laravel
https://laracasts.com/series/russian-doll-caching-in-laravel
MIT License
238 stars 38 forks source link

Fixes "Unexpected X" error in 5.3 #9

Open psaunders opened 8 years ago

psaunders commented 8 years ago

In prior versions of Laravel, when registering custom Blade directives using the directive method, the $expression passed to your directive callback contained the outer-most parenthesis. In Laravel 5.3, these outer-most parenthesis are not included in the expression passed to your directive callback.

laracasts commented 8 years ago

But this now means that 5.3 is the minimum requirement, right?

psaunders commented 8 years ago

Yes. It'd have to be a new tag/version. Alternatively the readme could be amended to have an aside for 5.3

 "If >= 5.3 @cache(($thing))" 

Or there could be a parenthesis/version check in MatryoshkaServiceProvider. I'll leave it to you, let me know if you want one of those in the PR.

This has been a handy package BTW.

willvincent commented 7 years ago

Fixed to add support to 5.3, without removing support for 5.2 in PR #11