Draft
Conversation
Benchmark ResultsComparison of Open to see the benchmark results
Generated by phpbench against commit f616bdc |
Contributor
|
Aidan's not the only one who loves the commits :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A couple of changes with this PR:
Registryclass, which keeps track of loaded discovery locations and classes. For now there's a passthrouh inFrameworkKernelto ensure backwards compatibility. Thanks to this class though, there are less dependencies betweendiscoveryandcoreComposerclass fromcoretodiscovery, totally eliminating all dependencies between the two. Everything that usesComposeralso usesDiscovery, so I think it's fine to keep it there for now (I want to avoid making another package just for the sake of it with one class)GenericContainernow implementsPsr\Container\ContainerInterface. Luckily PHP's variance checker is smart enough to allow our implementation, and it's actually compatible out of the box.Here are two examples of how discovery can be used standalone. First you require
tempest/discovery, nothing else.Then, you can for example do this:
Then here's an example with the
php-dicontainer: