Phase 7 complete (5 plans): - 07-01: Performance (N+1→LEFT JOIN, static cache, DB indexes) - 07-02: Stability (SSL verification, cron throttle DB, migration 000014b) - 07-03: UX (orderpro_to_allegro disable, lista zamówień fixes, SSL hotfix) - 07-04: Tests (12 unit tests for AllegroTokenManager + AllegroOrderImportService) - 07-05: InPost ShipX API (natywny provider, workaround remap usunięty) Additional fixes: - 5 broken use-statements fixed across 4 files - vendor/ excluded from ftp-kr auto-upload - PHPUnit + dg/bypass-finals infrastructure Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
790 B
PHP
30 lines
790 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
$basePath = dirname(__DIR__);
|
|
$autoload = $basePath . '/vendor/autoload.php';
|
|
|
|
if (is_file($autoload)) {
|
|
require $autoload;
|
|
DG\BypassFinals::enable();
|
|
} else {
|
|
spl_autoload_register(static function (string $class) use ($basePath): void {
|
|
$prefixes = [
|
|
'App\\' => $basePath . '/src/',
|
|
'Tests\\' => $basePath . '/tests/',
|
|
];
|
|
|
|
foreach ($prefixes as $prefix => $directory) {
|
|
if (!str_starts_with($class, $prefix)) {
|
|
continue;
|
|
}
|
|
|
|
$relative = substr($class, strlen($prefix));
|
|
$file = $directory . str_replace('\\', '/', $relative) . '.php';
|
|
if (is_file($file)) {
|
|
require $file;
|
|
}
|
|
}
|
|
});
|
|
}
|