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

Fix code breaking comma in array_merge_recursive #29755

Closed
wants to merge 1 commit into from
Closed

Fix code breaking comma in array_merge_recursive #29755

wants to merge 1 commit into from

Conversation

jessedezwart
Copy link

@jessedezwart jessedezwart commented Aug 26, 2020

The unnecessary comma caused an error message when the cache status was read (php ./bin/magento cache:status).

The error message: "Parse error: syntax error, unexpected ')' in ./setup/src/Magento/Setup/Module.php on line 82"

After removal of the comma, all code relating to this class kept working as intended.

Resolved issues:

  1. resolves [Issue] Fix code breaking comma in array_merge_recursive #29756: Fix code breaking comma in array_merge_recursive

The unnecessary comma caused an error message when the cache status was read (php bin/magento cache:status).

The error message: "Parse error: syntax error, unexpected ')' in /home/test/misterag/setup/src/Magento/Setup/Module.php on line 82"
@m2-assistant
Copy link

m2-assistant bot commented Aug 26, 2020

Hi @jessedezwart. Thank you for your contribution
Here is some useful tips 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

❗ 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

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@sidolov
Copy link
Contributor

sidolov commented Aug 26, 2020

@jessedezwart please, sign Adobe CLA

@jessedezwart jessedezwart reopened this Aug 26, 2020
@ghost ghost removed this from Pending Review in Pull Requests Dashboard Aug 26, 2020
@ghost ghost added this to Pending Review in Pull Requests Dashboard Aug 26, 2020
@ghost ghost moved this from Pending Review to Ready for Testing in Pull Requests Dashboard Aug 26, 2020
@ghost ghost assigned sidolov Aug 26, 2020
@sidolov sidolov added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: pending review Severity: S1 Affects critical data or functionality and forces users to employ a workaround. and removed Progress: ready for testing labels Aug 26, 2020
@sidolov
Copy link
Contributor

sidolov commented Aug 26, 2020

@magento create issue

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-8076 has been created to process this Pull Request
✳️ @sidolov, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@magento-engcom-team
Copy link
Contributor

@jessedezwart thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Aug 26, 2020

Hi @jessedezwart @sidolov
This is not an issue. Magento 2.4 is supporting only php 7.3 and php 7.4, and trailing comma is allowed in those versions. More info here #29695 (review)

@jessedezwart could you share which php version are you using?

@sidolov
Copy link
Contributor

sidolov commented Aug 27, 2020

@jessedezwart according to the @ihor-sviziev comment you should be fine using supported PHP versions to run Magento.
I'm closing the PR as not relevant, please, feel free to reopen it in case you will find an additional case.
Thank you for your contribution!

@sidolov sidolov closed this Aug 27, 2020
@m2-assistant
Copy link

m2-assistant bot commented Aug 27, 2020

Hi @jessedezwart, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ghost ghost removed this from Ready for Testing in Pull Requests Dashboard Aug 27, 2020
@ihor-sviziev ihor-sviziev mentioned this pull request Oct 10, 2020
4 tasks
@mischabraam
Copy link

@ihor-sviziev incorrect. This depends actually on your PHP 7.3 version. It might be an old version, but this trailing comma is NOT allowed in PHP 7.3.14-fpm.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Oct 27, 2020

Hi @mischabraam,
I just tried on the exact php version that you provided - this issue isn't reproducing for me, ran it using the following docker command:

docker run  --rm -it php:7.3.14 bash

and tested on the following file:

<?php
function myFn($a, $b) {
    echo $a . $b;
}

myFn(1,2,);

image

Just make sure you're using correct php version in your web server, using phpversion function.

@mischabraam
Copy link

OMG thanks, I'm such a noob. Turns out the used docker image had 7.3.14, but the version to execute the commands was 7.2. You can shoot me ... :

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Oct 28, 2020

@mischabraam It's not a big issue, everyone do mistakes 😄 In order not to do such mistakes we already updated minimum required php version in bootstrap.php in #29993, so Magento will just let you know that you're trying to run on not supported version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Setup Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: pending review Release Line: 2.4 Severity: S1 Affects critical data or functionality and forces users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Fix code breaking comma in array_merge_recursive
5 participants