Recenty I was updating some code on my Laravel app and I managed to get it working perfectly on local, no error messages whatsoever, so I decided to upload it to the test server.
When I did, this laminas-diactoros package started giving this error message:
PHP Parse error: syntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /route/to/MyProject/vendor/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.php on line 29
After some research I learned that this is because in php7.4 fn is a reserved word, so I then did composer require laminas/laminas-diactoros to see if updating the package would make it change syntax and work allright. It wont update further than 2.17 and in that version it still uses fn. I don't know what else to see or to do. I'm using laravel 6.20.44, php 7.4 and apache2. If you need any more information just ask and I'll try to answer quick, but this is literally everything I can think of that could be failing.