Skip to content

[4.0] Factory class conflict in Joomla/CMS/Document namespace #21304

@aaron-harding

Description

@aaron-harding

Steps to reproduce the issue

Attempt to Install latest branch of Joomla after composer install and npm install

Expected result

Go to Joomla install process

Actual result

Fatal error: Cannot use Joomla\CMS\Factory as Factory because the name is already in use in C:\xxx\joomla-cms\libraries\src\Document\HtmlDocument.php on line 18

System information (as much as possible)

PHP 7.1.20

Additional comments

Each Document class uses Joomla\CMS\Factory, Factory is already assigned to Joomla\CMS\Document\Factory.

I updated the use statement to use Joomla\CMS\Factory as FactoryCMS and updated each reference to FactoryCMS in each of the Document classes which seems to fix it. I'm not sure if making this change has caused other side effects?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions