https://github.com/jenkoian/doctrine-issue
https://github.com/jenkoian/doctrine-issue
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jenkoian/doctrine-issue
- Owner: jenkoian
- Created: 2023-08-02T11:52:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-02T12:20:38.000Z (over 1 year ago)
- Last Synced: 2024-04-08T09:06:19.741Z (about 1 year ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Doctrine issue
Issues noticed in 2.16.0 due to change made in https://github.com/doctrine/orm/pull/10785
Reported here: https://github.com/doctrine/orm/issues/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`