No Code Attached Yet bug
avatar SharkyKZ
SharkyKZ
7 Dec 2022

What needs to be fixed

Joomla\CMS\Application\ApiApplication::__construct() accepts an instance of Joomla\Input\Json which is passed to the parent Joomla\CMS\Application\CMSApplication class which accepts only an instance of Joomla\CMS\Input\Input. This results in a type error.

Why this should be fixed

Class is virtually unusable.

How would you fix it

Narrow the accepted type in ApiApplication or widen the accepted type in CMSApplication.

Side Effects expected

Maybe.

avatar SharkyKZ SharkyKZ - open - 7 Dec 2022
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Dec 2022
avatar joomla-cms-bot joomla-cms-bot - change - 7 Dec 2022
Labels Added: No Code Attached Yet
avatar wilsonge
wilsonge - comment - 22 Dec 2022

We should widen the parent. Originally there was some issues with the base class but at least https://github.com/joomla/joomla-cms/blob/4.2-dev/libraries/src/Application/WebApplication.php#L85 seems to be fixed now when I test locally.

Still probably something safer fixed in 5.0 I guess despite that??

avatar SharkyKZ
SharkyKZ - comment - 29 Dec 2022

This should totally be fixed in 4.x. Funny thing is, this would have automatically fixed itself in 5.0 anyways because Joomla\CMS\Input\Input and co were already deprecated for removal in 5.0.

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar Hackwar Hackwar - change - 25 Aug 2023
Labels Added: PBF
avatar Hackwar Hackwar - labeled - 25 Aug 2023
avatar brianteeman brianteeman - change - 1 Sep 2023
Labels Removed: PBF
avatar brianteeman brianteeman - unlabeled - 1 Sep 2023
avatar Hackwar Hackwar - change - 30 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-30 21:40:14
Closed_By Hackwar
avatar Hackwar Hackwar - close - 30 Mar 2024
avatar Hackwar
Hackwar - comment - 30 Mar 2024

Thank you for reporting this issue. You are right, that this is a problem, but it is not something we can fix in a b/c way right now in either 4.4 or 5.x. For 6.0 this has been fixed by removing the CMS Input classes. Thus I'm closing this issue,

Add a Comment

Login with GitHub to post a comment