rfc:remove_disable_classes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

rfc:remove_disable_classes [2023/09/29 18:25] – created girgiasrfc:remove_disable_classes [2023/10/02 21:28] (current) – Fix a few typos theodorejb
Line 10: Line 10:
 ===== Introduction ===== ===== Introduction =====
  
-The ''disable_classes'' INI setting is fundamentally useless and cause various issues in the engine, as using it will result in unexpected states for the engine to deal with.+The ''disable_classes'' INI setting is fundamentally useless and causes various issues in the engine, as using it will result in unexpected states for the engine to deal with.
  
 Only internal classes can be disabled, which brings the following observation. Only internal classes can be disabled, which brings the following observation.
Line 21: Line 21:
 And "disabling" a class from an extension without disabling said extension will, other than rendering it useless, cause various issues that the extension is not prepared to handle as they expect the classes they defined to exist. And "disabling" a class from an extension without disabling said extension will, other than rendering it useless, cause various issues that the extension is not prepared to handle as they expect the classes they defined to exist.
  
-If a hosting provided is concerned about an extension, then it should not enable it in the first place. Not break it ad hoc.+If a hosting provider is concerned about an extension, then it should not enable it in the first place. Not break it ad hoc.
  
 Considering the above, the usefulness of this feature has always been dubious. Considering the above, the usefulness of this feature has always been dubious.
Line 29: Line 29:
 What makes this setting particularly broken is that it does not unregister the class, it only overwrites the create CE handler to emit a warning and purge the properties and function hash tables. What makes this setting particularly broken is that it does not unregister the class, it only overwrites the create CE handler to emit a warning and purge the properties and function hash tables.
 This leads to various use after free, segfaults, and broken expectations for the engine and extensions which define said classes. This leads to various use after free, segfaults, and broken expectations for the engine and extensions which define said classes.
-On top of that, it is possible to actually instantiate such a class (and even classes which actually disallow this like ''ext/imap'') in userland, and pass it to function that are typed against said class without raising a TypeError.+On top of that, it is possible to actually instantiate such a class (and even classes which actually disallow this like ''ext/imap'') in userland, and pass it to functions that are typed against said class without raising a TypeError.
 However, when trying to do anything with said object, stuff is going to explode in countless ways. However, when trying to do anything with said object, stuff is going to explode in countless ways.
  
rfc/remove_disable_classes.1696011912.txt.gz · Last modified: 2023/09/29 18:25 by girgias