feat(core): PHP MVC skeleton from scratch (autoloader/router/PDO + tests + CI) #9
No reviewers
Labels
No labels
auto-merge
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AcadeNice/corentin_wakdo#9
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/p2-core-php"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Squelette applicatif PHP from-scratch (POO MVC, sans framework, sans Composer, autoloader PSR-4 manuel, PDO prepared statements).
Core (src/Core/) : Autoloader (namespace App\ -> src/), Config (getenv), Database (PDO, ERRMODE_EXCEPTION, EMULATE_PREPARES=false, lazy connect), Request, Response, Router ({param} + 404/405), Controller (base, heritage Cr 4.c.1).
Controllers : HealthController (GET /api/health -> JSON + COUNT(*) FROM category reel), HomeController (GET / -> vue). Front controller src/public/admin/index.php (remplace le stub).
Tooling sans Composer : PHPUnit (.phar) + tests Router/Config, phpstan.neon (niveau 6), job CI static-tests bascule en mode .phar (phpunit/phpstan epingles).
Verifie : php -l OK, PHPUnit 23 tests / 30 assertions OK, PHPStan niveau 6 -> 0 erreur, endpoint live /api/health -> {status:ok, db:ok, categories:9}, / -> 200, /api/nope -> 404, revue securite 7/7 (PDO prepared, strict_types, htmlspecialchars, pas de fuite, headers nosniff/noindex).
Namespace App\ conforme PROJECT_CONTEXT section 9 (decision validee).
Differe : auth (sessions + argon2id) + RBAC -> PR suivante.
Pour fusionner : label auto-merge (sinon relecture). Base : dev. Bloc 2 (Cr 4.c POO/heritage/namespaces, Cr 4.e anti-injection).