symfony-cmf / media-bundle

UNMAINTAINED - Minimalistic interfaces to handle media in the context of the CMF
http://cmf.symfony.com/
30 stars 40 forks source link

increase minimum PHP version to 5.3.9 #76

Closed lsmith77 closed 10 years ago

lsmith77 commented 11 years ago
PHP Fatal error:  Can't inherit abstract function Symfony\Cmf\Bundle\MediaBundle\HierarchyInterface::getParent() (previously declared abstract in Doctrine\ODM\PHPCR\HierarchyInterface) in /var/www/cmf-sandbox/vendor/symfony-cmf/media-bundle/Symfony/Cmf/Bundle/MediaBundle/Doctrine/Phpcr/File.php on line 15

see the note on http://www.php.net/manual/en/language.oop5.interfaces.php

or do we try to hack around this?

dbu commented 11 years ago

what distros still use php < 5.3.9? debian squeeze did, but wheezy has been out for half a year now.

the problem is that we need to duplicate the HierarchyInterface to avoid hard dependency on phpcr-odm just for one interface. none of those 2 can extend the other one. could we have a meta-interface we use with the phpcr-odm models that extends both interfaces - would that work around the bug?

stof commented 11 years ago

@dbu no, if both interfaces are requiring the method, making another interface extend both will trigger the same fatal error on 5.3 (except it would do it in the child interface)

awildeep commented 11 years ago

@lsmith77 if your statement of "PHP 5.3 is EOL anyway, right?" (from twitter) is where you want to be, why not set a minimum of 5.4.x? And provide limited support for 5.3.x for people who manually change the setting back to 5.3.9+?

I find projects too hesitant to move on get stuck in the past. CMF is fairly new tech, supporting unsupported code will become an issue at some point.

lsmith77 commented 11 years ago

Well as soon as we increase the requirement in the composer.json we make it imho needlessly hard. But we indeed have other problems with PHP 5.3 with this Bundle, as the stream API is also flaky causing segfaults in the test suite: https://travis-ci.org/symfony-cmf/MediaBundle

awildeep commented 11 years ago

Do you have any official policy for what revisions of PHP you are going to try and use? Maybe make a policy about this and remove "support" for older versions by setting a suggested minimum PHP version somewhere?

lsmith77 commented 11 years ago

so far we have tried to simply support all the versions of PHP that Symfony2 itself supports. However we failed to include 5.3.3 in our travis setup, which explains how this didn't get caught.

dbu commented 11 years ago

according to http://distrowatch.com/table.php?distribution=redhat the current redhat is still at 5.3.3 the annoying thing if we up the requirement in just this bundle is that this would make symfony-cmf/symfony-cmf also not install on < 5.3.9

all in all i think the best is to add a "suggest" for now, saying that if you want to use this with phpcr-odm you most likely want 5.4 but at least 5.3.9.

Crell commented 11 years ago

For reference, Drupal is targeting 5.3.10 to avoid bugs in earlier versions.

rmsint commented 11 years ago

+1 for adding a suggested minimum php version.

dbu commented 10 years ago

thanks lukas!