Skip to content

Conversation

dimitriBouteille
Copy link
Contributor

@dimitriBouteille dimitriBouteille commented Jan 29, 2025

Description (*)

This PR fix the bad phpdoc for \Magento\Framework\DB\Adapter\AdapterInterface::quoteColumnAs().

The argument $alias can be null or string.

Here is an example where the type null is used :

$attribute = $entity->getAttribute($attrCode);
$attrFieldName = $attrTable . '.value';
$fKey = $connection->quoteColumnAs($fKey, null);
$pKey = $connection->quoteColumnAs($pKey, null);
$condArr = ["{$pKey} = {$fKey}"];

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

The quality of Magento code needs to be improved so that it is easier to use the code quality tools (phpstan, rector, ...) ❤️

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • 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. resolves [Issue] [PHPDOC] Fix bad phpdoc Magento\Framework\DB\Adapter\AdapterInterface::quoteColumnAs() #39598: [PHPDOC] Fix bad phpdoc Magento\Framework\DB\Adapter\AdapterInterface::quoteColumnAs()

Copy link

m2-assistant bot commented Jan 29, 2025

Hi @dimitriBouteille. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ 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
ℹ️ 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.

@dimitriBouteille
Copy link
Contributor Author

@magento run all tests

@engcom-Hotel
Copy link
Contributor

@magento create issue

@engcom-Hotel engcom-Hotel added the Priority: P3 May be fixed according to the position in the backlog. label Feb 4, 2025
@engcom-Charlie engcom-Charlie added Project: Community Picked PRs upvoted by the community and removed Project: Community Picked PRs upvoted by the community labels Sep 12, 2025
@github-project-automation github-project-automation bot moved this to Pending Review in Pull Requests Dashboard Sep 12, 2025
@engcom-Charlie engcom-Charlie added Project: Community Picked PRs upvoted by the community and removed Progress: pending review labels Sep 12, 2025
@engcom-Charlie engcom-Charlie moved this from Pending Review to Ready for Testing in Community Dashboard Sep 12, 2025
@engcom-Bravo engcom-Bravo added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Sep 12, 2025
@engcom-Dash engcom-Dash self-assigned this Sep 15, 2025
@ct-prd-projects-boards-automation ct-prd-projects-boards-automation bot moved this from Ready for Testing to Testing in Progress in Community Dashboard Sep 15, 2025
@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@dimitriBouteille Thank you for your contribution & collaboration!

✔️ QA Passed

Preconditions:
Install Fresh Magento 2.4-develop

Steps to reproduce:
Set up PHPSTAN with level 5 or higher and run the check.
vendor/bin/phpstan analyse app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php --level=5

Before

image Error is showing

Parameter #2 $alias of method Magento\Framework\DB\Adapter\AdapterInterface::quoteColumnAs() expects string, null given.

After
image
The error is not showing

Functional and Static Tests are failing, hence moving this PR to Extended Testing.

@dimitriBouteille
Copy link
Contributor Author

@engcom-Bravo The code is perfect 🚀

@engcom-Dash engcom-Dash moved this from Testing in Progress to Extended testing (optional) in Community Dashboard Sep 15, 2025
@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

engcom-Dash commented Sep 16, 2025

@magento run Functional Tests EE, Functional Tests CE, Functional Tests B2B, WebAPI Tests

@engcom-Dash
Copy link
Contributor

engcom-Dash commented Sep 16, 2025

Fix the static check failure for this PR

Extended Testing
The consistent failures in Functional CE 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.

Build 1
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39581/6cc2392a887c26394f6ac40c5205625e/Functional/allure-report-ce/index.html#categories/ed7c9fa9b814bee13ccacc07bd76f868/8f9b647212894d3b/
image

Build 2
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39581/8bbef180067510ee714e593e45f5a6e8/Functional/allure-report-ce/index.html#categories/8fb3a91ba5aaf9de24cc8a92edc82b5d

image

Known Issue
AdminVerifyBehaviorOfDefaultStatusForProcessingStateTest ACQE-8689
QuickSearchAndAddToCartDownloadableTest ACQE-8731

The consistent failures in Functional B2B 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.

Build 1
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39581/119691f6d6e386fb82966ed2cf52b367/Functional/allure-report-b2b/index.html
image

Build 2
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39581/ea41159ffc97657b315e05430f139dfd/Functional/allure-report-b2b/index.html
image
Known Issue
AdminVerifyBehaviorOfDefaultStatusForProcessingStateTest ACQE-8689
StorefrontCreatePurchaseOrderFromNegotiableQuoteTest ACQE-8645
AdminCreateOrderWithSimpleProductCustomOptionFileTest ACQE-8642

The consistent failures in Functional 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.

Build 1
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39581/2dc1ecf5fe52c6c083c3fbb2c31ac079/Functional/allure-report-ee/index.html
image

Build 2
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39581/46b8c56c0459b8ac78e8f8db63a3ce44/Functional/allure-report-ee/index.html
image
Known Issue
AdminVerifyBehaviorOfDefaultStatusForProcessingStateTest ACQE-8689
AdminCreateOrderWithSimpleProductCustomOptionFileTest ACQE-8642

Web API failures are inconsistent and flaky. They are neither part of the PR nor failing because of the PR changes.

Build 1
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39581/31bb052193d3532bfa03ad9b908a945c/WebApi/console-error-logs.html
image

Build 2
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39581/294c0a8d92898450e1ab1059f3a1b1e4/WebApi/console-error-logs.html
image

Hence, Moving this PR to Merge In Progress

@engcom-Dash engcom-Dash moved this from Extended testing (optional) to Merge in Progress in Community Dashboard Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: P3 May be fixed according to the position in the backlog. Progress: testing in progress Project: Community Picked PRs upvoted by the community Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Projects

Status: Merge in Progress

Development

Successfully merging this pull request may close these issues.

[Issue] [PHPDOC] Fix bad phpdoc Magento\Framework\DB\Adapter\AdapterInterface::quoteColumnAs()

6 participants