ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 7 replies, has 6 voices, and was last updated by Artem Liubeznyi Artem Liubeznyi 1 year, 6 months ago.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #12290
    Dima Soroka
    Dima Soroka
    Oro Core

    Thanks for the heads up, we’ll work on this shortly.

    #13510

    markus-rothenbacher
    Participant

    What is the status here. Do you have a release plan about the PHP 7 compatibility?
    The PHP 7 performance is just awesome. I need this performance developing in OroCrm for my customers.

    #13517

    markus-rothenbacher
    Participant

    Ok I have to admit, that I badly want Oro to work with PHP7.

    I did not get the UnitTests to run, even under PHP5. So I tried to fix the one Error I get under PHP7:

    Fatal error: Cannot use 'True' as class name as it is reserved in /var/www/vendor/oro/platform/src/Oro/Component/ConfigExpression/Condition/True.php on line 10

    So I wrote a few bash commands, which basically rename the Class True to TrueCompatible and False to FalseCompatible with all their occurrences in the code:


    cd /var/www/vendor/oro
    find . -type f -exec sed -i 's/Condition\\False()/Condition\\FalseCompatible()/g' {} +
    find . -type f -exec sed -i 's/Condition\\True()/Condition\\TrueCompatible()/g' {} +
    find . -type f -exec sed -i 's/Condition\\False$/Condition\\FalseCompatible/g' {} +
    find . -type f -exec sed -i 's/Condition\\True$/Condition\\TrueCompatible/g' {} +
    mv platform/src/Oro/Component/ConfigExpression/Condition/True.php platform/src/Oro/Component/ConfigExpression/Condition/TrueCompatible.php
    mv platform/src/Oro/Component/ConfigExpression/Condition/False.php platform/src/Oro/Component/ConfigExpression/Condition/FalseCompatible.php
    sed -i 's/class True/class TrueCompatible/g' platform/src/Oro/Component/ConfigExpression/Condition/TrueCompatible.php
    sed -i 's/class False/class FalseCompatible/g' platform/src/Oro/Component/ConfigExpression/Condition/FalseCompatible.php

    After executing this and deleting the cache files, Oro works fine for me in PHP7. 25-40% faster and nearly half the memory consumption.

    If you have a small Tutorial how to get the UnitTests up and running, I could make a branch with my fix and could test for complete PHP7 compatibility in Oro Platform.

    #13635
    Ivan Klymenko
    Ivan Klymenko
    Oro Core

    Hi markus,
    thank you very much for sharing with us your investigation results! We planned to provide compatibility with PHP7 for OroCRM till the end of the year – after PHP7 release. We also spent some time checking this compatibility on the RC1 and faced with unexpected Segmentation Fault during application run.

    We will be very thankful if you could provide the PR with complete PHP7 compatibility and try to process it shortly.

    To run Unit Tests for the OroPlatform or the OroCRM you should do the following:

    1. Clone repository platform or/and crm
    2. Open root folder of the cloned project
    3. run “composer require symfony/symfony:2.7.* –prefer-dist –update-no-dev”
    4. run “phpunit”

    If you want also to run functional tests, you can check this article in or documentation: http://www.orocrm.com/documentation/index/current/book/functional-tests

    #17204

    davidlin
    Participant

    hi markus,

    do you have finished the unit test and pull request to oro-crm github?

    #17206

    Julien VINAI
    Participant

    Hi Davidlin,

    Some informations in this issue : https://github.com/orocrm/platform/pull/347


    SYNOLIA – Lead Developer

    #18177
    Artem Liubeznyi
    Artem Liubeznyi
    Oro Core

    Hi guys,

    We have just merged PHP7 support into master branch. Please enjoy.

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.