opencart / opencart

A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.
https://www.opencart.com/
Other
7.41k stars 4.82k forks source link

Composer update command deletes necessary dependencies OpenCart 3.0.3.6 #9166

Closed aleksandrnikitenko closed 3 years ago

aleksandrnikitenko commented 3 years ago

Tags: Opecart 3.0.3.6, Facebbok Conversion API

OpenCart 3.0.3.6 => UltraStore template

Issue: Trying to implement Facebook Conversion API. At my storage folder i have composer.json file with next contents

{ "require": { "facebook/php-business-sdk": "^9.0.0" } }

When i execute composer install commnad, i facing next:

`[conversi@uashared16 storage]$ composer install Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Package operations: 6 installs, 1 update, 17 removals **- Removing zoujingli/wechat-php-sdk (v1.3.18)

Facebook library has been installed , but also, been deleted some necessary libs.

Also, autoload don't see Facebook classes:

Class 'FacebookAds\Api' not found

AND

opencart crashes with error

Class 'Twig_Loader_Array' not found

Cured it with overwrite vendor from clean distributive, but it doesn't solve my problem.

To Reproduce Steps to reproduce the behavior:

  1. at directory "~/storage" try to execute command composer install or require (even with package name and version) with mentioned content
  2. open any site url and see error Class 'Twig_Loader_Array' not found

Expected behavior After composer install or update or require, autoload wokrs correctly and i can use API at product controller, for example.

TheCartpenter commented 3 years ago

No longer supported on the master branch. Please post on the Opencart forum at: https://forum.opencart.com for those inquiries.

prabhat-webkul commented 3 years ago

it seems you are not requiring the rest of the packages which Opencart provides. It is also not supported on the maintenance branch so post on the Opencart forum if still, you are facing issues.