PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar alexandreelise
alexandreelise
20 Dec 2024
  • Tiny fix to handle edge case when methodCall does not match the actual number of args which leads to null hence an error

Pull Request for Issue # .

Summary of Changes

Handle edge case with lead to null then error when arguments does not match what is expected for example when provided arguments are less the 1 or 2

Testing Instructions

  • Apply this pull request
  • composer install
  • php vendor/bin/phpstan -vvv --debug analyze

Actual result BEFORE applying this Pull Request

  • When phpstan analyze the codebase on this edge case. For example 1 argument rather then exactly 2. It shows an error

Expected result AFTER applying this Pull Request

No more errors for this specific edge case (on argument count mismatch). Basically it returns null as soon as possible.

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

avatar alexandreelise alexandreelise - open - 20 Dec 2024
avatar alexandreelise alexandreelise - change - 20 Dec 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Dec 2024
Category Repository
avatar laoneo
laoneo - comment - 20 Dec 2024

Thanks, can we reproduce this somehow in core? Even when I have to modify some files to see it in action.

avatar alexandreelise
alexandreelise - comment - 20 Dec 2024

Thanks, can we reproduce this somehow in core? Even when I have to modify some files to see it in action.

I'm fixing cs fixer issue in ci. My local setup had the old coding standards. I think now Joomla core uses PSR-12 right?

avatar alexandreelise alexandreelise - change - 20 Dec 2024
Labels Added: PR-5.2-dev
avatar alexandreelise
alexandreelise - comment - 20 Dec 2024

Now all ci tests pass

avatar alexandreelise
alexandreelise - comment - 20 Dec 2024

Here is something I tried today to automate everything as much as possible. Mainly focused on tech-savvy people or developers alike:

  1. git clone https://github.com/joomla/joomla-cms.git --depth 1 --branch 5.2-dev j5.2-dev+pr.44650
  2. cd j5.2-dev+pr.44650
  3. composer install && npm ci
  4. php installation/joomla.php install
  5. php cli/joomla.php core:update:channel custom --url=https://artifacts.joomla.org/drone/joomla/joomla-cms/5.2-dev/44650/downloads/80970/pr_list.xml
  6. php cli/joomla.php core:update

Now with this steps one should have the correct pr in their local step or anywhere else.

I'm just sharing . I'm not saying in any way that's what should be done.

avatar brianteeman
brianteeman - comment - 20 Dec 2024
avatar alexandreelise
alexandreelise - comment - 20 Dec 2024

@brianteeman This is exactly what I wanted to do for joomla community thanks to awesome Super Joomlers that contribute everyday

Add a Comment

Login with GitHub to post a comment