I'm attempting to upgrade dependancies on a simple Laravel 5.7 application that authenticates the user via SimpleSAMLphp, then displays some information it gets from an external API.
It looks like something changed between version 4.3.8 and version 4.4.0 of the symfony/http-foundation library included with Laravel, because when I upgrade this dependency I get the following error:
ErrorException (E_NOTICE): Undefined offset: 0 …/vendor/symfony/http-foundation/HeaderBag.php 126
It looks like this is being triggered by requiring the SimpleSAMLphp service provider autoload file, even if I don't call any methods.
Since this is an extremely simple single page application, I'm just using middleware to handle the SimpleSAMLphp integration:
namespace App\Http\Middleware;
use Closure;
class SimpleSAMLphp
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
/**
* Load SimpleSAMLphp library
*/
require_once('redacted/path/simplesaml/lib/_autoload.php');
$ssphp = new \SimpleSAML\Auth\Simple('service-provider-name');
$ssphp->requireAuth();
return $next($request);
}
}
It looks like Symfony HTTP Foundation changed how they are checking for header information in this version (I see extensive changes here: https://github.com/symfony/http-foundation/compare/v4.3.8...v4.4.0), but I don't understand why it is blowing up when SimpleSAMLphp is in the mix.
I'm deep down the rabbit hole on this one - any guidance would be much appreciated!