Log1x / blade-svg-sage

A simple package to add support for Blade SVG by Adam Wathan to Roots Sage.
MIT License
73 stars 13 forks source link

Namespace Issue? #19

Closed tylerwiegand closed 5 years ago

tylerwiegand commented 5 years ago

Roots project, Sage theme, get this error when I install and cant load any pages

Fatal error: Uncaught Error: Call to undefined function BladeSvgSage\add_action() in project/vendor/log1x/blade-svg-sage/src/BladeSvgSage.php:134

I experimented a bit, but found that by simply taking the "Initialize BladeSvgSage" section at the end of BladeSvgSage.php and moving it to app/setup.php I was able to use the package without issue. Strange. I'd really like this to be version controlled though -- did I do the install wrong or something?

Using roots, so i just did composer require log1x/blade-svg-sage not sure what coulda gone wrong exactly. Anyways, hope I can get it in version control, I love this stuff for my laravel projects.

Log1x commented 5 years ago

Will fix momentarily. Just an edge-case where it's loading before WordPress. Needs wrapped in a function_exists() conditional.

Log1x commented 5 years ago

Fixed in v2.0.2