The core/scripts/switch-psr4.sh script will stay around for some more time to make the transition for contrib modules easier, but will eventually be removed.
This issue starts as "postponed", meaning that we wait a while before we remove it.

Background: What does the switch-psr4.sh do?

The script in core/scripts/switch-psr4.sh was added in #2083547: PSR-4: Putting it all together to make it easier to migrate core and contrib modules from PSR-0 to PSR-4.

Automatic PSR-0 support for module-provided class files was / will be removed in #2247287: Drop automatic PSR-0 support for modules.
Once this has landed, contrib D8 modules that still use PSR-0 will break and need to migrate to PSR-4 to work again.

Example:

php core/scripts/switch-psr4.sh modules/contrib/commerce

does all the work for the commerce module package (the module and all submodules)

php core/scripts/switch-psr4.sh modules/contrib

migrates all contrib modules at once.

Running the script more than once is ok, and has no negative effect.

Attention: Classes with underscores in the class name (after the last namespace separator) are special, and need some babysitting to migrate to PSR-4.

CommentFileSizeAuthor
#5 2277739-5.patch8.88 KBPalashvijay4O

Comments

xjm’s picture

Issue tags: +revisit before release candidate
catch’s picture

Status: Postponed » Active
Issue tags: -revisit before release candidate

Should be fine to remove now.

dawehner’s picture

Issue tags: +Novice

tagging.

Palashvijay4O’s picture

Assigned: Unassigned » Palashvijay4O
Palashvijay4O’s picture

Status: Active » Needs review
StatusFileSize
new8.88 KB

Patch .

jorgillo’s picture

Status: Needs review » Reviewed & tested by the community

The patch applies and works successfully. switch-psr4.sh is no longer in the scripts folder after applying the patch.

dawehner’s picture

Perfect

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue is a prioritized change (removal of dead code) as per https://www.drupal.org/core/beta-changes and it's benefits outweigh any disruption. Committed c5b2d48 and pushed to 8.0.x. Thanks!

  • alexpott committed c5b2d48 on 8.0.x
    Issue #2277739 by Palashvijay4O: Remove core/scripts/switch-psr4.sh
    

Status: Fixed » Closed (fixed)

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