HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/apklausos/tests/check_autoloader.php
<?php

/**
 * Small script to make sure running `composer dump-autoload` does not change any files.
 * If it does, it means some vendor package was not added to git.
 *
 * @since 2020-03-10
 * @author LimeSurvey GmbH
 */

require_once __DIR__ . '/../vendor/autoload.php';

$packages = include(__DIR__ . '/../vendor/composer/autoload_classmap.php');

echo 'Checking all autoloaded classes...' . PHP_EOL;

foreach ($packages as $class => $file) {
    if (!class_exists($class)
        && !interface_exists($class)
        && !trait_exists($class)) {
        echo 'Autoloader broken: Could not load class/interface/trait ' . json_encode($class) . PHP_EOL;
        exit(1);
    }
}

// All good.
echo 'All good.' . PHP_EOL;
exit(0);