refactor: centralny autoloader, Shared\Email i Shared\Security

- Utworzono autoload/autoloader.php (hybrydowy PSR-4 + legacy)
- Zmigrowano 7 entry pointów do centralnego autoloadera
- Dodano PSR-4 mapowanie w composer.json (Domain, Shared, Admin, Frontend)
- Utworzono Shared\Email\Email (PHPMailer, migracja z Helpers)
- Utworzono Shared\Security\CsrfToken (random_bytes + hash_equals)
- Wrappery w Helpers delegują do nowych klas
- Zaktualizowano docs/PROJECT_STRUCTURE.md
- Inicjalizacja PAUL (.paul/) z roadmapą 19 faz refaktoryzacji

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-04 17:28:01 +02:00
parent 9b31ce0d16
commit 3325eaf44c
21 changed files with 1217 additions and 180 deletions

View File

@@ -1,19 +1,6 @@
<?php
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING );
function __autoload_my_classes( $classname )
{
$q = explode( '\\' , $classname );
$c = array_pop( $q );
// 1. Legacy: class.ClassName.php
$f = 'autoload/' . implode( '/' , $q ) . '/class.' . $c . '.php';
if ( file_exists( $f ) ) { require_once( $f ); return; }
// 2. PSR-4: ClassName.php
$f = 'autoload/' . implode( '/' , $q ) . '/' . $c . '.php';
if ( file_exists( $f ) ) require_once( $f );
}
spl_autoload_register( '__autoload_my_classes' );
require_once __DIR__ . '/autoload/autoloader.php';
date_default_timezone_set( 'Europe/Warsaw' );
require_once 'config.php';