"Depreciated" Code in compiler? #48

Closed
opened 2017-02-28 21:54:25 +00:00 by mwweb · 4 comments

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
Owner

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...
Author

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.
Owner

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:
Owner

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.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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