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/"
        }
    }
CommentFileSizeAuthor
#3 fix-psr-4-autoloading-error-3527430-3.patch377 bytesafi13

Issue fork time_diff-3527430

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

afi13 created an issue. See original summary.

afi13’s picture

Issue summary: View changes
afi13’s picture

Assigned: afi13 » Unassigned
Status: Active » Needs review
StatusFileSize
new377 bytes
doxigo’s picture

Cool thanks, can you make a MR?

afi13’s picture

MR is opened

  • doxigo committed 09e7b82f on 1.0.x authored by afi13
    Issue #3527430 by afi13: Fix psr-4 autoloading 
    
doxigo’s picture

Status: Needs review » Fixed

Perfect, thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.