User tests: Successful: Unsuccessful:
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
Checkout the 4.2-dev branch (and "composer install", "npm ci") and try to install Joomla
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
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?
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-04-21 12:02:13 |
Closed_By | ⇒ | pe7er | |
Labels |
Added:
?
|
@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!
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.
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.
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.
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.
Thanks!
Putting this on hold till a decision is made on the framework package if the change should be reverted there or we adapt here.