rfc:inheritance_private_methods
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:inheritance_private_methods [2020/05/22 15:23] – pmmaga | rfc:inheritance_private_methods [2020/06/11 16:34] – pmmaga | ||
---|---|---|---|
Line 94: | Line 94: | ||
< | < | ||
+ | Warning: Private methods cannot be final as they are never overridden by other classes in ... | ||
A:: | A:: | ||
A:: | A:: | ||
Line 100: | Line 101: | ||
</ | </ | ||
- | The final keyword when applied to a private method should have no significance. | + | The final keyword when applied to a private method should have no significance. In most cases, a correct approach is to use '' |
- | **Open issue**: Applying final to a private | + | **NOTE:** Due to how common the usage of ''< |
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | There are no BC breaking changes. | + | The new compiler warning: |
- | **Open issue**: The construction '' | + | < |
- | A correct approach to attain a similar effect would be '' | + | Warning: Private methods cannot be final as they are never overridden by other classes |
+ | </ | ||
- | **Open issue**: If the optional compiler | + | Will start appearing in some code bases where both modifiers '' |
===== Proposed PHP Version(s) ===== | ===== Proposed PHP Version(s) ===== | ||
PHP 8.0 | PHP 8.0 | ||
- | |||
- | ===== Open Issues ===== | ||
- | |||
- | * Producing a compiler warning when '' | ||
- | * Keeping the functionality unchanged for magic methods. | ||
===== Unaffected PHP Functionality ===== | ===== Unaffected PHP Functionality ===== |
rfc/inheritance_private_methods.txt · Last modified: 2020/07/17 14:59 by pmmaga