Magento2: Magento 2.3.0 fails to install with fatal error message - PHP 7.3.0

Created on 16 Jan 2019  路  14Comments  路  Source: magento/magento2

Preconditions (*)

  1. Apache 2.4.37
  2. PHP 7.3.0
  3. MySql Community Server 8.0

Steps to reproduce (*)

  1. Install PHP 7.3.0 on Mac
  2. At https://magento.com/tech-resources/download - Under "Full Release with Sample Data" - Download Version 2.3.0 zip
  3. Copy folder to Apache htdocs folder
  4. Restart Apache
  5. Browse to http://localhost//setup

Expected result (*)

  1. Show the default/startup page to install Magento

Actual result (*)

Shows an error message

  1. Error
    Fatal error: Uncaught Exception: Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /opt/lampp/htdocs/magentoce230/vendor/zendframework/zend-stdlib/src/ArrayObject.php on line 426 in /opt/lampp/htdocs/magentoce230/vendor/magento/framework/App/ErrorHandler.php:61 Stack trace: #0 /opt/lampp/htdocs/magentoce230/vendor/composer/ClassLoader.php(444): Magento\Framework\App\ErrorHandler->handler(2, '"continue" targ...', '/opt/lampp/htdo...', 426, Array) #1 /opt/lampp/htdocs/magentoce230/vendor/composer/ClassLoader.php(444): include() #2 /opt/lampp/htdocs/magentoce230/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/opt/lampp/htdo...') #3 [internal function]: Composer\Autoload\ClassLoader->loadClass('Zend\\Stdlib\\Arr...') #4 /opt/lampp/htdocs/magentoce230/vendor/zendframework/zend-stdlib/src/Parameters.php(29): spl_autoload_call('Zend\\Stdlib\\Arr...') #5 /opt/lampp/htdocs/magentoce230/vendor/zendframework/zend-http/src/PhpEnvironment/Request.php(67): Zend\Std in /opt/lampp/htdocs/magentoce230/vendor/zendframework/zend-servicemanager/src/ServiceManager.php on line 941

  2. Screenshot
    screen shot 2019-01-16 at 1 01 19 am

Cannot Reproduce Format is valid non-issue

Most helpful comment

@ksurendra
please read stack requirements, you are using non supporting PHP version.
https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html

All 14 comments

Hi @ksurendra. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@ksurendra do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

Hi @cedarvinda. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [ ] 6. Add label Issue: Confirmed once verification is complete.

  • [ ] 7. Make sure that automatic system confirms that report has been added to the backlog.

Hi @GovindaSharma. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [ ] 6. Add label Issue: Confirmed once verification is complete.

  • [ ] 7. Make sure that automatic system confirms that report has been added to the backlog.

@ksurendra
please read stack requirements, you are using non supporting PHP version.
https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html

I'm new to this community. But

  1. Why is this tagged as "Cannot Reproduce"?
  1. If PHP 7.3 is not supported then please mention that in the requirements page https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html

I'm concerned of the stability of the product if it doesn't work with a new version of core/base language. Not sure if it's PHP that changed something significantly or Magento that's tied up to certain core features.

If there are known issues let them be issues and tracked. Atleast developers know that there are issues with a certain versions.

@ksurendra It's actually stated on the requirements page. The list of supported PHP versions clearly says 7.1.3+ (meaning 7.1.3 to 7.1.26) and 7.2.x (meaning all 7.2 versions). Not 7.3.

As for MySQL, the documentation also clearly says 5.6 and 5.7 are supported, not 8.0 which you're using. Might work, also might not.

@ksurendra Magento 2.3.0 comes with zend-stdlib 2.7.7 (released 2016-04-12). This does not support PHP 7.3.x.

We had to wait 11 months for Magento to even support PHP 7.2.0, so don't hold your breath!

Thanks for the updates, I didn't realize this.

On this path of doc. htdocs\eyfee\vendor\zendframework\zend-stdlibsrc\ArrayObject.php on line 426

Simply replace this line 426 from Continue to Break.
All Problem has been resolve.

@AkhilRamani1797 How you edit it? /vendor/zendframework/zend-stdlib/src/ArrayObject.php
lines 416-432

foreach ($ar as $k => $v) {
            switch ($k) {
                case 'flag':
                    $this->setFlags($v);
                    break;
                case 'storage':
                    $this->exchangeArray($v);
                    break;
                case 'iteratorClass':
                    $this->setIteratorClass($v);
                    break;
                case 'protectedProperties':
                    break;
                default:
                    $this->__set($k, $v);
            }
        }

@AkhilRamani1797 :- This is not working for me

### SOLUTION ###
The code is incorrect.

In
public_html/store/vendor/zendframework/zend-stdlib/src/ArrayObject.php on line 426
Where it says
continue;
it should say
continue 2;

Programming note: continue 2; will correctly go to the next iteration of the foreach loop, if case 'protectedProperties':

This fixed the issue, and allowed installs from 2 different Magento templates to work.
I was using the full install (fullpackage.zip)

For this particular issue, changing it to break; is not the correct answer - and the version of PHP and MySQL has nothing to do with it.

I downloaded these templates from TemplateMonster. Hopefully the development team will fix this issue, and propagate the fix out to all vendors.

@CJ-Greiner that maybe a solution, but changing something in the "core" in a framework source isn't advisable. This will break if we have to migrate/update to a new version. Or i maybe missing something here..

Two of biggest applications built on PHP also had issues:

  1. Wordpress https://wordpress.org/support/topic/php-7-3-compatibility-3/
  2. Drupal https://www.drupal.org/project/scald/issues/3032429

It's not really "core" Magento - it's a Zend proprietary build... so they should fix their implementation.
I don't have time to wait for them - I need my installation working now, so I fixed it and recorded the results here. Hopefully, it helps anyone that runs into the same issue.

Was this page helpful?
0 / 5 - 0 ratings