Skip to content

Comments

Fix php engine bug#35

Merged
ganyicz merged 2 commits intomainfrom
filip/fix-php-engine
Feb 18, 2026
Merged

Fix php engine bug#35
ganyicz merged 2 commits intomainfrom
filip/fix-php-engine

Conversation

@ganyicz
Copy link
Collaborator

@ganyicz ganyicz commented Feb 18, 2026

The scenario

Blade crashes when using IDE Helper and running php artisan ide-helper:generate.

The problem

In viewContainsExpiredFrontMatter, we assume the resolved view engine has the getCompiler() method.

However, the IDE Helper renders a php file using the PhpEngine, which doesn't have that method.

$view->getEngine()->getCompiler();

// ❌ Call to undefined method Illuminate\View\Engines\PhpEngine::getCompiler()

This also breaks mails/notifications as Laravel also uses the php engine to render those.

The solution

Do a instanceof CompilerEngine check:

$engine = $view->getEngine();

if (! $engine instanceof CompilerEngine) {
    return false;
}

Fixes #28,#12,#11

@ganyicz ganyicz merged commit 651a595 into main Feb 18, 2026
6 checks passed
@ganyicz ganyicz deleted the filip/fix-php-engine branch February 18, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

viewContainsExpiredFrontMatter crashes with FileEngine when Sentry tracing is active

1 participant