You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paris should autoload when needed, rather than forced to load on every page request (as set in composer.json). This occurs because of the "files" key. See the relevant Composer documentation section for more info.
Better autoloading can be accomplished by renaming ./paris.php to (for example) ./src/Model.php, and modifying composer.json:
"autoload": {"psr-0": {"Model": "src/"}}
This simple approach assumes OrmWrapper is used only as an internal class, and not accessed directly (unless Model is loaded first).
I understand your concerns about a BC break; those not using Composer would need to change their include path. I'm not necessarily suggesting classes be broken into multiple files (and it's not clear whether a strict reading of PSR-0 requires that).
I make this suggestion no only because it is useful to me, but also because it seems to be one of the most common changes I observed when browsing the githib network graph.
Paris should autoload when needed, rather than forced to load on every page request (as set in
composer.json
). This occurs because of the"files"
key. See the relevant Composer documentation section for more info.Better autoloading can be accomplished by renaming
./paris.php
to (for example)./src/Model.php
, and modifyingcomposer.json
:This simple approach assumes
OrmWrapper
is used only as an internal class, and not accessed directly (unlessModel
is loaded first).@kevinsperrine has a forked version that can be used as an example.
Similar changes should be made to Idiom's composer.json.
The text was updated successfully, but these errors were encountered: