| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Yatra\Upgrades\Contracts; |
| 6 |
|
| 7 |
/** |
| 8 |
* One-time delta migration for a specific plugin release (not run on fresh installs at that version). |
| 9 |
*/ |
| 10 |
interface UpgradeStepInterface |
| 11 |
{ |
| 12 |
/** |
| 13 |
* Semver this step belongs to (e.g. "3.0.1"). The step runs when upgrading from below this to at or above it. |
| 14 |
*/ |
| 15 |
public static function targetVersion(): string; |
| 16 |
|
| 17 |
public static function shouldApply(string $fromVersion, string $toVersion): bool; |
| 18 |
|
| 19 |
public static function run(string $fromVersion, string $toVersion): void; |
| 20 |
|
| 21 |
/** |
| 22 |
* @return list<'init'|'admin_init'> |
| 23 |
*/ |
| 24 |
public static function runOnHooks(): array; |
| 25 |
} |
| 26 |
|