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 handler hash cache.
Hello! This is another proof of concept PR
spl_object_hash()
instead ofDi::isFreshInstance()
in the Dispatcher #13853In raising this pull request, I confirm the following (please check boxes):
This PR is attempting to solve the use of
DI::wasFreshInstance
inPhalcon\Dispatcher
. I think thatDI::wasFreshInstance
should be completely removed in 4.0.x since it is only used in this one place for this hack. I'm attempting to see if a hash hit map of all handlers seen could be used instead of the use ofwasFreshInstance
.I'm attempting to understand everything that would need to be changed to get the Dispatcher to run initialize first every time as first began by @virgofx but wow is it some involved code. I'm not sure that I'm setup to change something so large at this point. So I'm starting small. This PR may never be merged or I could also grow it to be more encompassing.