Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@diesse
Copy link
Contributor

@diesse diesse commented Oct 2, 2019

Using a progressive counter for mapped methods/sub entries, container recompilation produces always the same result if definitions do not change.
It's not fully idempotent because changing definitions order leads to a different container, even if functionally unchanged.
Partially fixes #604

diesse added 3 commits October 2, 2019 15:35
Using a progressive counter for mapped methods/sub entries, container recompilation produces always the same result if definitions do not change.
It's not fully idempotent because changing definitions order leads to a different container, even if functionally unchanged.
@holtkamp
Copy link
Contributor

holtkamp commented Oct 2, 2019

Nice idea 😸

Copy link
Member

@mnapoli mnapoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I love this! That's really clever and simple ❤️

Would you all agree that it solves the original problem? I understand that if the definition order changes then the compiled container changes, but that's not really a problem for deployment/scaling an application.

@mnapoli
Copy link
Member

mnapoli commented Oct 21, 2019

Thanks @diesse!

Let's give this a go in a new release!

@mnapoli mnapoli merged commit a6c813b into PHP-DI:master Oct 21, 2019
@diesse diesse deleted the diesse-almost-idempotent-compiled-container branch October 21, 2019 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make CompiledContainer idempotent?

3 participants