New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Remove JError #17669
[4.0] Remove JError #17669
Conversation
libraries/fof/platform/platform.php
Outdated
@@ -354,10 +354,6 @@ public function setIntegrationObject($key, $object) | |||
*/ | |||
public function setErrorHandling($level, $log_level, $options = array()) | |||
{ | |||
if (version_compare(JVERSION, '3.0', 'lt') ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to edit FOF do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely not. It's a vendor file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, Joomla is maintaining the FOF code till it gets removed. So we should keep it clean to a degree where it is not breaking obviously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's being removed #17687 :P so not sure it matters for changes in 4.x
can you fix conflicts here please? |
…e-jerror # Conflicts: # libraries/legacy/error/error.php
Conflicts fixed |
…e-jerror # Conflicts: # libraries/fof/platform/platform.php
Conflicts fixed |
What is the status of this one? |
Are we positive that the use of |
I'm going to resync when I get the ok from @wilsonge that it is getting in when all is fine. |
So we're definitely safe for JObject classes. I guess I need to go back through this again and just check what classes are actually using JError directly - but most of this stuff is outdated docblocks iirc |
As I did this pr, I removed every trace of JError. |
…e-jerror # Conflicts: # libraries/legacy/error/error.php
Was a rather painless merge, so we are in sync again. |
On review this looks fine to me. Let's get some heavy testing on this |
OK Well I'm sure we'll break some things - but clearly we need this and it's not getting tests |
In my component migration to namespaces in preparation of J4 I am finding JError in src/Mail/Mail.php so it looks like not all traces of JError are gone. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17669. |
@skurvish can you post here a link to the line you see this error? I can't find a reference to the class, just an entry of the logger with jerror. |
In the current joomla git you can find JError at lines 118 & 154 in Mail/Mail.ph. You can also find it in Application/CMSApplication.php, Cache/Storage/RedisStorage.php, Client/ClientWrapper.php, Installer/Adapter/ComponentAdapter.php, Menu/SiteMenu.php, MVC/View/CategoryFeedView.php, MVC/Model/AdminModel.php & MVC/View/CategoryView.php. These are all in libraries/src |
Are you looking at the right version of those files? It’s expected to still be there for 3.x versions, but should be gone in 4.0 (just looking at the Mail.php file it isn’t used in the 4.0 file). |
Current github and my installed 3.9 version. Problem I am having is that I am running a namespaced WebApplication which I have loaded the framework (included defines.php & framework.php), created a class of WebApplication. If an error happens in Mail.php it is calling \JError which is not found. Perhaps there is some other autoloader I need to call beforehand so that JError is found? |
In J3 it is expected JError exists. We're only removing it in J4. You should be covered by the framework.php include which in turn loads the autoloaders in |
Hmmm, but it doesn't seem to autoload JError. Where should I look for answers? I assume this area is solely for J4. |
This Pull Request was to the J4 branch (hence why we assumed you were referring to J4 in your comment here). If you create a fresh issue and drop in a stack trace of the issue your getting we should be able to help more :) |
OK. I fixed the reason JError was being called so will have to revert to the state which caused the error and then will post a fresh issue. Thanks. |
JError is deprecated since ages and it was marked to be removed in Joomla 4 in the deprecate message. This pr cleans up the core from JError and removes the class.
It is the followup pr of #16952 and #16967 which is the last piece to have
JException
andJError
being removed.