Showing results for 
Search instead for 
Did you mean: 

"Class string does not exists" error - only on production

"Class string does not exists" error - only on production

So here's the situation. It is PHP 7.4, Magento 2.4.3-p1

  • On the production server, an error is showing up on the exceptions.log. It reads as follows: Class string does not exist at /var/www/public/vendor/magento/framework/Webapi/ErrorProcessor.php:208, ReflectionException(code: -1): Class string does not exist at /var/www/public/vendor/magento/framework/Reflection/MethodsMap.php:166)"} []

  • I happens daily on the production server, but it does not happen on staging, dev, and worse, I cannot replicate the error on local.

  • The method gets called when loading a PLP, PDP, homepage and checkout&shipping (maybe on even more places) and cache has been cleared (locally). On prod, I assume when someone visits the page for the first time.

  • I've put a breakpoint in the method. The method seems to load a bunch of interfaces and caches them. Some of them are:





Things I have tried

  • Running the master branch, with the production database, and in production mode. Nothing happens.
  • I've added a logger to the method in question. It just shows the interface being called, and on which page.
  • Since I think this has something to do with the phpdocs, I have tried messing around with the various phpdocs on the loaded interfaces, and the classes which implement the interfaces, but no luck.

Any ideas? Cheers!


Re: "Class string does not exists" error - only on production

It is a useful tool for the Java programmer. It allows us to perform operations on strings in an easy way. The only drawback is that it does not provide us with any methods for searching, sorting or doing substring operations. I have hired to handle my all assignments. Class strings are a way to add some additional features to your strings without having to worry about inheritance.