Just learned about this entry in the magento coding standards: https://developer.adobe.com/commerce/php/coding-standards/technical-guidelines/#14-events .
All values (including objects) passed to an event MUST NOT be modified in the event observer. Instead, plugins SHOULD BE used for modifying the input or output of a function.
Which seemed intresting to me as I do that somewhat frequently.
So I checked the core code and just about every observer that observes sales_model_service_quote_submit_before seems to modify the quote, order or both of the objects given to the observer.
It names plugins as the intended way to modify that data, but plugins only execute at the start or end of a method. While observers are usually placed at relevant parts somewhere in the middle of methods, so the scope of things that can be accessed or modified seems very different.
Is there any good way to go about this? Am I just misunderstanding what its trying to tell me? Or is this rule simply ignored everywhere?