magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

[PHPDOC] Fix bad phpdoc Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection

Open dimitriBouteille opened this issue 1 year ago • 14 comments

Description (*)

This PR fix the bad phpdoc for \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection.

  • joinLeft:
    • The first argument can be string or array<string, array>
    • The 3th argument can be string or array<string>

Here is an example where the type array is used :

https://github.com/magento/magento2/blob/d06337ad4d7a5a783030368a8d49aa70da6a5fca/app/code/Magento/Eav/Model/AttributeRepository.php#L114-L118

For example, with PHPSTAN is very complicated to setup the project with level 5 or higher :(

Capture d’écran du 2024-09-11 09-42-35

Related Pull Requests

None

Fixed Issues (if relevant)

None

Manual testing scenarios (*)

Setup PHPSTAN with level 5 or higher and run check.

Questions or comments

Contribution checklist (*)

  • [ ] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [x] All new or changed code is covered with unit/integration tests (if applicable)
  • [x] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • [ ] All automated tests passed successfully (all builds are green)

Resolved issues:

  1. [x] resolves magento/magento2#40354: [PHPDOC] Fix bad phpdoc Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection

dimitriBouteille avatar Sep 11 '24 07:09 dimitriBouteille

Hi @dimitriBouteille. Thank you for your contribution! Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

:exclamation: Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s) For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here :information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation. Join Magento Community Engineering Slack and ask your questions in #github channel.

m2-assistant[bot] avatar Sep 11 '24 07:09 m2-assistant[bot]

@magento run all tests

dimitriBouteille avatar Sep 11 '24 07:09 dimitriBouteille

@magento run all tests

lbajsarowicz avatar Oct 21 '25 20:10 lbajsarowicz

@magento run all tests

engcom-Hotel avatar Nov 26 '25 06:11 engcom-Hotel

Hello @dimitriBouteille, Thank you for your contribution. I am taking care of the static tests failure.

engcom-Dash avatar Dec 05 '25 08:12 engcom-Dash

@magento run all tests

engcom-Dash avatar Dec 05 '25 08:12 engcom-Dash

Hi @engcom-Dash Thanks you !

dimitriBouteille avatar Dec 05 '25 08:12 dimitriBouteille

@magento run Unit Tests

engcom-Dash avatar Dec 05 '25 10:12 engcom-Dash

@engcom-Hotel I’ve resolved the static test failure. Kindly review so we can move ahead with this PR.

engcom-Dash avatar Dec 05 '25 18:12 engcom-Dash

@magento run all tests

engcom-Dash avatar Dec 09 '25 09:12 engcom-Dash

@magento create issue

engcom-Dash avatar Dec 09 '25 11:12 engcom-Dash

Hello @dimitriBouteille

Thanks for the contribution!

✔️ QA Passed

Preconditions: Install a fresh Magento 2.4-develop.

Manual Testing Scenarios

  1. Set up PHPStan in the local environment.
  2. Run the analysis command:

vendor/bin/phpstan analyse /opt/homebrew/var/www/magento2community/magento2/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Collection.php

Before PR Changes image After PR Changes image

Some Functional Builds are Failing, hence moving this PR for Extended Testing

engcom-Dash avatar Dec 09 '25 13:12 engcom-Dash

@magento run all tests

engcom-Dash avatar Dec 10 '25 08:12 engcom-Dash

The consistent failures in Functional CE, B2B,EE are known issues and JIRA is open for the same. The other failures are inconsistent and flaky. They neither part of the PR nor failing because of the PR changes.

CE Build1 https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39155/f5c42ffb6e009404e5328e1d7dbbdd77/Functional/allure-report-ce/index.html#categories/bdbf199525818fae7a8651db9eafe741 image

Build2 https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39155/c7334ff5502544d383f75acb35cc295d/Functional/allure-report-ce/index.html#categories image

EE Build 1 https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39155/9529ceeb8a1cfb38151f2baa1ad64236/Functional/allure-report-ee/index.html#categories image

Build 2 https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39155/c4b27f7e016425e0548934be3ab95793/Functional/allure-report-ee/index.html#categories image

B2B Build 1 https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39155/7e8ef46a4cb8c82980c36b79ad7355bc/Functional/allure-report-b2b/index.html image Build 2 https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39155/5cf140095e3da7da4bc810b6ffc9deb0/Functional/allure-report-b2b/index.html image

Known Issues ApplyTaxesAndFptForSimpleProductWithCanadianPstOriginTest AC-16096 StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest ACQE-9074 StorefrontFPTTaxDiscountInShoppingCartTest AC-16096 StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest AC-16096 AddingSeveralFPTToSimpleProductTest AC-16096 AdminFPTIncludingAndExcludingTaxVisibleOnNegotiableQuotePageTest AC-16096 AdminFPTVisibleOnNegotiableQuotePageTest AC-16096

Hence, Moving this PR to Merge In Progress

engcom-Dash avatar Dec 10 '25 13:12 engcom-Dash