Problem/Motivation

The file <root>/autoload.php was introduced in #2406681: Add an autoload.php in the repo root to control the autoloader of front controllers to help those using Drupal with composer to override the autoloader from the one in core. With #2380389: Use a single vendor directory in the root committed, this is no longer necessary and we can always use vendor/autoload.php.

Proposed resolution

Remove usages of <root>/autoload.php and the file itself.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because we are removing a file that is no longer needed.
Issue priority Major because it is a follow up to a major issue.
Disruption Disruptive for site builds that used the autoload.php.
CommentFileSizeAuthor
#2 remove_autoload_php-2578033-2.patch3.66 KBhussainweb

Comments

hussainweb created an issue. See original summary.

hussainweb’s picture

Status: Active » Needs review
StatusFileSize
new3.66 KB

This is basically built on top of revert of #2406681: Add an autoload.php in the repo root to control the autoloader of front controllers. There might have been more usages introduced since then. Tests shall tell us.

hussainweb’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 2: remove_autoload_php-2578033-2.patch, failed testing.

yched’s picture

The root composer.json still has a "_readme" referring to the ./vendor/autoload.php / ./autoload.php dance, this can be removed as well (yay)

davidwbarratt’s picture

Status: Needs work » Closed (works as designed)

In #2380389-24: Use a single vendor directory in the root I explained that you can put the vendor directory anywhere.

In #2380389-98: Use a single vendor directory in the root I explained that I always move the vendor directly outside of the webroot for security reasons.

Since this issue would remove a security feature, and would make it impossible for users to have the vendor directory outside of the webroot, I'm marking it as "Closed (works as designed)."

We are also following the lead of Symfony and Laravel by having a user-editable front autoloader (which they both have).

Status: Closed (works as designed) » Needs work

The last submitted patch, 2: remove_autoload_php-2578033-2.patch, failed testing.

davidwbarratt’s picture

Status: Needs work » Closed (works as designed)