This repository now includes Composer configuration and PSR-4 autoloading.
What's added
composer.json with:
php requirement ^8.3
PSR-4 autoload mapping: App\\ => src/
phpunit/phpunit as a dev dependency
src/Bootstrap.php (example PSR-4 class)
tests/BootstrapTest.php and phpunit.xml for running unit tests
index.php updated to conditionally require vendor/autoload.php
Quickstart ✅
Install dependencies:
composer install
Run tests:
composer test# or
vendor/bin/phpunit --configuration phpunit.xml
If you add new classes under src/, run:
composer dump-autoload
Notes / Next steps 💡
This repository currently contains procedural code and includes (inc/ files). To fully adopt PSR-4 I recommend gradually refactoring logic into namespaced classes under src/ and replacing manual include/require calls with dependency injection and Composer autoloading.
I can help migrate specific modules (database layer, thumbnail processing, etc.) into PSR-4 classes and add tests.