? Pending

User tests: Successful: Unsuccessful:

avatar pe7er
pe7er
20 Apr 2022

When trying to install the 4.2-dev branch on PHP7.4, a 500 error occurs:

Fatal error: Declaration of Joomla\CMS\Uri\Uri::buildQuery(array $params) must be compatible with Joomla\Uri\AbstractUri::buildQuery($params) in /srv/www/joomla/joomla-cms/libraries/src/Uri/Uri.php on line 292

Testing Instructions

Checkout the 4.2-dev branch (and "composer install", "npm ci") and try to install Joomla

Actual result BEFORE applying this Pull Request

screencapture-localhost-joomla-joomla-cms-installation-index-php-2022-04-20-15_45_33

Expected result AFTER applying this Pull Request

screencapture-localhost-joomla-joomla-cms-installation-index-php-2022-04-20-15_47_30

avatar pe7er pe7er - open - 20 Apr 2022
avatar pe7er pe7er - change - 20 Apr 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Apr 2022
Category Libraries
avatar laoneo
laoneo - comment - 20 Apr 2022

Putting this on hold till a decision is made on the framework package if the change should be reverted there or we adapt here.

avatar laoneo
laoneo - comment - 21 Apr 2022

Uri 2.0.2 is released https://github.com/joomla-framework/uri/releases/tag/2.0.2. Can you revert your change and update the dependency or should a new pr opened with the composer change?

avatar pe7er pe7er - change - 21 Apr 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-04-21 12:02:13
Closed_By pe7er
Labels Added: ?
avatar pe7er
pe7er - comment - 21 Apr 2022

@laoneo I'm not sure what you mean by reverting my change. The current 4.2-dev branch has the old public static function buildQuery(array $params) with "array": https://github.com/joomla/joomla-cms/blob/4.2-dev/libraries/src/Uri/Uri.php#L292

Yesterday that did not work. I've just tested 4.2-dev again after I did a new "composer install".
Now it's working correctly. I'm closing this PR.
Thanks!

avatar pe7er pe7er - close - 21 Apr 2022
avatar laoneo
laoneo - comment - 21 Apr 2022

Did you do a composer update instead of composer install? Because install should still load 2.0.1 of uri while the update loads 2.0.2.

avatar pe7er
pe7er - comment - 21 Apr 2022

I did composer install and my local J4 seems to work ok.

Because of your comment, I think that I now understand the composer error that I got :-)

Class Joomla\Tests\Unit\Libraries\Cms\Uri\JUriTest located in ./tests/Unit/Libraries/Cms/Uri/UriTest.php does not comply with psr-4 autoloading standard. Skipping.

avatar pe7er
pe7er - comment - 21 Apr 2022

Mhh, composer update gives the same composer error on the command line:

Class Joomla\Tests\Unit\Libraries\Cms\Uri\JUriTest located in ./tests/Unit/Libraries/Cms/Uri/UriTest.php does not comply with psr-4 autoloading standard. Skipping.

avatar laoneo
laoneo - comment - 21 Apr 2022

Make sure that the change from this pr is reverted. Then you should see the original error. When you do a composer update joomla/uri then the error should disappear again. Ignore the tests warnings as actually the testing setup doesn't work on PHP 8.1.

avatar pe7er
pe7er - comment - 21 Apr 2022

Thanks!

avatar laoneo
laoneo - comment - 21 Apr 2022

Apply the pr #37597 and then do a composer install. Then the error should go away.

Add a Comment

Login with GitHub to post a comment