Menu

Twig 3.30 Broke Every Page of EC-CUBE with a 500 — Blame the Return Types Added in 3.12
📰

Twig 3.30 Broke Every Page of EC-CUBE with a 500 — Blame the Return Types Added in 3.12

DEV Community: php·sunah kim·14 days ago
#wekqOQvj
#devto#dev#twig#array#function
Reading 0:00
15s threshold

Introduction

While running composer audit on a production EC-CUBE 4.3 site, I found a security advisory against twig/twig . "Just bump it to the patched version" — so I updated Twig from the 3.8 line to 3.30 and deployed to the dev environment. Every single page returned 500.

Why does a minor update within the same 3.x line break things this badly? The cause was the return types Twig added to its abstract methods in 3.12.0. This post is a record of the investigation, the 6-line fix, and the verification.

What happened — 500s everywhere and a Fatal error

Right after the deploy, every URL returned 500.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.