jenkoian / doctrine-issue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doctrine issue

Issues noticed in 2.16.0 due to change made in doctrine/orm#10785

Reported here: doctrine/orm#10867

Setup

composer update

bin/doctrine orm:schema-tool:drop --force

bin/doctrine orm:schema-tool:create

Issue 1

php issue1.php

  • If we have an entity (Product in this case) with a manually set identifier
  • We then delete the entity from the database (I'm doing it here via a raw query but could just easily be done by another app/direct in the DB etc.)
  • We attempt to find the entity but it doesn't exist so we attempt to create it
  • Will get an error where as before this would work

Issue 2

php issue2.php

  • If we have an entity (Product in this case) the identifier is set manually in this example but don't think it matters
  • Get a proxy version of the entity
  • Attempt to get a value from the entity
  • Will get an error where as before this would work

Working 2.15.5 version

You can switch to the doctrine-2.15.5 to see it working before, remember to run composer update

About


Languages

Language:PHP 100.0%