Skip to content

Commit

Permalink
Merge pull request #57 from Opencast-Moodle/update/403
Browse files Browse the repository at this point in the history
Update for Moodle 4.3 and PHP 8.2
  • Loading branch information
NinaHerrmann authored Nov 14, 2023
2 parents d4ad278 + 65feb71 commit 3c45310
Show file tree
Hide file tree
Showing 84 changed files with 1,027 additions and 519 deletions.
11 changes: 11 additions & 0 deletions classes/local/api_testable.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ class api_testable extends api {
/** @var string version api version to apply for */
public $version = '1.9.0';

/** @var string the username. */
private string $username;
/** @var string the password. */
private string $password;
/** @var string the timeout. */
private string $timeout;
/** @var string the connecttimeout. */
private string $connecttimeout;
/** @var string the baseurl. */
private string $baseurl;

/**
* Constructor of the Opencast Test API.
*
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moodle/tool_opencast",
"require-dev": {
"elan-ev/opencast-api": "^1.3"
"elan-ev/opencast-api": "^1.5"
}
}
73 changes: 35 additions & 38 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit8ba2ca4e105ea351f7cb241590a7de7e::getLoader();
41 changes: 14 additions & 27 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;

/** @var ?string */
private $vendorDir;

Expand Down Expand Up @@ -109,7 +106,6 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}

/**
Expand Down Expand Up @@ -429,8 +425,7 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
includeFile($file);

return true;
}
Expand Down Expand Up @@ -560,26 +555,18 @@ private function findFileWithExtension($class, $ext)

return false;
}
}

/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
}
Loading

0 comments on commit 3c45310

Please sign in to comment.