Fix psr-4 autoloading

Created on 30 May 2025, 14 days ago

Problem/Motivation

Composer throws the error during generating optimized autoload files

Class Drupal\time_diff\TwigExtension\TimeDiffTwigExtension located in ./web/modules/contrib/time_diff/src/TwigExtension/TimeDiffTwigExtension.php does not comply with psr-4 autoloading standard (rule: YourNamespace\ => ./web/modules/contrib/time_diff/src). Skipping.

Proposed resolution

I guess the issue is related to the autoload definition in composer.json. It uses wrong `YourNamespace`

"autoload": {
        "psr-4": {
            "YourNamespace\\": "src/"
        }
    }
📌 Task
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024