Doctrinebundle: Minimal supported PHP version confusion

Created on 16 Feb 2018  路  11Comments  路  Source: doctrine/DoctrineBundle

I'm just updating dependencies via Composer and going through all packages with minor version updates. I can be sure that Composer won't install any packages with PHP version requirement greater than 5.6.19 because I have this clause in composer.json:

    "config": {
        "platform": {
            "php": "5.6.19"
        }
    },

I can see Updating doctrine/doctrine-bundle (1.6.13 => 1.8.1) so here I am, looking at what happened in version updates of 1.7.0 and I can read:

Require PHP 7.1 #668

What? Let's look at PHP versions in composer.json in the master branch then:

        "php": "^5.5.9|^7.0",

What? Ok, let's look at what #668 changed in composer.json:

-        "php": ">=5.5.9",
+        "php": "^7.1",

What is going on here? Can someone tell me what PHP version does this bundle support in version 1.8.1?

All 11 comments

Both 1.8.0 and 1.8.1 seem to use ^5.5.9|^7.0:

Then the @doctrine/team-symfony-integration wanted to rollback due to Symfony's LTS support.

To be honest, I don't think that supporting <7.2.0 is sensible for new minor releases, as we're already over-over-over-over-overloaded with maintenance work.

Thanks for this answer. I find it a little bit weird, but OK. I'd suggest to also remove https://github.com/doctrine/DoctrineBundle/blob/master/Changelog.md since it's out dated and it was the first file I looked into. When I didn't find there the versions Composer used I discovered https://github.com/doctrine/DoctrineBundle/releases

@escopecz send a PR to update CHANGELOG.md

@Ocramius I don't see why supporting PHP <7.2.0 is considered harder for you: there is no code in this bundle which has different code paths for older PHP versions.
On the other hand, dropping support for PHP 7.1 while the userbase are still using it means that they will ask you to keep maintaining multiple versions of the bundle in parallel to backport bug fixes.

@stof the less I have on my plate, the more weekend I have for my own stuff: it's that simple.

@Ocramius same for me. But my point of view is that maintaining 2 versions of the bundle is more work than keeping support for PHP 7.1 in the bundle (as this has no cost at all today)

Generally, restricting supported version ranges at EVERY minor release is something I support and strongly encourage for everyone's sanity. There is absolutely no reason to support older version of packages. Yes, we do test --prefer-lowest --prefer-stable, but that 螖version should be as tiny as possible.

This has two nice side-effects:

  • bugs are easier to isolate
  • bugs in newer versions are detected more eagerly, as more people jump onto newer versions of dependencies too
  • pushes the ecosystem forward

This is the usual reminder that @doctrine/doctrinecore does NOT provide LTS support, as we can't afford to do that in first place, but also because we don't want to. A business model with no revenue stream is not a business model.

maintaining 2 versions of the bundle

This simply doesn't happen: we maintain the newest version, and that's the end of the story. Same applies for DBAL, ORM, MongoDB ODM, etc.

Changelog removed: https://github.com/doctrine/DoctrineBundle/pull/781

Changing a supported PHP version is a breaking change in my opinion. It should go only into major versions.

Changing a supported PHP version is a breaking change in my opinion. It should go only into major versions.

No, and we discussed this and went into detail at http://doctrine-project.org/2017/07/25/php-7.1-requirement-and-composer.html

Haha, I'm not the only one who thinks that :D

I don't understand why is simpler to do a minor version which confuses many people or do a major version that everybody will clearly understand. You could save time writing up the article and answering the same questions over and over.

Bumping major version just means that all other packages will need updating to support newer versions of our package, which is a major issue.

Was this page helpful?
0 / 5 - 0 ratings