Verified Commit fcb86180 authored by Dave Long's avatar Dave Long
Browse files

Issue #3392814 by Spokje, longwave: testMinimumStabilityStrictness struggles with dev versions

parent 418e5a48
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -119,7 +119,12 @@ public function testMinimumStabilityStrictness() {
        continue;
      }

      $project_stability = VersionParser::parseStability($project['version']);
      // VersionParser::parseStability doesn't play nice with (mostly dev-)
      // versions ending with the first seven characters of the commit ID as
      // returned by "composer info". Let's strip those suffixes here.
      $version = preg_replace('/ [0-9a-f]{7}$/i', '', $project['version']);

      $project_stability = VersionParser::parseStability($version);
      $project_stability_order_index = $stability_order_indexes[$project_stability];

      $project_stabilities[$project['name']] = $project_stability;