Page MenuHomePhabricator

[MEX] M2 - Spike - Alts to php-vuejs-template
Closed, ResolvedPublic

Description

goal: level of effort (approx.)

Suggestions:

  • Use v8js for SSR
  • Let PHP do the templating and use Vue.js in script tag, without .vue files

Timebox: 1 day (8 working hours) per approach

Event Timeline

hoo renamed this task from [MEX] M2 - Spike - Alts to php-vusjs-template to [MEX] M2 - Spike - Alts to php-vuejs-template.Jun 18 2025, 1:07 PM
hoo updated the task description. (Show Details)

V8JS

  • Current docker images of mediawiki don't have required binaries to install V8JS for PHP 8.1, therefore it's needed to update python and ninja versions to install it in the first place.
  • Having required binaries doesn't make it easy to install, it has a lot of dependencies and this arises security issues as @hoo mentioned before in a call.
  • Even after several attempts I wasn't able to run it smoothly with current .vue files we have
  • It needs a lot of boilerplate code and it's easier to use node which has v8 as well, it can be replace with node
  • After spending more than a day, I decided not to continue with V8JS

Hydrating PHP Template with VueJS

  • The plan was to create the HTML via PHP and hydrate it with VueJS
  • I have tried to use our existing templating classes but couldn't make it happen
  • There is too much steps to make it happen and it leads to have a lot of boilerplate code like V8JS
  • Then I've investigated current mechanism and I figured out that it needs as much effort as using current php-vuejs-templating approach and this eliminates the intended "less development effort" aim unfortunately.
  • With this approach, it's impossible to use codex Vue components, which is another downside

Finally, I think it seems like both of the above approaches doesn't have any significant advantage compared to php-vuejs-templating