After upgrading a Laravel project to PHP8 I'm getting this error pretty often:
Passing an $environment into the "League\CommonMark\CommonMarkConverter" constructor is deprecated in 1.6 and will not be supported in 2.0; use MarkdownConverter instead
The stack trace shows it's triggered by this line in a cached view file:
<?php echo e(Illuminate\Mail\Markdown::parse($slot)); ?>
I have deleted all cached views multiple times (I thought that there were maybe some old cached ones in there) but that didn't solve it.
Not sure if this should be an error that's reported as it might be the case that this is fixed in the Laravel framework, but before upgrading to PHP8 I never had this error so I think it's related to that.