Skip to content

[6.x] POC PHP Web Components#19032

Draft
brianjhanson wants to merge 6 commits into
6.xfrom
feature/php-status-component
Draft

[6.x] POC PHP Web Components#19032
brianjhanson wants to merge 6 commits into
6.xfrom
feature/php-status-component

Conversation

@brianjhanson
Copy link
Copy Markdown
Contributor

Something I've been mulling over for a bit and finally put together a proof of concept today to get an idea of what it feels like.

Along with our web components we generate a Custom Elements Manifest which contains a JSON representation of the components in our system. Using that, I wanted to see how reasonable it was to generate PHP classes that would mirror the API of our web components. The goal would be to use those components instead of the various *Html methods we have around the codebase.

It turns out it's pretty feasible.

This PR sets up a proof of concept of that, mostly using Claude for the dirty work.

I'm still on the fence on if this is a good idea or not. I'm worried that the burden of maintenance will be larger than the benefit of doing something like this instead of Html::tag('craft-web-component')

@brianjhanson brianjhanson changed the title Feature/php status component [6.xF] POC PHP Web Components Jun 3, 2026
@brianjhanson brianjhanson changed the title [6.xF] POC PHP Web Components [6.x] POC PHP Web Components Jun 3, 2026
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.

1 participant