PluginProbe ʕ •ᴥ•ʔ
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More / 2.9.0
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More v2.9.0
2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.7 2.6.8 2.6.5 2.6.4 2.6.3 2.6.2 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1 1.1.1 1.1.2 1.2.0 2.0 2.1.0 2.1.1 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1
reviews-feed / class / Common / Services / Upgrade / RoutineManagerService.php
reviews-feed / class / Common / Services / Upgrade Last commit date
Routines 1 month ago RoutineManagerService.php 1 month ago
RoutineManagerService.php
51 lines
1 <?php
2
3 namespace SmashBalloon\Reviews\Common\Services\Upgrade;
4
5 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\AddUniqueReviewIndexRoutine;
6 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\BackfillWebsiteUrlRoutine;
7 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\LanguageCacheUpgradeRoutine;
8 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\RegisterWebsiteRoutine;
9 use Smashballoon\Stubs\Services\ServiceProvider;
10 use SmashBalloon\Reviews\Common\Container;
11 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\UpgradeRoutine;
12 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\V1Routine;
13 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\ClearReviewsDuplicateRoutine;
14 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\NewUserRatingRoutine;
15 use SmashBalloon\Reviews\Common\Services\Upgrade\Routines\ReconcileMigratedLicenseRoutine;
16
17 class RoutineManagerService extends ServiceProvider{
18 /**
19 * a list of upgrade routines to be executed,
20 * keep the correct order, newer is always at the end of the list.
21 * @var UpgradeRoutine[]
22 */
23 private $routines = [
24 V1Routine::class,
25 RegisterWebsiteRoutine::class,
26 LanguageCacheUpgradeRoutine::class,
27 ClearReviewsDuplicateRoutine::class,
28 NewUserRatingRoutine::class,
29 AddUniqueReviewIndexRoutine::class,
30 // SMASH-1281 — backfill website_url for installs that registered before
31 // this URL was tracked, so proactive migration detection works for the
32 // entire install base, not just future registrations.
33 BackfillWebsiteUrlRoutine::class,
34 // SMASH-1585 — one-shot recovery for sites silently wedged by a
35 // pre-2.6.3 migration fork (local license_status 'valid' but the relay
36 // has no active license for the new URL). Runs after the backfill so
37 // website_url is settled first. One ping, flips to Activate on a
38 // confirmed mismatch; never auto-reactivates.
39 ReconcileMigratedLicenseRoutine::class,
40 ];
41
42 public function register()
43 {
44 $container = Container::get_instance();
45
46 foreach ($this->routines as $routine) {
47 $container->get($routine)->register();
48 }
49 }
50 }
51