Soft-Dependency for #2497243: Replace Symfony container with a Drupal one, stored in cache:
Problem/Motivation
Core uses once 'persistIds' and once 'form_test.form.serviceForm' as the only uppercase services (and here relies on a side-effect), but Symfony internally lower cases everything, so anything dumped will be 'persistids' and 'form_test.form.serviceform'.
(Symfony does that because it camelCase's at run time, which is bad for performance.)
Proposed resolution
Deprecate using camelCase, use "_" everywhere with lowercase in container service IDs or parameter names.
Throw an Exception in ContainerBuilder to support developers in fixing their applications.
Remaining tasks
- Patch
- Fix it
User interface changes
- None
API changes
- camelCase service IDs or parameters are no longer supported.
Beta phase evaluation
Issue category | Task because this is a performance enhancement. |
---|---|
Issue priority | Major because it is a non-Critical performance issue whose time savings have not been demonstrated. |
Prioritized changes | The main goal of this issue is performance. |
Disruption | It will be a minor disruption for contrib modules who may use uppercased names. The exception this patch throws is clear and obvious. If we do not commit this now, we will not have another chance during the 8.x cycle. |
Comment | File | Size | Author |
---|---|---|---|
#17 | only_allow_lowercase-2498293-17.patch | 5.28 KB | cilefen |
#17 | interdiff.txt | 1.66 KB | cilefen |
#17 | only_allow_lowercase-2498293-17-tests.patch | 1.4 KB | cilefen |
#13 | only_allow_lowercase-2498293-13.patch | 5.32 KB | cilefen |
#13 | interdiff.txt | 625 bytes | cilefen |
Comments
Comment #1
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedAnd a simple patch ...
Comment #3
cilefen CreditAttribution: cilefen commentedI think this is where we need a test.
Comment #6
cilefen CreditAttribution: cilefen commentedThere was another: DefaultConfigTest.schema_storage
Comment #7
dawehnerThat is odd, isn't the point that you can in HEAD access the services by upper and lowercase name.
So why not just tell people: You can't access services, with a lowercase name, in case you have supported uppercase at some point.
Having said that, I think its still a fair limitation to have just lowercase names.
Comment #10
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedWe might need some more test coverage for the other methods?
Comment #11
lauriiiComment #12
cilefen CreditAttribution: cilefen commented@Fabianx Oh, ::register()...
Comment #13
cilefen CreditAttribution: cilefen commentedComment #14
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedAnd ::set
Comment #15
cilefen CreditAttribution: cilefen commented@Fabianx ::set() is there.
Comment #16
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedShould be in its own function to isolate the test case ...
Comment #17
cilefen CreditAttribution: cilefen commentedComment #20
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedGreat work, still need a beta eval and change record. I don't have time right now, but will hopefully come back to this later again sometime this week.
Edit:
Would be RTBC - if not missing that.
Comment #21
cilefen CreditAttribution: cilefen commentedDraft CR.
Comment #22
cilefen CreditAttribution: cilefen commentedComment #23
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedLets get core committer feedback.
Comment #25
catchYes this constraint makes sense and while I don't think we can remove the complexity added upstream to support case insensitivity here at least we can ensure we're not relying on that behaviour ourselves - lets us optimize without breaking backwards compatibility later.
Committed/pushed to 8.0.x, thanks!
Comment #26
cilefen CreditAttribution: cilefen commentedThe CR is published.