zf2-assetic-module icon indicating copy to clipboard operation
zf2-assetic-module copied to clipboard

Laminas support

Open fabiang opened this issue 5 years ago • 2 comments

For those getting this error:

Uncaught AsseticBundle\Exception\InvalidArgumentException: no strategy defined for renderer "Laminas\View\Renderer\PhpRenderer"

put the following into your config:

<?php

use Laminas\View\Renderer;
use AsseticBundle\View;

return [
    'assetic_configuration' => [
        'rendererToStrategy' => [
            Renderer\PhpRenderer::class  => View\ViewHelperStrategy::class,
            Renderer\FeedRenderer::class => View\NoneStrategy::class,
            Renderer\JsonRenderer::class => View\NoneStrategy::class,
        ],
    ],
];

fabiang avatar Jan 27 '20 12:01 fabiang

I've forked this module here: https://github.com/fabiang/assetic-module

What we've got so far:

  • Laminas support
  • Upgrade to the new Assetic 2.0 library

Version 2.5.0 was tested with ZF3 and Laminas. Report any problems back there. Thanks!

fabiang avatar Nov 30 '20 16:11 fabiang

@fabiang Thanks for the tip above, saved a ton of time digging in the code.

Saeven avatar Apr 12 '21 20:04 Saeven