mirror of
https://github.com/YahnisElsts/plugin-update-checker.git
synced 2025-10-04 02:02:05 +08:00
^ Except dependencies like Parsedown. The readme is now out of date. The legacy version of Parsedown was removed because we no longer need to support PHP versions older than 5.3. The stub file that loads ParsedownModern.php stays in place because it has the "class_exists" check.
34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace YahnisElsts\PluginUpdateChecker\v5p0;
|
|
|
|
use YahnisElsts\PluginUpdateChecker\v5\PucFactory as MajorFactory;
|
|
use YahnisElsts\PluginUpdateChecker\v5p0\PucFactory as MinorFactory;
|
|
|
|
require __DIR__ . '/Puc/v5p0/Autoloader.php';
|
|
new Autoloader();
|
|
|
|
require __DIR__ . '/Puc/v5p0/PucFactory.php';
|
|
require __DIR__ . '/Puc/v5/PucFactory.php';
|
|
|
|
//Register classes defined in this version with the factory.
|
|
foreach (
|
|
array(
|
|
'Plugin\\UpdateChecker' => Plugin\UpdateChecker::class,
|
|
'Theme\\UpdateChecker' => Theme\UpdateChecker::class,
|
|
|
|
'Vcs\\PluginUpdateChecker' => Vcs\PluginUpdateChecker::class,
|
|
'Vcs\\ThemeUpdateChecker' => Vcs\ThemeUpdateChecker::class,
|
|
|
|
'GitHubApi' => Vcs\GitHubApi::class,
|
|
'BitBucketApi' => Vcs\BitBucketApi::class,
|
|
'GitLabApi' => Vcs\GitLabApi::class,
|
|
)
|
|
as $pucGeneralClass => $pucVersionedClass
|
|
) {
|
|
MajorFactory::addVersion($pucGeneralClass, $pucVersionedClass, '5.0');
|
|
//Also add it to the minor-version factory in case the major-version factory
|
|
//was already defined by another, older version of the update checker.
|
|
MinorFactory::addVersion($pucGeneralClass, $pucVersionedClass, '5.0');
|
|
}
|
|
|