Skip to content

Conversation

@leeroy1821
Copy link
Contributor

Pull Request for Issue #40653 .

Summary of Changes

\Joomla\CMS\Workflow\Workflow constructor now use CMSApplicationInterface insteadof CMSApplication. This make compatible with CliApplication which implements CMSApplicationInterface but not extends CMSApplication.

Testing Instructions

Make CLI app which create instance of ArticleModel: $article = \Joomla\CMS\Factory::getApplication()->bootComponent('com_content')->getMVCFactory()->createModel('Article', 'Administrator');

Actual result BEFORE applying this Pull Request

[TypeError] Joomla\CMS\Workflow\Workflow::__construct(): Argument #2 ($app) must be of type ?Joomla\CMS\Application\CMSApplication, Joomla\CMS\Application\ConsoleApplication given, called in ....../libraries/src/MVC/Model/WorkflowBehaviorTrait.php on line 90

Expected result AFTER applying this Pull Request

I get model object

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@alikon
Copy link
Contributor

alikon commented Nov 3, 2024

see pr #43155 too

@leeroy1821
Copy link
Contributor Author

Okay, so Joomla can not fix this problem. Understand.

@leeroy1821 leeroy1821 closed this Nov 3, 2024
@alikon
Copy link
Contributor

alikon commented Nov 3, 2024

i'm sorry that was not my message, just want to put a link to more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants