bmlt-enabled / bmlt-root-server

This is the Main Root Server Repo for the Basic Meeting List Toolbox
MIT License
13 stars 14 forks source link

Legacy: Install phpoffice/phpspreadsheet, make sure the NAWS import code still works. #487

Closed jbraswell closed 2 years ago

pjaudiomv commented 2 years ago

ref https://github.com/bmlt-enabled/bmlt-root-server/pull/523

pjaudiomv commented 2 years ago

PHPSpreadsheet the lib BMLT 2.x is using has dependency issues with laravel 9 see https://github.com/PHPOffice/PhpSpreadsheet/issues/2790 in regards to simple-cache. Laravel 9 uses simple-cache 3.x and PHPOffice only supports 2.x.

We would have to either downgrade simple-cache to 2.x (prob dont want to do)

composer require psr/simple-cache ^2.0
composer require phpoffice/phpspreadsheet

or move to a lib thats friendlier with laravel

https://github.com/SpartnerNL/Laravel-Excel

https://laravel-excel.com/

https://packagist.org/packages/maatwebsite/excel

pjaudiomv commented 2 years ago

it actually seems laravel-excel wants you to downgrade simple-cache as well https://docs.laravel-excel.com/3.1/getting-started/installation.html#installation-2

pjaudiomv commented 2 years ago

Laravel 9 requirements are "psr/simple-cache": "^1.0|^2.0|^3.0".

pjaudiomv commented 2 years ago

php office is installed but some bugs to work out on world id update

[2022-09-01 21:26:02] production.ERROR: Undefined variable $userServiceBodyIDs (View: /var/www/html/main_server/resources/views/legacy.blade.php) {"exception":"[object] (Illuminate\\View\\ViewException(code: 0): Undefined variable $userServiceBodyIDs (View: /var/www/html/main_server/resources/views/legacy.blade.php) at /var/www/html/main_server/legacy/local_server/server_admin/c_comdef_admin_ajax_handler.class.php:303)

on meeting import

[previous exception] [object] (ErrorException(code: 0): Undefined variable $userServiceBodyIDs at /var/www/html/main_server/legacy/local_server/server_admin/c_comdef_admin_ajax_handler.class.php:303)
[stacktrace]
#0 /var/www/html/main_server/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(259): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#1 /var/www/html/main_server/legacy/local_server/server_admin/c_comdef_admin_ajax_handler.class.php(303): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}()
Screen Shot 2022-09-01 at 5 29 30 PM

I testd with BMLT_Argentina.xlsx