Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nicolas-grekas
Copy link
Member

Compile https://github.com/arnaud-lb/php-src/tree/lazy-objects

Checkout https://github.com/nicolas-grekas/doctrine-orm/tree/native-proxy

Checkout https://github.com/nicolas-grekas/symfony/tree/native-lazy

Run composer install.

Run VarExporter's test:

~/Code/php-src/sapi/cli/php ./phpunit src/Symfony/Component/VarExporter/

Symlink symfony into doctrine:

/path/to/symfony/link /path/to/doctrine/orm/

Run the tests from doctrine's directory:

ORM_PROXY_IMPLEMENTATION=lazy-ghost ~/Code/php-src/sapi/cli/php -dmemory_limit=-1 ./vendor/bin/phpunit

Patch also vendor/doctrine/persistence/src/Persistence/Reflection/RuntimeReflectionProperty.php like this:

    public function setValue($object, $value = null)
    {
        \ReflectionLazyObject::fromObject($object)?->skipProperty($this->name, $this->class);

        parent::setValue($object, $value);
    }

@carsonbot carsonbot added this to the 7.0 milestone Nov 15, 2023
@carsonbot carsonbot changed the title [WIP][VarExporter] Leverage native lazy proxies [VarExporter] [WIP] Leverage native lazy proxies Nov 15, 2023
@nicolas-grekas
Copy link
Member Author

Wrong repo, this is far from ready. nicolas-grekas#44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants