- Issue created by @kim.pepper
- Merge request !12613[#3534092] Deprecate file_system_settings_submit() β (Open) created by kim.pepper
- πΊπΈUnited States nicxvan
https://www.drupal.org/project/drupal/issues/3514161 π Better document how form submit callbacks should be called Active
Here are some details, I'll try to connect with berdir and build a list of best practices.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Interesting. I'm not sure how autowired classes will work when using a classname. I was sure they were for static methods, but lets see what the tests say.
- πΊπΈUnited States nicxvan
I'm beginning to wonder if these belong in a helper class as a static callback.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I changed this to a static method, but seems strange to me that a submit handler must be static.
- πΊπΈUnited States nicxvan
To be clear the concern I think berdir raises is memory usage, not whether it works.
The way you had it will work, but the whole object is stored.
- πΊπΈUnited States nicxvan
One final suggestion.
I think you're good to self rtbc once that is in I was about to when I noticed it was method not function.
I think the deprecation is a courtesy, it's a submit callback.
Versions are right.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Applied suggestion and self-RTBC as per #10