User tests: Successful: Unsuccessful:
Routers in Joomla should be testable in the future with unittests. Right now, they heavily depend on JFactory and some not-so-nice code constructs to work. In order to introduce dependency injection, this PR hands over the application and the menu to the component routers. This means that you can inject fake application objects and menus into the router during testing. At the same time, component routers can build lookup tables once when they are instantiated and can get their input through these 2 objects.
This is backwards compatible, since additional arguments for a method/constructor are simply ignored by PHP and since we didn't have any arguments up to this point for the constructor, this has no effect so far.
In the future, the application router should get something similar in order to make the whole process testable. For the moment, the Singletons are still used.
This was made possible through the generous donation of the people mentioned in the following link via an Indiegogo campaign: http://joomlager.de/crowdfunding/5-contributors
arent you supposed to be submitting pr to staging not 3.4-dev
Since this is something that would be introduced in 3.4 and upwards and not in 3.3.x, afaik this should go into 3.4-dev. I'm wondering if I need to re-do this with a branch based on 3.4-dev...
Usually PRs are fine against staging
even if it ends up going to 3.4-dev
. We can handle this when merging.
There are a few exceptions when there are expected conflicts between those branches. In this case I wouldn't expect any.
There is a big drawback with PRs against 3.4-dev
. That is namely as soon as we release 3.4, the 3.4-dev
will be deleted. This means that all PRs against this branch will be closed automatically as well.
I have now updated the 3.4-dev
branch. So I guess you would have to rebase your branch so it goes fine. Or you just do it against staging
Status | New | ⇒ | Pending |
Happy to test but not sure how from the description?
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4714.
I think I will have to re-do this PR against a clean copy of the 3.4-dev branch. Testing would only mean to set the error-reporting to maximum, check the errors that might show up, apply the change and then see that no new errors/notices showed up.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-19 11:33:37 |
Please update the 3.4 branch with the latest changes to staging so that you can see that this is a one-line change to one file.