? Pending

User tests: Successful: Unsuccessful:

avatar KarstenFrostholm
KarstenFrostholm
26 Dec 2017

From deprecated.php
This "Functions that are deleted when switching to version 4.0". Repeated many times.

Joomla\CMS\Layout\FileLayout::setLayout() is deprecated, use FileLayout::setLayoutId() instead.
Joomla\CMS\Layout\FileLayout::refreshIncludePaths() is deprecated, use FileLayout::clearIncludePaths() instead.

Pull Request for Issue # .

Summary of Changes

Now using the recommended methods

Testing Instructions

With a fresh 3.8.3 enabled log deprecated API logging
switch to site once
check log in administrator/logs/deprecated.php
Install patch

switch to site once
check log in administrator/logs/deprecated.php

Expected result

No log entry from this file

Actual result

2017-12-26T08:15:40+00:00 WARNING ::1 deprecated Joomla\CMS\Layout\FileLayout::setLayout() is deprecated, use FileLayout::setLayoutId() instead.
2017-12-26T08:15:40+00:00 WARNING ::1 deprecated Joomla\CMS\Layout\FileLayout::refreshIncludePaths() is deprecated, use FileLayout::clearIncludePaths() instead.
2017-12-26T08:15:40+00:00 WARNING ::1 deprecated Joomla\CMS\Layout\FileLayout::refreshIncludePaths() is deprecated, use FileLayout::clearIncludePaths() instead.

Documentation Changes Required

No

avatar KarstenFrostholm KarstenFrostholm - open - 26 Dec 2017
avatar KarstenFrostholm KarstenFrostholm - change - 26 Dec 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Dec 2017
Category Libraries
avatar Quy Quy - test_item - 26 Dec 2017 - Tested successfully
avatar Quy
Quy - comment - 26 Dec 2017

I have tested this item successfully on 7692228


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19179.

avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Dec 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 27 Dec 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Dec 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 27 Dec 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Dec 2017

Updated Layout of first Comment (Summary of Changes, …) so easier to read.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19179.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 27 Dec 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Dec 2017

I have tested this item successfully on 7692228


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19179.

avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Dec 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Dec 2017

Ready to Commit after two successful tests.

avatar KarstenFrostholm KarstenFrostholm - change - 27 Dec 2017
Labels Added: ?
avatar KarstenFrostholm KarstenFrostholm - change - 27 Dec 2017
Labels Added: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Dec 2017

A warning. This stuff is a B/C break (the change can only be done in 4.0). been there

See #8925 (reverted because of B/C break)
And #8935 (not accepted - is not the same - read the PR)

avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Dec 2017
Status Ready to Commit Pending
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Dec 2017

set Status on "Pending".


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19179.

avatar brianteeman
brianteeman - comment - 27 Dec 2017

I am closing this. The code can not be deprecated until 4.0

avatar brianteeman brianteeman - change - 27 Dec 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-12-27 15:45:26
Closed_By brianteeman
Labels Removed: ?
avatar brianteeman brianteeman - close - 27 Dec 2017
avatar KarstenFrostholm
KarstenFrostholm - comment - 27 Dec 2017

Questions:
When these corrections are B/C break, it's not just a change of method, but a change of the result of the call.
Should you not find a way to document this difference of method change, and change of method and result.

As it is now, it's easy to be deceived to change a code so it's ready for version 4. With a high chance that the code will not work afterwards.

I'm not the first, and probably not the last one!

I had a plan to write a free component that could help check for one's code where ready for version 3.9 and there after ready for version 4.
This with the use of deprecated methods where the first point.
It is a need that I and many others have.
Now I have to think again.

I would like to receive advice on the content of such a component.

Yours sincerely
Karsten

avatar mbabker
mbabker - comment - 27 Dec 2017

The problem with the changes in the layout class is it changes what methods are called. If someone has a custom subclass and their subclass' overriding methods aren't called, that causes a B/C break as far as behavior goes. So going through and eliminating the use of deprecated APIs isn't as simple as just changing a method call in library level classes because there are more use cases to consider such as this one.

Add a Comment

Login with GitHub to post a comment