[wp-trac] [WordPress Trac] #36335: Next generation: core autoloader proposal
WordPress Trac
noreply at wordpress.org
Mon Jun 6 14:47:22 UTC 2016
#36335: Next generation: core autoloader proposal
-----------------------------+-----------------------------
Reporter: dnaber-de | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
-----------------------------+-----------------------------
Comment (by boonebgorges):
> 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.
WordPress releases are built packages that contain files to be stored in
ABSPATH. The autoupdate and installation code do not assume that it'll be
possible to write to the directory tree outside of ABSPATH. I understand
why it's best practice to keep `vendor` outside of `src` (it's a black
box, and it's not "owned" by WordPress), and it would be OK to keep it
this way in development mode, but when building a package for release, the
files will have to be moved to inside of ABSPATH. (This is probably just
an implementation detail, and I don't want to get hung up on it. I just
want to be clear that this will likely be a requirement, and get a sense
of how we'll achieve this requirement within the context of our existing
build routines, so we can make an informed decision about what introducing
a Composer-built autoloader would entail.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36335#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list