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

Call to undefined function app() #9

Closed strarsis closed 6 years ago

strarsis commented 7 years ago

I required latest blade-svg-sage as theme composer package dependency. However, I get an error on the pages where @icon is used:

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined function app() in /srv/www/web/app/themes/the-theme/vendor/nothingworks/blade-svg/src/helpers.php on line 15

How can I help with/further debug this?

Log1x commented 7 years ago

Hmm, you sure you're on dev-master? It should be doing \BladeSvgSage\svg_image() when doing @icon, not App\svg_image().

strarsis commented 7 years ago

@Log1x: I switched to 'dev-master' and ran composer update but still the same error occurs.

strarsis commented 7 years ago

@Log1x: How can I further debug / help with this? Currently I either have the bug with missing image in production build - or the fatal error.

strarsis commented 7 years ago

@Log1x: On a fresh theme the fatal error went away. However, the SVG cannot be found, the hash is not resolved.

Composer:

"log1x/blade-svg-sage": "1.0.5"

I cannot find any code in latest log1x/blade-svg-sage (1.0.5) that resolves the file name to a hashed file name for production.

strarsis commented 7 years ago

@Log1x: Can I help fixing this issue?

strarsis commented 6 years ago

This seems to work now.