#16764 closed enhancement (maybelater)
PHP5-port - wpdb class
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | normal | Version: | 3.1 |
Component: | Database | Keywords: | has-patch close |
Focuses: | Cc: |
Attachments (3)
Change History (10)
#1
@
14 years ago
- Milestone changed from Awaiting Review to Future Release
- Priority changed from normal to lowest
- Type changed from defect (bug) to feature request
This change is going to create a lot of unnecessary churn in the code.
The whole point to me of requiring PHP5 is not to then rewrite the whole of WordPress using a different paradigm but to be able to use PHP5 functionality more freely when adding new features or making incremental improvements.
#2
@
14 years ago
- Type changed from feature request to enhancement
I beg your pardon westi, wpdb is one of the classes that get's replaced more often. This can benefit from visiblity and interface. It's not introducing a different paradigm at least the changes suggested here were not intended to do so.
The opposite is the case, it's a try to only do minimal changes so that overall code can benefit without introducing too much new things, e.g. a factory for wpdb or similar. The ticket here is just a very lightweight refactoring suggestion.
However, you're totally right that PHP 5 is backwards comptabile with classes that do not make use of interfaces and visibility. The downside is, that you can only program against concrete classes and all methods and members are public.
Wpdb has been designed with private members in mind and thanks to PHP 5, that paradigm can now be reflected even in code and not only in documentation. That's far away from a feature request.
wpdb with interface and base class