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
[#32282] Move joomla/form/fields to joomla/form/field for autoloading #3116
Conversation
Just for reference, the last Travis build actually passed on here. Don't know why (maybe it has to do with merging from master instead of staging, or even 3.3-dev), but it got flagged by my script as aimed to master. With that said, the inability to automatically merge this isn't from my script 😉 |
OK so what do I need to do? |
Merge from 3.3-dev as that is the branch you've targeted with this PR. |
Done :) |
I hope I'm not being daft, but this PR seems to be renaming |
In com_admin/script.php, we have to delete old files out of the system; that's what's happening in that part of the PR. |
Looks like predefined list got added after I made this PR - so just committing a fix to move that across. I have no clue why the patch isn't creating the new files tho! It definitely should |
Am I correct in understanding that, for example |
Yes. definitely!! |
I'll try with com_patchtester then |
OK and I'll merge in upstream again just in case........ |
Conflicts: administrator/components/com_admin/script.php
OK there was a conflict in script.php from the JRegistry merges last night. It might have been that screwing up the patch? Anyhow try again :) |
Things look good from here at a quick run through the CMS. |
OK, so I've got an odd case. Apply the patch and run the install app. It fails for me with a "Could not connect to MySQL" message on building the language field on the first page. |
OK, found the issue. We need to rename the language field in the install app. With the autoloader changes, there's now two |
This actually exposes an issue. Theoretically, a developer could override a field using this same type of logic in their extension; now they can't without overriding the autoloader. That's changes my thinking some. |
I seem to recall reading on list about some devs doing this. Best, Matt Thomas Sent from mobile. Please pardon any typos or brevity.
|
IMO that field override method should not exist. You will get unstable behavior on your extension if you use exactly the same class name. Field should be named Anyway I don't see it as a B/C. It's a tricky way that shouldn't block the desired behavior which is to use autloading. |
Agree or not, that's how the JForm API has been since 1.6 and a change now is arguably a B/C break (we have to change our own code to accommodate, that should say something). I agree it shouldn't work like it does today, but fact is, this is the current expected behavior. |
I agree fully that it should not exist and it's bad practice to use the same class name for own fields. You should rename the custom one. But given that it exists and we even use it in core ourself, it's clearly a B/C issue and has to wait for the next major. As bad as it is. |
OK perhaps it would be a good start now to rename the language form field in the installer and to document on our documentation in J4 we will be removing the option to do this? |
Change the type to |
Why fix the installation field if the proposal is going to be rejected because it's suposed to break B/C? |
The installation field proposal or this PR? This PR could be a 4.0 thing given it's B/C breaking nature as we had discussed. In practice, we have freely made B/C breaking changes in the install app because of its isolated use case and not having a proper API (remember it was at 3.1 where we rewrote the full app onto the new MVC and |
I mean this PR can be closed. Maybe tag it with "v4.0"before closing to use it as reference? Then if someone wants to create the field PR perfect. |
Ahh, gotcha! |
👍 |
This is the same PR #2234 but at 3.3 dev rather than master
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32282&start=0