borschphp / borsch-skeleton
A Borsch Framework skeleton application to kick start development.
Requires
- php: ^8.1
- ext-json: *
- ext-libxml: *
- ext-pdo: *
- ext-simplexml: *
- borschphp/application: ^1
- borschphp/chef: ^1
- borschphp/template: ^0
- filp/whoops: ^2
- laminas/laminas-diactoros: ^3
- latte/latte: ^3
- monolog/monolog: ^2
- vlucas/phpdotenv: ^v5.1
Requires (Dev)
- pestphp/pest: ^2.6
- dev-master
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 0.6.0
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4
- 0.3
- 0.2
- 0.1.1
- 0.1.0
- dev-optims
- dev-debuss-patch-2
- dev-debuss-patch-1
- dev-frankenphp
- dev-minor-improvments
- dev-testing
- dev-better-demo-skeleton
- dev-paas-compatibility
- dev-switch-to-pest
- dev-diactoros-v3
This package is auto-updated.
Last update: 2024-10-17 15:36:23 UTC
README
Borsch Skeleton
Keep it simple.
About Borsch Skeleton
Sometimes, you don't need an overkill solution like Laravel or Symfony.
Borsch is a simple and efficient PSR-15 micro framework made to kick start your web app or API development by using the tools you prefer, and provides minimal structure and facilities to ease your development.
It natively features :
- Dependency Injection Container
- Router
- Request Handlers and Middlewares
- Environment Variables
- Error Handling
- Listeners
Can be enriched with :
- ORM
- Templating
- Anything else you want
The framework is built around a PSR-11 Container, therefore everything is made around interfaces.
If something is not at your taste, you can implement your own logic without having to modify everything.
Get started
Via composer :
composer create-project borschphp/borsch-skeleton [your-app-name]
Web servers
Instructions below will start a server on http://0.0.0.0:8080.
PHP Built-in web server
After installation, you can run the application in development with the command :
php -S 0.0.0.0:8080 -t ./public/ ./public/server.php
# or use the shortcut
composer serve
Docker Compose
Or you can use docker-compose
to run the app with docker :
docker-compose up -d
Lando
Or you can also use lando to run the app with docker :
lando start
FrankenPHP
You can spin up a FrankenPHP docker container of the app with :
docker run \
-v $PWD:/app \
-p 80:8080 -p 443:443 -p 443:443/udp \
dunglas/frankenphp
Worker
A script is available at public/worker.php
to run the app with a FrankenPHP worker :
docker run \ -e FRANKENPHP_CONFIG="worker ./public/worker.php" \ -v $PWD:/app \ -p 80:8080 -p 443:443 -p 443:443/udp \ dunglas/frankenphp
Documentation
An extended documentation is available here.
Notes
Borsch Framework is heavily inspired by Mezzio and Laravel, only it is a much simpler and lightweight implementation.
Do not hesitate to check Mezzio and Laravel out 😉 .
License
The package is licensed under the MIT license. See License File for more information.