rfc:php-namespace-in-core
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:php-namespace-in-core [2020/04/15 20:37] – Use must instead of may, Changelog section, small nits girgias | rfc:php-namespace-in-core [2020/04/23 11:17] – Major rewrite girgias | ||
---|---|---|---|
Line 20: | Line 20: | ||
As these sort of symbols are tied to the engine there is no risk that they will get unbundled from PHP core and moved to PECL. We note this as we are aware that if a non core extension would use the '' | As these sort of symbols are tied to the engine there is no risk that they will get unbundled from PHP core and moved to PECL. We note this as we are aware that if a non core extension would use the '' | ||
- | ==== A small toy-example ==== | + | ==== A small concrete |
- | Currently < | + | Currently < |
- | ===== A chance to clean up poor design/ | ||
- | Currently within the Reflection extension we have the following classes '' | ||
- | |||
- | From PHP's type system perspective, | ||
- | |||
- | This RFC could allow us to redesign, with the benefit of hindsight, some of the core APIs provided by PHP. | ||
- | |||
- | Continuing from the previous example we could alias '' | ||
- | |||
- | Another infamous example would be some of the data structures provides by the SPL extension. Indeed as <php> SplQueue extends SplDoublyLinkedList</ | ||
- | |||
- | Although some of these concerns may be fixed with the introduction of the [[https:// | ||
- | |||
===== Proposal ===== | ===== Proposal ===== | ||
New features or symbols which are tightly coupled to the internals/ | New features or symbols which are tightly coupled to the internals/ | ||
Line 45: | Line 32: | ||
PHP 8.0. | PHP 8.0. | ||
+ | ===== Open Issues ===== | ||
+ | W.I.P. SPL Interfaces such as Countable, ArrayAccess, | ||
+ | |||
+ | ===== Future scope ===== | ||
+ | Providing new core APIs building on new features introduces in PHP, such as: | ||
+ | |||
+ | * I/O API using exceptions instead of warnings in case of failure | ||
+ | * New data structures to replace SPL data structures, see Appendix for reasons why | ||
+ | |||
+ | Or revamping current ones: | ||
+ | | ||
+ | * Reflection, see Appendix for a use case | ||
+ | |||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
The vote is a straight Yes/No vote requiring a 2/3 majority to accept the RFC. | The vote is a straight Yes/No vote requiring a 2/3 majority to accept the RFC. | ||
Line 55: | Line 55: | ||
1.1.0: New features must use the PHP engine, before this was merely a suggestion \\ | 1.1.0: New features must use the PHP engine, before this was merely a suggestion \\ | ||
+ | ===== Appendix ===== | ||
+ | ==== SPL Data Structures ==== | ||
+ | An infamous example is that <php> SplQueue extends SplDoublyLinkedList</ | ||
+ | |||
+ | Therefore, if a user decides to use these methods instead of the designated < | ||
+ | |||
+ | ==== Reflection ==== | ||
+ | Currently within the Reflection extension we have the following classes '' | ||
+ | |||
+ | From PHP's type system perspective, | ||
+ | Thus, in a revamped Reflection extension one could imagine a more accurate '' |
rfc/php-namespace-in-core.txt · Last modified: 2020/06/04 11:51 by brzuchal