czcomunicacion
Forum Replies Created
-
Hi Jarno, quick follow-up to close the loop. I got it working and wanted to share exactly what fixed it, in case it helps future patches or other users hitting this.
Root of the conflict: as you suspected, another component was loading a v3translation-contractsinterface before Metricool’s. I traced it to the theme, not a plugin. The loaded interface resolves to:/wp-content/themes/pro/cornerstone/includes/integration/Twig/vendor/symfony/translation-contracts/TranslatorInterface.phpThat’s Cornerstone (the Pro theme by Themeco), which bundles
symfony/translation-contracts3.x. Because both it and Metricool ship Symfony unscoped under the globalSymfony\Contracts\Translationnamespace, the theme’s autoloader registers first and its v3 interface wins. Metricool’s bundledsymfony/translationv5.4.45 (contracts 2.5.4) then fails the signature check against that v3 interface.
Temporary workaround (on my install): the v3 interface requires the: stringreturn type on a couple of methods that Metricool’sTranslatordoesn’t declare. I editedvendor/symfony/translation/Translator.phpand added: stringto the two methods PHP complained about, in cascade:
–trans(...)(line ~197) –> added: string
–getLocale()(line ~160) –> added: string
After resetting OPcache, the OAuth sign-in connected successfully.
I understand this is a patch on my side that won’t survive a plugin update, and I’m not suggesting it as the real fix, just documenting what unblocked it. The robust solution would likely be scoping/prefixing Metricool’s bundled Symfony dependencies (e.g. via php-scoper/Mozart) so they can’t collide with another component’s copy. Flagging it in case it’s useful for a future release, since the Pro theme is fairly widely used and others may run into the same crash.Thanks for the help pinpointing the load-order angle!