WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #36335, comment 46


Ignore:
Timestamp:
06/06/2016 02:45:50 PM (4 years ago)
Author:
CoenJacobs
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36335, comment 46

    initial v1  
    77
    88Let's answer the question on '''why''' to move it to `ABSPATH` in the first place. The Composer autoloader works fine from outside the root of your files, it is actually designed to work in that way. Just loading `vendor/autoload.php` from really early on, say in `wp-load.php` would work fine. The only obstacle in the way of implementing a Composer autoloader would be mapping class names to WordPress standard file names, which is something Composer offers a way to do so by introducing a custom mapper.
     9
     10The `vendor` directory will be placed in the same directory as where the `composer.json` lives, so if we want to have that in the `src` directory, that is where the `composer.json` file should live as well, in my opinion.