PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Upgrades/FreeUpgradeRegistry.php +8 -1 3.0.3 → 3.0.16 View file →
@@ -5,8 +5,9 @@
5 5 namespace Yatra\Upgrades;
6 6
7 7 use Yatra\Upgrades\Contracts\UpgradeStepInterface;
8 8 use Yatra\Upgrades\Versions\Upgrade_3_0_3;
9 +use Yatra\Upgrades\Versions\Upgrade_3_0_5;
9 10
10 11 /**
11 12 * Register Free upgrade steps (add a class per release when DB/data migration is required).
12 13 *
@@ -24,8 +25,9 @@
24 25 public static function allSteps(): array
25 26 {
26 27 return [
27 28 Upgrade_3_0_3::class,
29 + Upgrade_3_0_5::class,
28 30 ];
29 31 }
30 32
31 33 /**
@@ -39,10 +41,15 @@
39 41 $out[] = $class;
40 42 }
41 43 }
42 44
45 + // version_compare() with two args returns -1 / 0 / 1 — exactly
46 + // what usort wants. Passing '<=>' as the operator (legacy mistake)
47 + // throws a ValueError under PHP 8+ since '<=>' isn't in the
48 + // operator allowlist; pre-PHP 8 it silently returned null and
49 + // usort would have produced an unstable ordering anyway.
43 50 usort($out, static function (string $a, string $b): int {
44 - return version_compare($a::targetVersion(), $b::targetVersion(), '<=>');
51 + return version_compare($a::targetVersion(), $b::targetVersion());
45 52 });
46 53
47 54 return $out;
48 55 }