Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • in reply to: PHP 7.0 compatibility #36784

    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.

    in reply to: PHP 7.0 compatibility #36783

    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.

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

You will be redirected to [title]. Would you like to continue?

Yes No