Fix invalid expression compilation and migrate View engine namespace to Core\View#5
Draft
Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix critical issue with expression handling in view engine
Fix invalid expression compilation and migrate View engine namespace to Jun 3, 2026
Core\View
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The view compiler was generating invalid PHP for common expressions (e.g.
{{ title ?? "" }}compiled without$), causing runtime fatals. This PR updates expression compilation to emit valid PHP across variable, dot-notation, index, and method-call cases, while aligning the codebase namespace withCore\View.Expression compilation hardening (Compiler)
Namespace migration (
Beobles\Core\View→Core\View)Core\View.Autoload compatibility bridge
Core\View\*as primary.Beobles\Core\View\*with aliasing to reduce breakage during migration.Original prompt
🔧 Refactor Completo - View Engine para Production
Diagnóstico Final
Após análise profunda, identificamos 20 bugs críticos que impedem funcionamento. O maior problema: expressões compilam SEM
$, gerando código PHP inválido.Erro Real:
Roadmap de Correções Ordenado por Impacto
FASE 1: Fix Críticos (Bloqueadores)
1. Compiler - Expression Handling
2. Remove
class_basename()que não existe3. Lexer - Tag Extraction com Character Scanner
Replace regex approach com proper character scanning:
4. Parser - Proper Tag Matching & Nesting
Implementar tree structure para tags: