"Depreciated" Code in compiler? #48

Closed
opened 2017-02-28 21:54:25 +00:00 by mwweb · 4 comments
mwweb commented 2017-02-28 21:54:25 +00:00 (Migrated from github.com)

Not to add more work to you, but it looks like there is some "depreciated" code in the compiler. See below on examples (note: this was using Sermon Distributor, running the check through JED Checker component -- https://extensions.joomla.org/extension/jedchecker/)

  • JError::raiseError(500, implode('', $errors));
    JError is deprecated, you should use JFactory::getApplication()->enqueueMessage();:

  • return JError::raiseWaring(404, JText::_('JERROR_ALERTNOAUTHOR'));
    JError is deprecated, you should use JFactory::getApplication()->enqueueMessage();:

  • $checkValue = JRequest::getInt('id');
    JRequest is deprecated, you should use JFactory::getApplication()->input;:

I know I've seen some areas that are using the enqueueMessage above, but others that are using the raiseError or raiseWaring

Not to add more work to you, but it looks like there is some "depreciated" code in the compiler. See below on examples (note: this was using Sermon Distributor, running the check through JED Checker component -- https://extensions.joomla.org/extension/jedchecker/) - JError::raiseError(500, implode('', $errors)); JError is deprecated, you should use JFactory::getApplication()->enqueueMessage();: - return JError::raiseWaring(404, JText::_('JERROR_ALERTNOAUTHOR')); JError is deprecated, you should use JFactory::getApplication()->enqueueMessage();: - $checkValue = JRequest::getInt('id'); JRequest is deprecated, you should use JFactory::getApplication()->input;: I know I've seen some areas that are using the enqueueMessage above, but others that are using the raiseError or raiseWaring

I know about this issue, it is depreciated, and we will change it soon...

I know about this issue, it is depreciated, and we will change it soon...
mwweb commented 2017-03-01 04:50:34 +00:00 (Migrated from github.com)

Great I figured you probably did, but I've learned not to assume.

Great I figured you probably did, but I've learned not to assume.

Hey it is great that you pointed it out... thanks! and please continue to do that 👍

Hey it is great that you pointed it out... thanks! and please continue to do that :+1:

Here is why I have not changed it... part of Joomla core

So I though if they left it there... why not wait until they remove it :)

You will see that is the only place in the compiler it is still used... in the JViewLegacy files.

Here is why I have not changed it... [part of Joomla core](https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/views/article/view.html.php#L72) So I though if they left it there... why not wait until they remove it :) You will see that is the only place in the compiler it is still used... in the JViewLegacy files.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#48
No description provided.