Open aleemb opened 5 months ago
You mention outside Laravel but it looks like you are still using Illuminate components.
Can you share bit more of the stacktrace so we know what Former code specifically catches this?
I doubt this has anything to do with the PHP version though, would assume this behaves the same on every PHP version and if this works on other versions it's because other dependency versions have changes.
(new issue since #611 is stale)
Former is broken on PHP8+ standalone installs and throws the error:
I found the quick fix is as follows, however, I am not familiar with the framework to do this proper. The fix that works for me is inside FormerServicesProvider.php I add the following in bindCoreClasses under the Core Classes comment:
Trying
$app->bindIf('routing', \Illuminate\Routing\RouteCollection::class);
didn't work, however.Hope this can be fixed in the repo so Former can once again be used outside of Laravel (when using PHP8+). This is the only thing preventing that use-case right now for anyone using it outside of Laravel, myself included.