mattrmiller / laravel-potion

laravel - Potion is a pure PHP asset manager for Laravel 5 based off of Assetic.
MIT License
61 stars 5 forks source link

Issue on Laravel 5 - potential deprecated call to createMatcher #9

Open mattglover11 opened 9 years ago

mattglover11 commented 9 years ago

Call to undefined method Illuminate\View\Compilers\BladeCompiler::createMatcher()

This occurs immediately after installation.

mattglover11 commented 9 years ago

In PotionServiceProvider, I have confirmed the use of the (apparently) depricated createMatcher.

Needs to be: / * If the directive method exists, we're using Laravel 5 / if (method_exists($compiler, 'directive')) { // do something } else { $pattern = $compiler->createMatcher('potion_asset_url'); }

mattglover11 commented 9 years ago

I've forked your repo so I can keep developing. Let me know if an existing dev is onto this otherwise I'll submit a PR.

mattglover11 commented 9 years ago

Guys - I've written the following code to handle the L5.1+ codebase. https://github.com/sparkeleven/laravel-potion/commit/c000e6b05eceb1a9104980563e70a82848a5b96d

I really need confirmation that I've correctly understood why you were using BladeCompiler::createMatcher in the first place as the pattern seems simple.

mattrmiller commented 9 years ago

Thank you for your contribution, if you create a patch request I can merge it.