Yoast / Yoast/wordpress-seo

Missing PSR Container Interface causing Fatal Error

Open
#22,706 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Can't reproduce
Dominant language
JavaScript
Stars
2k
Forks
975
Avg merge
3d 13h
Merged PRs (30d)
36

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with vendor/composer/ClassLoader.php and the missing vendor_prefixed/psr/container/src/ContainerInterface.php, then trace the loading path through vendor_prefixed/symfony/dependency-injection/ContainerInterface.php and src/generated/container.php. Check the plugin package and autoload setup for why the PSR Container interface is absent. Done means the packaged plugin loads without the fatal error and the WordPress site remains accessible.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.