Download the PHP package saola/compiler without Composer
On this page you can find all versions of the php package saola/compiler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package compiler
saola/compiler
Trình biên dịch .sao viết bằng PHP thuần. Cài qua Composer.
Compiler PHP sinh Blade và JavaScript/TypeScript từ
.saotrong cùng một lời gọi. Builder gọivendor/bin/saoc; Artisan có thể compile bằng PHP không cần Node. Bắt đầu với quy ước.sao, types/computed. Số liệu parity chuyển đổi bên dưới là lịch sử di trú, không phải release gate hiện tại.
Lịch sử chuyển đổi compiler
Compile lại toàn bộ 56 view production bằng bin/saoc rồi so với output đã
commit (do pipeline Python cũ sinh ra):
Một file lệch là web.modules.demo.index — đúng 4 hunk, tất cả là bug đã sửa
(__STR_LIT_0__ và App.Helper.* rò vào chuỗi hiển thị, xem §7 của roadmap).
Cùng số dòng, không có khác biệt nào khác. Output đã commit là bản CŨ còn lỗi.
Trạng thái parity
Bản PHP phải khớp từng byte với compiler Python. Đã chứng minh:
Đã có gì
Support/LiteralMask.php giữ bất biến "khôi phục lớp ngoài trước lớp trong" —
nơi duy nhất biết về thứ tự, sau khi bug rò __STR_LIT_ được sửa.
Phase 1, 2 và 3 đã xong. Phase 3 đạt 8/8 module đang chạy.
Xong: ScopedStyle, ChildrenSlot, ImportParser, ImportTagResolver,
TemplateStructure, DeclarationTracker, BladeHydrateProcessor,
BladeEmitter. ReactiveWrapper (709 dòng) không port: chỉ còn một import chết,
không được khởi tạo/gọi; BladeHydrateProcessor đã thay thế nó trong pipeline.
Hạ tầng cổng blade-emit/ đã nối vào suite và đạt parity. Phạm vi thật của
Phase 3 rộng hơn con số 2.429 dòng của sao2blade/:
nó kéo theo common/declaration_tracker (718), import_tag_resolver (414),
import_parser (287), scoped_style, children_slot, template_structure —
tổng khoảng 4.500–5.000 dòng.
Vì sao có package này
Compiler cũ dùng Python được Node spawn khi build. Bản PHP mở ra: compile in-process, không cần Python3/Node ở production, và về sau là cài theme từ trang admin mà không cần redeploy.
Hai emitter hiện dùng quy tắc marker chung. Chúng vẫn có các bước xử lý riêng; contract tests và kiểm marker giữa Blade/client là cần thiết để phát hiện lệch. Không coi việc gọi compiler một lần là bằng chứng marker không thể lệch.
Chuẩn code
PSR-4 (Saola\Compiler\ → src/), PSR-12, declare(strict_types=1) mọi file,
final mặc định, không static mang trạng thái. Chi tiết:
docs/06-coding-standards.md.
Tài liệu
| Doc | Nội dung |
|---|---|
| 00-overview.md | Mục tiêu, quyết định đã chốt, câu hỏi mở |
| 01-architecture.md | Pipeline, bản đồ module, phạm vi port |
| 02-public-api.md | SaolaCompiler — API dùng chung cho Node + web |
| 03-directives.md | Cơ chế đăng ký directive |
| 04-runtime-compile.md | Compile runtime, cài theme (Phase 7) |
| 05-roadmap.md | Lộ trình, cổng parity, bẫy khi port |
| 06-coding-standards.md | Chuẩn PSR + quy ước riêng |
tests/Parity/README.md (local, ignored) |
Cách hoạt động của cổng đối chiếu chuyển đổi |
All versions of compiler with dependencies
ext-json Version *