Skip to content

Add isolated PHP highlighting with optional HTML support - #18

Merged
tannerlinsley merged 2 commits into
mainfrom
taren/php-language
Sep 11, 2026
Merged

tannerlinsley merged 2 commits into
mainfrom
taren/php-language

Conversation

@tannerlinsley

Copy link
Copy Markdown
Member

Adds a standalone PHP definition for documentation snippets and tagged PHP/HTML documents. It handles PHP tags, attributes, comments, variables, members, strings, heredocs, and nowdocs. Surrounding HTML is highlighted only when HTML is registered.

Adds language exports, fixtures, targeted regressions, a selective size profile, a PHP benchmark, documentation, and a minor changeset.

Validation: pnpm run verify passes, including 111 tests. All 334 existing documentation fixtures produce identical results. Four alternating benchmark rounds put existing highlighting at 102–104 ms before and 103–106 ms after, per 10,020 blocks.

With Node 24.15.0, PHP adds 990 gzip bytes to the all-language entry after C++/CMake, bringing it to 10,608 bytes. Core stays at 1,820 bytes, TSX at 4,033, and the docs set at 5,971. PHP alone with core is 3,564 gzip bytes. No shared engine changes or runtime dependencies.

Closes #9.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ac27dfa0-c8c1-4bb1-910d-b13a13e0f26e

📥 Commits

Reviewing files that changed from the base of the PR and between 71594ad and 7ff0aa1.

📒 Files selected for processing (19)
  • .changeset/php-language.md
  • README.md
  • docs/guides/embedded-languages.md
  • docs/guides/performance.md
  • docs/installation.md
  • docs/language-support.md
  • docs/reference/default-entry.md
  • docs/reference/languages.md
  • docs/test-strategy.md
  • scripts/bench.mjs
  • scripts/language-utils.mjs
  • scripts/measure-size.mjs
  • skills/configure-selective-highlighting/references/languages.md
  • src/index.ts
  • src/languages/index.ts
  • src/languages/php.ts
  • test/fixtures.ts
  • test/php.test.ts
  • test/real-doc-fixtures.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tannerlinsley
tannerlinsley merged commit e33572b into main Sep 11, 2026
6 checks passed
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.

[feat] php language support

1 participant