What happened
On a production EC-CUBE 4.3 site, composer audit reported 98 advisories across 29 packages (2 critical, 34 high). Not a number you can ignore, so I started with the obvious move:
composer update --dry-run
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires plugin/XXX which requires
webonyx/graphql-php ^14 ...
Dependency resolution itself failed. composer.json hadn't changed, and composer install worked fine the day before.
The cause
The culprit wasn't dependency hell — it was a security feature in Composer 2.9. Since 2.9, behavior equivalent to audit.block-insecure is on by default: versions with published security advisories are excluded from the resolver's candidates.
This interacts badly with plugin-based setups like EC-CUBE. One plugin required webonyx/graphql-php ^14, but every 14.x release has an advisory, and the fix only exists in 15.x. So within the ^14 range, there is not a single non-blocked version — and that one package makes the entire update unresolvable.
Look closely at the error output and you'll spot PKSA-... advisory IDs. That's the tell: your dependencies aren't broken, a security feature stopped you.
The fix
I gave up on a full update and targeted only the vulnerable packages. That's where I hit two more walls.
Wall #2: -W bumps Symfony to 7. Upgrading with dependencies requires -W (--with-all-dependencies), but nine Symfony components not constrained by the root composer.json (security-core / security-http / string / mime / error-handler / var-exporter / clock / property-info / security-csrf) jumped from 6.4 to 7.4. EC-CUBE 4.3 assumes Symfony 6.4, so that would have been an incident of its own.
Wall #3: platform declaration vs. reality. config.platform.php declared 8.3.14, but the server actually runs PHP 8.2.35. With that mismatch, the resolver picked a lcobucci/clock version that assumes PHP 8.3 — another failure.
The command that finally worked:
# Align the platform declaration with reality
composer config platform.php 8.2.35
# Limit the targets; pin the Symfony components that try to jump (x9)
composer update -W "symfony/*" "twig/*" "guzzlehttp/*" \
phpoffice/phpspreadsheet ... \
--with symfony/security-http:6.4.* \
--with symfony/string:6.4.* \
--dry-run
Passing temporary constraints via --with proved more reliable than the inline composer update "symfony/string:6.4.*" syntax, which depending on how you write it can be interpreted as a target selection rather than a constraint and silently do nothing.
One more operational trick: dry-run works without a vendor/ directory, so you can copy just composer.json and composer.lock into a temp directory and iterate as many times as you like without touching the production tree.
Verification
Count the dry-run output mechanically:
composer update ... --dry-run 2>&1 | grep -c 'symfony/.* => v7'
# → 1 (only symfony/phpunit-bridge; dev dependency, acceptable)
After confirming the only major bump was phpunit-bridge, I applied it for real. composer audit: 98 → 0.
Strictly speaking, three packages pinned by plugin constraints remain (webonyx/graphql-php, firebase/php-jwt, a mail-mime-parser library). Those I recorded as "accepted, waiting on plugin updates" — with the reason written down, not just left hanging.
Takeaways
- When audit counts are high, don't start with a blanket
composer update. First identify which package is blocking resolution - Scope the update, and pin the majors of anything that gets dragged along, using
--with - Make
config.platform.phpmatch the PHP version actually running
Doing these three first was faster than ten rounds of guess-and-dry-run.
And the biggest lesson: when composer update won't resolve, it may not be dependency hell — it may be a security feature doing its job. The PKSA-... codes in the error message are how you tell the difference.
Top comments (0)