So mainly this is caused by my code structure:
File1.php
use \Class1 as Blah;
require 'File2.php';
File2.php
$closure = function ($arg) {
return new Blah($arg);
};
Somehow the part behind ... as
isn't recognized after using require()
.