Skip to content
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 5.4 compatibility issues #5882

Closed
ic1011 opened this issue Jun 17, 2016 · 4 comments
Closed

PHP 5.4 compatibility issues #5882

ic1011 opened this issue Jun 17, 2016 · 4 comments
Assignees
Milestone

Comments

@ic1011
Copy link

ic1011 commented Jun 17, 2016

Getting Started

The above page says that Doctrine 2 is PHP 5.4+ compatible but in reality it is not.

The class Doctrine\Common\Proxy\ProxyGenerator contains the following code which requires PHP 5.5 and above:

    protected $placeholders = [
        'baseProxyInterface'   => Proxy::class, 
        'additionalProperties' => '',
    ];

PHP 5.5 - New features - class name

@Majkl578
Copy link
Contributor

You can explicitly require older doctrine/common. Version 2.6 (current) requires 5:5+, older version PHP 2.5 requires PHP 5.4+.

@ic1011
Copy link
Author

ic1011 commented Jun 18, 2016

Okay. Thank you. Are they interchangeable? Should I expect any major drawbacks in the functionality?
I already have the Domain structure and I am just trying to use it on different machine where the PHP currently cannot be upgraded.

@Ocramius
Copy link
Member

Docs page indeed needs updating: specifically, removal of explicit requirements, since composer tells you those.
We could simplify it to something like "always use the latest stable version of PHP".

Anyway, this is typically caused by a composer update issued on a machine with newer PHP versions, and then deploying via composer install on a machine with older PHP versions (tip: don't do that, or specify a platform version in your composer.json).

If you want to help out with the wording, check getting-started.rst and edit it to reflect the wording that you'd prefer.

BreiteSeite added a commit to BreiteSeite/doctrine2 that referenced this issue Jun 20, 2016
Ocramius added a commit that referenced this issue Jun 20, 2016
#5882 recommend using latest stable PHP version in the getting started guide
@Ocramius Ocramius self-assigned this Aug 9, 2016
@Ocramius Ocramius added this to the 2.6.0 milestone Aug 9, 2016
@Ocramius
Copy link
Member

Ocramius commented Aug 9, 2016

Was handled by @BreiteSeite in #5892

@Ocramius Ocramius closed this as completed Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants