User tests: Successful: Unsuccessful:
For methods requiring a valid callback to be injected, use PHP 5.4's callable
typehinting to indicate this versus relying on the methods to implement checks internally (and in some cases there are no checks, making it possible to break other things if incorrect objects are injected). This improves the code structure and API by explicitly declaring requirements and allowing the PHP engine to test them.
This will introduce a new warning to the UI:
Warning: Declaration of JCacheControllerCallback::get(callable $callback, $args = Array, $id = false, $wrkarounds = false, $woptions = Array) should be compatible with JCacheController::get($id, $group = NULL)
This has always been an issue with the JCacheController
classes. JCacheController
aims to be a usable generic controller and each of the subclasses has a different signature for the get()
method. This API needs to be looked at and a way of handling the different method signatures needs to be found.
With the exception of the above mentioned warning, the CMS should continue to function as normal. Some examples of areas that would break with this patch applied:
JHtml
helper methodsJLanguage
features (some language packages are doing this with their localise classes)Docs listing B/C breaking changes should include this pull request indicating that the method signatures for the methods changed here will require updating in subclasses.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries Unit Tests |
Labels |
Added:
?
?
|
Done
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-09-18 15:54:28 |
Closed_By | ⇒ | wilsonge |
Labels |
Added:
?
|
Is it expected that travis fails here?
A train the moment all unit tests in 4.x break because of the rebuilt plugin system. Michael has an open PR to fix a lot of them!
Sorry i have not seen it. I can check it if i'm back home. I'm in the airplane from #jd16de back home now ;)
Now documented
Can you rebase please?