Currently the JsonApi is heavily used with methods forEndpoint and
forResource, these method set their respective properties, which have
no value initially. When instantiating the class, an "cannot access
before initialization" error because there's no default.
Typed property Flarum\Api\JsonApi::$endpointName must not be accessed before initialization
fix: json api instantiation fails
Currently the JsonApi is heavily used with methods
forEndpoint
andforResource
, these method set their respective properties, which have no value initially. When instantiating the class, an "cannot access before initialization" error because there's no default.