Try to guess packages using BetterReflection.#162
Try to guess packages using BetterReflection.#162guillaume-perreal wants to merge 2 commits intomaglnet:masterfrom
Conversation
It's a simple/reliable way to get things done - if you want to avoid it, then please use an approach like https://github.com/Roave/BetterReflection/blob/14f329c5a3201ee890d3d8c4959c8779b9de7f63/src/SourceLocator/Type/Composer/Factory/MakeLocatorForComposerJson.php (usage example in https://github.com/Roave/BackwardCompatibilityCheck/blob/d1175788acc330a8a02e92267247f9734e4ca04f/src/LocateSources/LocateSourcesViaComposerJson.php) |
|
If this is about solving the problem of having to include the autoloader, then let's please go with BetterReflection, which includes abstractions to figure out where things are 👍 If this is about having a configurable autoloader path, then I'd be 👎 for it, because it adds a lot of un-needed complexity, whereas simplifying the autoload setup is less effort and less maintenance. |
|
MakeLocatorForComposerJson seems to be the right tool. I'll give it a try. Thanks for the pointer. |
2608e6f to
c889607
Compare
|
@Ocramius any comment on this ? |
0893f57 to
f0e5b75
Compare
|
Haven't had time to check most of OSS work, sorry
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
…On Sat, Nov 23, 2019 at 12:27 PM Guillaume Perréal ***@***.***> wrote:
@Ocramius <https://github.com/Ocramius> any comment on this ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#162?email_source=notifications&email_token=AABFVEGDPG3LJGA7WQ6E2D3QVEHTXA5CNFSM4JN5QEV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE7TFSI#issuecomment-557789897>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABFVEHPGWCKGX43VJZMTZLQVEHTXANCNFSM4JN5QEVQ>
.
|
f0e5b75 to
41c4e5c
Compare
Use BetterReflection. Do not work with functions nor constants. Do not support https://getcomposer.org/doc/06-config.md#vendor-dir
41c4e5c to
897486b
Compare
|
@DanielBadura since we now support In newer versions of BetterReflection, I added support for
|
|
Alright, tryin then my best over there 🚀 |
See #52.
There are still a couple of issues:* I do not like loading the project autoloader, since it automatically registers. Yet it is a cheap way to resolve symbols.* I am not satisfied with the handling of the autoloader-path configuration.Use BetterReflection to guess the source package of unknown symbols from the vendor directory.
Known limitations: