Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      Note that version number with upper-case letters is not a correct PHP-standardized version number. Because of that the version_compare function might not work as you expected.
      Examples:
      var_dump(version_compare('2.1.0-dev', '2.1.0-beta', '<')); // expected: true
      var_dump(version_compare('2.1.0-DEV', '2.1.0-BETA', '<')); // expected: true
      var_dump(version_compare('2.1.0-DEV', '2.1.0-dev', '<')); // expected: false

      Output:
      bool(true)
      bool(false)
      bool(true)

      I've seen in the code version_compare checks such as
      version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')
      It's not big deal 'cause for example 2.2.0 is still > 2.2.0-DEV as well as 2.2.1, etc.
      See also https://bugs.php.net/bug.php?id=62586

        Activity

        Hide
        Alexander added a comment -

        As far as I can see it works for our use case. If you are experiencing real world problems feel free to re-open the issue.

        Show
        Alexander added a comment - As far as I can see it works for our use case. If you are experiencing real world problems feel free to re-open the issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Yaroslav Kiliba
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: