Browse Source

Remove BC for tilde operator, fixes #328

Jordi Boggiano 11 năm trước cách đây
mục cha
commit
6cead85225
1 tập tin đã thay đổi với 0 bổ sung7 xóa
  1. 0 7
      src/Packagist/WebBundle/Package/Updater.php

+ 0 - 7
src/Packagist/WebBundle/Package/Updater.php

@@ -291,13 +291,6 @@ class Updater
             $links = array();
             foreach ($data->{$opts['method']}() as $link) {
                 $constraint = $link->getPrettyConstraint();
-                if (false !== strpos($constraint, '~')) {
-                    $constraint = str_replace(array('[', ']'), '', $link->getConstraint());
-                    $constraint = preg_replace('{(\d\.\d)(\.0)+(?=$|,|-)}', '$1', $constraint);
-                    $constraint = preg_replace('{([><=,]) }', '$1', $constraint);
-                    $constraint = preg_replace('{(<[0-9.]+)-dev}', '$1', $constraint);
-                }
-
                 if (false !== strpos($constraint, ',') && false !== strpos($constraint, '@')) {
                     $constraint = preg_replace_callback('{([><]=?\s*[^@]+?)@([a-z]+)}i', function ($matches) {
                         if ($matches[2] === 'stable') {