MagicFramework is based on PSR-7 HTTP message, and I chose to work with the guzzlehttp/psr7 implemention.
The structure of the Router
is inspired by symfony/routing
- Tests are made with PHPUnit
- I chose php-text-template as a very simple template engine
- The webserver configuration is made with
docker
anddocker-compose
here - Routes are defined in the config/routing.yaml
- Services and Controllers are defined in the Kernel::__construct
This requires either php >= 7.3
and composer
or docker
Clone the repository:
git clone git@github.com:AlexDpy/MagicFramework.git && cd MagicFramework
If you have Docker:
make install
If you have php/composer:
composer install --dev
If you have Docker:
make test
If you have php:
php vendor/bin/phpunit
Following command will use the port 8080
. Please make sure it is not already used on your machine.
If you have Docker:
make serve
If you have php:
php -S 0.0.0.0:8080 -t public/
Then open your browser on http://localhost:8080/