Kirby 3.5 update: Class 'Laminas\Escaper\Escaper' not found

Hi everybody.

I just ran into a problem, that I don’t know where it comes from, but that appeared after upgrading to 3.5.

I’m in the context of a Uniform controller, where submitted values are escaped. I now find an error:

Class 'Laminas\Escaper\Escaper' not found
…/kirby/src/Toolkit/Escape.php : 87 

I thought that it was a Composer issue (I had Kirby as a submodule), but even after I ran composer install, I still have the error. NB: I’m testing on a MacOSX install of PHP 7.4.8, (compiled with ctype).

Thanks for your help or advices.

What does your folder structure in the project look like?

Quite standard, I think (like the old starterkit – I didn’t checked the new one) :

  • assets
  • content
  • kirby
  • media
  • site
    • plugins
    • controllers

But I’m not sure I understand your question. I was wondering if my problem with Escape class was coming from the git/submodule setup (or if I needed to run composer –which I’m not used to).

The Laminas class is inside /kirby/vendor, check if that folder exists. I suspected you might have an extra vendor folder in the project root, but if that is not the case.

1 Like

You got it… Thanks a lot!

I stopped my reading of the project structure at “site” folder, without noticing that I had a “vendor” just below.

I never took the time to dig into Composer way of doing things, and that’s where my mistake comes from. Thanks again.