Prestashop: Error on install dev-version

Created on 14 May 2019  路  4Comments  路  Source: PrestaShop/PrestaShop

Describe the bug
On install-dev final step, it shows 2 warnings on /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'http://localhost/PrestaShop/install-dev/'
  2. Follow Installer
  3. On last step, installing database.
  4. It shows the two warnings

Screenshots
I attach one screenshot
Captura de pantalla 2019-05-14 a las 16 55 10

Additionnal information
PrestaShop version: Development
PHP version: 7.3.1
MySQL: 5.7.25

Possible fix
From line 2631 to 2666

// use the entity association
if (isset($data[$field]) && is_object($data[$field]) && isset($this->entityStates[spl_object_hash($data[$field])])) {
    $class->reflFields[$field]->setValue($entity, $data[$field]);
    $this->originalEntityData[$oid][$field] = $data[$field];

    continue 2;
}

$associatedId = array();

// TODO: Is this even computed right in all cases of composite keys?
foreach ($assoc['targetToSourceKeyColumns'] as $targetColumn => $srcColumn) {
    $joinColumnValue = isset($data[$srcColumn]) ? $data[$srcColumn] : null;

    if ($joinColumnValue !== null) {
        if ($targetClass->containsForeignIdentifier) {
            $associatedId[$targetClass->getFieldForColumn($targetColumn)] = $joinColumnValue;
        } else {
            $associatedId[$targetClass->fieldNames[$targetColumn]] = $joinColumnValue;
        }
    } elseif ($targetClass->containsForeignIdentifier
        && in_array($targetClass->getFieldForColumn($targetColumn), $targetClass->identifier, true)
    ) {
        // the missing key is part of target's entity primary key
        $associatedId = array();
        break;
    }
}

if ( ! $associatedId) {
    // Foreign key is NULL
    $class->reflFields[$field]->setValue($entity, null);
    $this->originalEntityData[$oid][$field] = null;

    continue 2;
}

Bug IN No change required develop

All 4 comments

Hi @crishnakh,

PrestaShop is not compatible with PHP 7.3, in fact, PrestaShop 1.7.0 to 1.7.3 is compatible with PHP 7.1 and PrestaShop 1.7.4 & 1.7.5 1.7.6 are compatible with PHP 7.2.
For more details, you can follow this link: http://build.prestashop.com/news/prestashop-1-7-is-moving-to-symfony-3-4-and-php-5-6/
In my case, I tried to install the develop Branch, but it is OK
https://drive.google.com/file/d/1WsgVW3WYI7vWC0Ximgx4AqO23Z9M6yPg/view
Thanks to downgrade your version PHP, check & feedback.

Ok, I've tested install on PHP 7.2.14. All Ok, just drop here if anyone have the same error on php 7.3.1

Ok, I've tested install on PHP 7.2.14. All Ok, just drop here if anyone have the same error on php 7.3.1

Thanks ! We're aware of this issue, this is because php 7.3 requires a higher version of Doctrine that the one we currently use.

This will be fixed in PS 1.7.7 , it will be compatible with php7.3 馃槈

Hi @crishnakh,

I close the issue, feel free to open a new one when needed.
Thanks!

Was this page helpful?
0 / 5 - 0 ratings