User tests: Successful: Unsuccessful:
Pull Request for Issue #26995 .
Change _JEXEC check to JPATH_LIBRARIES for maximum b/c.
This library has already been deprecated since Joomla 3.6 and is removed in Joomla 4.0.
Code Review.
Works
Works
Status | New | ⇒ | Pending |
Category | ⇒ | External Library Libraries |
What you suggest is a b/c break.
How so?
Please demonstrate the B/C break then. Because I am truly clueless how on earth removing the dependency on Joomla's path constants to attempt to load a file counts as a break. Unless you're saying B/C is broken if someone has redefined the JPATH_LIBRARIES
constant, which at this point we should just all assume is impossible because things in Joomla will break if you don't respect the out-of-the-box filesystem structure, at which point I just laugh if anyone seriously thinks Joomla actually supports redefining the paths.
Again, just close this PR. There is no benefit to this change as is. My apologies for wasting everyone's time, I will stop providing feedback on the work you all do in this repository (again).
The b/c is very theoretical, based on you comment that it's possible to load this files without the framework could lead to an alternative path and not to dirname(DIR) ....
This pr changes to minimum impact.
This would only be an issue if someone decided to move phputf8
and vendor
directories into different root directories and are loading phputf8
library without the use of JPATH_LIBRARIES
constant. A scenario we should not account for.
That's the reason I say "very theoretical".
Considering __DIR__
is relative to the file, and not magically different (like getcwd()
is, or worse, JPATH_BASE
and JPATH_THEMES
are), the only hypothetical break comes in moving the files that the proxies are trying to load without updating the require statements. If you're going to consider THAT a possible B/C break, then by your argument once a file is in place in the filesystem it may never be moved (meaning all the namespacing work which removed a few hundred files is B/C breaking, doesn't matter there's the autoloading proxy in place because you've broken people's require statements).
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-11-11 22:08:22 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
I just don't think this is worth the pain. It's getting removed in J4 - I don't see the benefit to making the moved libraries theoretically able to be used by something that isn't part of core.
Just changing the defined check isn't really going to change much, my whole point was that none of the files should be using ANY of the Joomla application constants, which people seem to think is not an issue to introduce these Joomla-isms into paths that contain third party code. The fix I was suggesting looks like this:
But since there seems to be an insistence on having the Joomla constants be a requirement to use these files, there is no point in changing the patch the JSST decided upon and this pull request can be closed.
If the proxy files are going to change any further at this point, the conditional logging can be removed since it is now expected that the Joomla application be bootstrapped, meaning the log class would always be present.