Follow-up to #2408371: Proxies of module interfaces don't work
Problem/Motivation
#2408371: Proxies of module interfaces don't work introduced manual building of proxies. However when / if an interface changes, the proxy could get outdated, which would result in a fatal error when the service is used.
This is especially important when a service is seldom used and no full test suite exists that test this code path.
Proposed resolution
- Add a checksum into the proxies either as an annotation or as a static class property.
- Calculate the checksum based on the dump of the reflection class (ignores comments) OR parse token result. (see e.g. symfony class map generator)
Probably using Reflection is the simplest both for the property and the checksum.
Remaining tasks
- Discuss
- Do it
User interface changes
- None
API changes
- None
Data model changes
- None
Comments
Comment #1
fabianx commentedComment #15
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #16
smustgrave commentedSince there's been no follow up and not sure still relevant going to close out. But if still valid please re-open
Thanks all