rfc:protectedlookup
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
rfc:protectedlookup [2008/06/03 16:09] robinf add links to tests & patch for option 2 (still being tested) |
rfc:protectedlookup [2008/06/03 16:11] robinf layout fixes |
||
---|---|---|---|
Line 177: | Line 177: | ||
Remove new rule: remove calls to zend_get_function_root_class(). | Remove new rule: remove calls to zend_get_function_root_class(). | ||
=== Patch === | === Patch === | ||
- | * [[http://thread.gmane.org/gmane.comp.php.devel/48176/focus=48179|Patch from Felipe Pena]] | + | * [[http://thread.gmane.org/gmane.comp.php.devel/48176/focus=48179|Patch from Felipe Pena]] |
- | * [[http://www.soal.org/php/protectedrfc/protected_opt1_tests.zip|Tests]] | + | * [[http://www.soal.org/php/protectedrfc/protected_opt1_tests.zip|Tests]] |
=== Pros === | === Pros === | ||
* Simple code change | * Simple code change | ||
Line 212: | Line 212: | ||
If option 1 is dismissed due to the violation of LSP, it follows that the current rules for property access, callbacks, ''clone()'' and ''destruct()'' are also violations of LSP and should be fixed. This option ensures that ''zend_get_function_root_class()'' is used consistently for all protected method checks, and implements equivalent functionality for protected property checks. | If option 1 is dismissed due to the violation of LSP, it follows that the current rules for property access, callbacks, ''clone()'' and ''destruct()'' are also violations of LSP and should be fixed. This option ensures that ''zend_get_function_root_class()'' is used consistently for all protected method checks, and implements equivalent functionality for protected property checks. | ||
=== Patch === | === Patch === | ||
- | * [[http://www.soal.org/php/protectedrfc/protected_opt2.diff|Patch]] | + | * [[http://www.soal.org/php/protectedrfc/protected_opt2.txt|Patch]] |
- | * [[http://www.soal.org/php/protectedrfc/protected_opt2_tests.zip|Tests]] | + | * [[http://www.soal.org/php/protectedrfc/protected_opt2_tests.zip|Tests]] |
=== Pros === | === Pros === | ||
* Respects the Liskov Substitution Principle. | * Respects the Liskov Substitution Principle. | ||
Line 246: | Line 246: | ||
</code> | </code> | ||
=== Patch === | === Patch === | ||
- | * Patch to do. | + | * Patch to do. |
- | * [[http://www.soal.org/php/protectedrfc/protected_opt3_tests.zip|Tests]] | + | * [[http://www.soal.org/php/protectedrfc/protected_opt3_tests.zip|Tests]] |
=== Pros === | === Pros === | ||
* Respects the Liskov Substitution Principle. | * Respects the Liskov Substitution Principle. |
rfc/protectedlookup.txt · Last modified: 2017/09/22 13:28 (external edit)