Help with old plugin, target class does not exist #889
-
Hi, so I’m using a plugin from october v1 and migrate it to my winter 1.2.1 installation using PHP 8.2, the backend works without an issue, it's working fine. I have change all the namespace to use Winter\Storm however when I load in the frontend, I got this error :
and here is the code in the facade/Cart.php file
As I am not proficient in PHP, any help is appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
@hibangmike The problem here is that the What they would need to do is bind the service in the public function register()
{
App::bind('octommerce.octommerce.helper', function () {
return new \Octommerce\Octommerce\Helpers\Cart;
});
} |
Beta Was this translation helpful? Give feedback.
-
Hi @bennothommo , Appreciate the reply and also the code, I have tried to use it in the register Plugin.php and also create new plugin, but it's not working, it still got error :
I agree with what you said, the last edit to the plugin was 5 years ago and it would be plugging holes everywhere to get it to work with Winter 1.2, as it is not worth the time. Right now it is working fine with October, but it still running PHP 7.4, and we want to upgrade to use PHP 8 and migrate to Winter platform. But I think we are going to leave this project as is. I really appreciate the reply and help you give, Thank you ! |
Beta Was this translation helpful? Give feedback.
@hibangmike it's worth giving it a try, at least.
That error is simply because I didn't provide you one extra line:
Put that after the
namespace
, where the otheruse
cases are. :)