-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 7.3 regression/issue #7402
Comments
This is already fixed by #7325 in 2.6 and will be released in 2.6.3. |
Ad:
Incompatibility with new PHP version is not a BC break, it's rather a BC break in PHP 7.3. :) |
Changed it to "no" :-) |
Awesome. I tried searching for a pre-existing bug but didn't find one. Glad it's fixed. Thanks for all your hard work everyone |
Current Doctrine version is meeting compatibility issues with PHP 7.3. See: [#7402](doctrine/orm#7402)
Current Doctrine version is meeting compatibility issues with PHP 7.3. See: doctrine/orm#7402
EDIT: This issue has been fixed, ran Just as a side note, checking the file where the warning comes from, UnitOfWork.php, we find the following structure: foreach ($class->associationMappings as $field => $assoc) {
//some logic
switch (true) {
case($assoc['type'] & ClassMetadata::TO_ONE):
//some more logic
if(isset($data[$field]) && is_object($data[$field]) && isset($this->entityStates[spl_object_hash($data[$field])])) {
//do stuff
continue; // <---- Statement that gives the error
}
//some more code
} //end of switch
} //end of foreach Since the switch statement is the last statement on the foreach loop, then using Therefore, you are safe to edit the file and replace |
@VascoRatoGFI Please upgrade, this has been already fixed. |
This is necessary to make doctrine/orm work both with php 7.0 (debian/stable) and 7.3 (debian/testing). See also doctrine#7402.
This is basically v2.5.14 plus DOMjudge/orm@0ea0a31
Would I be right in guessing that the 2.5.x branch won't be getting this fix? Our projects have to be able to run on anything from PHP 7.0 to 7.2, so we can't update to ORM 2.6.x yet. We did try out PHP 7.3 and had this issue, but we can stay away from that until 7.0 drops out of mainstream. |
Yes, you're right. 2.5 is unmaintained and there is no plan to back-port that fix. |
Error when updating from composer, [source](doctrine/orm#7402)
I have a project with Doctrine ORM 2.5.14 installed. This is the latest 2.5 version, but this one still has this "bug" (and it won't be fixed, since 2.5 is unmaintained). I can't update to 2.6 or 2.7 because the project is still running on Symfony 2.8 and Doctrine ORM 2.6 needs symfony/console 3.0 or higher. So Composer update won't work in this case, because Composer can't update Doctrine ORM to any higher version than 2.5.14... So now I'm considering a few options and so could others who end up here as well:
|
@7ochem your reasoning is a bit flawed to me, you seem to be concerned about running php 7.2 after maintenance, but you are already running with unmaintained versions of Symfony and Doctrine for a long time, which should concern you even more imho. |
Upgrading S2 to S3 can certainly be a major task, but if you must run on PHP 7.2 that isn't really a bad option. There are people/providers out there that will still support it. WHM/cPanel still let you run old PHP versions though don't patch the EOL ones. However if you add CloudLinux you will get security patches, way back to PHP 4.4 or something insane like that. You could also use the Sury repository if you're running on Debian (or derivatives), this chap seems to port in patches quite regularly. -- Certainly a viable option if you really don't need anything PHP 7.3+ that can't be provided with a polyfill. |
Bug Report
Summary
Just started to test our software against php7.3. We're using symfony, when it clears the cache we get a RuntimeException as follows. The issue being this line of code
Current behavior
How to reproduce
I started a docker container that has php 7.3 RC1. docker run -it gnat42/centos7-php73:latest and pulled in our symfony project. composer install -o. It failed on the cache clear step.
Expected behavior
No errors.
The text was updated successfully, but these errors were encountered: