Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MVCFactoryInterfaceInterface.php #44650

Open
wants to merge 2 commits into
base: 5.2-dev
Choose a base branch
from

Conversation

alexandreelise
Copy link
Contributor

  • 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

- Tiny fix to handle edge case when methodCall does not match the actual number of args which leads to null hence an error
@laoneo
Copy link
Member

laoneo commented Dec 20, 2024

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

@alexandreelise
Copy link
Contributor Author

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?

Abide to coding standards to make ci tests pass. Mainly phpcs
@alexandreelise
Copy link
Contributor Author

Now all ci tests pass

@alexandreelise
Copy link
Contributor Author

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.

@brianteeman
Copy link
Contributor

@alexandreelise have you seen https://github.com/muhme/joomla-branches-tester

@alexandreelise
Copy link
Contributor Author

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

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

Successfully merging this pull request may close these issues.

4 participants