Laravel problem in PM 3.4.11 with PhpSpreadsheet usage, works fine in PM 3.3.6
Posted: Wed Jun 24, 2020 6:51 pm
Dear All,
I am trying to migrate a few of my working processes from PM 3.3.6 to PM 3.4.11; they use PhpSpreadsheet library and are working fine on 3.3.6.
However on 3.4.11 while trying to save the file using $writer->save() as shown in below sample code; it gives the following error. I have ensured the path has write permission, for further information OS is Centos 7 and server is Nginx.
Crosschecked in config/*.php files and could not find any thing with such problem, more to that running route list did not return any routes as well
Thank in advance for your help.
Best regards
Satya
I am trying to migrate a few of my working processes from PM 3.3.6 to PM 3.4.11; they use PhpSpreadsheet library and are working fine on 3.3.6.
However on 3.4.11 while trying to save the file using $writer->save() as shown in below sample code; it gives the following error. I have ensured the path has write permission, for further information OS is Centos 7 and server is Nginx.
Code: Select all
$filename = "Test" . date('YmdHis') . ".xlsx";
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
$writer->setOffice2003Compatibility(true);
$writer->save($filename);
Fatal error: Uncaught TypeError: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in /opt/processmaker/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 62 and defined in /opt/processmaker/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:120 Stack trace: #0 /opt/processmaker/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(62): Illuminate\Routing\UrlGenerator->__construct(Object(Illuminate\Routing\RouteCollection), NULL, NULL) #1 /opt/processmaker/vendor/laravel/framework/src/Illuminate/Container/Container.php(776): Illuminate\Routing\RoutingServiceProvider->Illuminate\Routing\{closure}(Object(Illuminate\Foundation\Application), Array) #2 /opt/processmaker/vendor/laravel/framework/src/Illuminate/Container/Container.php(658): Illuminate\Container\Container->build(Object(Closure)) #3 /opt/processmaker/vendor/laravel/framework/src/Illuminate/Container/Container.php(6 in /opt/processmaker/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 120 Fatal error: Uncaught TypeError: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in /opt/processmaker/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 62 and defined in /opt/processmaker/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:120 Stack trace: #0 /opt/processmaker/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(62): Illuminate\Routing\UrlGenerator->__construct(Object(Illuminate\Routing\RouteCollection), NULL, NULL) #1 /opt/processmaker/vendor/laravel/framework/src/Illuminate/Container/Container.php(776): Illuminate\Routing\RoutingServiceProvider->Illuminate\Routing\{closure}(Object(Illuminate\Foundation\Application), Array) #2 /opt/processmaker/vendor/laravel/framework/src/Illuminate/Container/Container.php(658): Illuminate\Container\Container->build(Object(Closure)) #3 /opt/processmaker/vendor/laravel/framework/src/Illuminate/Container/Container.php(6 in /opt/processmaker/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 120While checking the error online, the common indication was to ensure, that there are no url() or asset() or other helpers functions inside your configuration files.
Crosschecked in config/*.php files and could not find any thing with such problem, more to that running route list did not return any routes as well
php artisan route:listAny suggestion will be very helpful on how to move forward.
Your application doesn't have any routes.
Thank in advance for your help.
Best regards
Satya