With the introduction of named arguments in PHP 8, changing function argument names becomes a B/C break. Until PHP 8 is released, we can update existing function signature with new argument names.
We should convert existing snake_case arguments to camelCase to better follow our coding standards.
We should review other arguments and rename them if they are unclear or inaccurate.
If not done before PHP 8 is released, the next opportunity would be the next major Joomla! version. That is assuming we do want to add this feature to our B/C promise.
Should this be done against staging or 4.0?
Labels |
Added:
?
?
|
I'm in favor for fixing our argument naming but don't think that we should give a b/c promise on named arguments till j4 or later
Making the changes as soon as possible is the wise thing to do. Specially since PHP 8 is due November 26, 2020.
Being first time in the front row of implementing new programming language changes of PHP 8 would actually surprise me to see in Joomla, so I'm definitely in favor to see it happen.
Labels |
Added:
?
|
Or better that PR should be send against staging so we can include it in the first release that supports PHP8
"Rename some function arguments in preparation for PHP 8" = exactly what #29812 does at the same time as fixing a decade old typo.
Or better that PR should be send against staging so we can include it in the first release that supports PHP8
Well considering some files in #29812 don't even exist in Joomla 3 I don't see how that would be possible :) - it would need splitting in two. Plus the lack of interest in #29812 already shows that getting it past the post might be hard :)
Well considering some files in #29812 don't even exist in Joomla 3 I don't see how that would be possible :)
Well than they still can be patched with 4.x as this is new API == no B/C break. But the existing ones have to be changed in 3.x before the first official PHP8 supported version.
Plus the lack of interest in #29812 already shows that getting it past the post might be hard :)
Well you know how fast it can go. ;) In this case as this has to be done before the next 3.x release I think we find testers for that too.
Can I also refer you to the Database column names which has a camelCase
/ snake_case
issue
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-11-21 18:48:25 |
Closed_By | ⇒ | HLeithner |
Status | Closed | ⇒ | New |
Closed_Date | 2020-11-21 18:48:25 | ⇒ | |
Closed_By | HLeithner | ⇒ |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-12-08 11:22:15 |
Closed_By | ⇒ | HLeithner |
Given that 3.9.23 will be the first version eith explizit PHP8 support i would recommend to do any change we want to do now.
Just to avoid any confusion for extension devs. This does not affect any of your extension code yet. Named arguments are opt-in and renaming arguments are only being an issue once named arguments are live. So renaming them now woth the first version that supports PHP8 is fine in my opinion as this is the first version you could build your PHP8 only extension on.
The only very rare case of issue would be that you already have a PHP8 only extension on 3.x that ises named arguments and we are changing just that argument that you where used in your extension. But given no release has benn officially tagged for PHP8 yet and the masshosters do not have PHP8 yet i would say it would be a fair change now to make the future usage consitent.