Skip to content

Missing PSR Container Interface causing Fatal Error #22706

@Njengah

Description

@Njengah

Please give us a description of what happened
Yoast SEO plugin fails to load due to a missing ContainerInterface file in the vendor_prefixed directory, resulting in a fatal error that breaks the WordPress site. The plugin cannot initialize its dependency injection container because the PSR Container interface is missing.

To Reproduce

Step-by-step reproduction instructions

Install/update Yoast SEO plugin
Access WordPress site (front-end or admin)
Fatal error occurs preventing site from loading

Expected results

Plugin should load without errors
WordPress site should function normally
All vendor dependencies should be present and properly autoloaded

Actual results

PHP fatal error during plugin initialization
Entire WordPress site becomes inaccessible
Error indicates missing file: vendor_prefixed/psr/container/src/ContainerInterface.php

Screenshots, screen recording, code snippet
Error Log:
PHP Warning: include(vendor/composer/../../vendor_prefixed/psr/container/src/ContainerInterface.php): Failed to open stream: No such file or directory in vendor/composer/ClassLoader.php on line 571

PHP Warning: include(): Failed opening 'vendor_prefixed/psr/container/src/ContainerInterface.php' for inclusion in vendor/composer/ClassLoader.php on line 571

PHP Fatal error: Uncaught Error: Interface "YoastSEO_Vendor\Psr\Container\ContainerInterface" not found in vendor_prefixed/symfony/dependency-injection/ContainerInterface.php:23

Stack trace:

#0 vendor/composer/ClassLoader.php(571): include()
#1 vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#2 vendor_prefixed/symfony/dependency-injection/ResettableContainerInterface.php(20): Composer\Autoload\ClassLoader->loadClass()
#3 vendor/composer/ClassLoader.php(571): include()
#4 vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#5 vendor_prefixed/symfony/dependency-injection/Container.php(38): Composer\Autoload\ClassLoader->loadClass()
#6 vendor/composer/ClassLoader.php(571): include()
#7 vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#8 src/generated/container.php(19): Composer\Autoload\ClassLoader->loadClass()
#9 src/main.php(57): require_once()
#10 lib/abstract-main.php(44): Yoast\WP\SEO\Main->get_container()
#11 src/functions.php(34): Yoast\WP\Lib\Abstract_Main->load()
#12 wp-seo-main.php(459): YoastSEO()
#13 wp-seo.php(50): require_once()

Analysis:

The autoloader cannot find the PSR Container interface that Symfony's DependencyInjection Container depends on. This appears to be an incomplete plugin installation where vendor dependencies were not properly packaged or the autoloader is misconfigured.
Technical info

If relevant, which editor is affected (or editors):

All editors (server-side error prevents site from loading)

Which browser is affected (or browsers):

All browsers (PHP fatal error occurs before any browser rendering)

Used versions

Operating system: Linux (Namecheap Shared Hosting - LiteSpeed)
PHP version: 8.3.26
WordPress version: 6.8.3
WordPress Theme: GeneratePress Child
Yoast SEO version: 26.3

Additional Context

Severity: Critical - Site completely broken
Missing file: vendor_prefixed/psr/container/src/ContainerInterface.php
Impact: Entire WordPress site inaccessible until plugin is deactivated
Possible cause: Incomplete vendor dependencies in plugin package or build process issue
Temporary workaround: Deactivate plugin via database or file system to restore site functionality

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions