?️
·
·
?️?️️ ·
?️?️ · · · ?️
?️?️️
Easy to use Event & Middleware Framework, powered by popular micro-libraries and based on PSRs.
Supports PHP 8.1+ and composer
Quick-Jump into develop:
composer create-project orbiter/satellite-app ./satellite
cd ./satellite
# create `.env` file,
# add for local-dev: `env=local`
touch .env
# start PHP Dev Server
cd web && php -S localhost:3333 ./index.php display_errors=0
# or point the Apache Root to `/web/`
# or point the NGINX entry to `/web/index.php`
# or use Docker: `docker-compose up`Open your browser on: http://localhost:3333
Look into files:
config folder with app config and wiringassemble.php composer autoload, gathers configurations and creates the system modules from that configlaunch.php runs assemble() and dispatches the SatelliteApp eventapp folder with a basic commands and route handler structureInstall app skeleton and dependencies with composer in folder satellite:
# with composer installed on machine:
composer create-project orbiter/satellite-app satellite
# with composer and docker on windows:
docker run -it --rm -v %cd%/satellite:/app composer create-project orbiter/satellite-app .
docker run -it --rm -v %cd%/satellite:/app composer create-project --stability=dev orbiter/satellite-app:dev-master .
# with composer and docker on unix:
docker run -it --rm -v `pwd`/satellite:/app composer create-project orbiter/satellite-app .
docker run -it --rm -v `pwd`/satellite:/app composer create-project --stability=dev orbiter/satellite-app:dev-master .
# go into project folder:
cd ./satelliteRun with:
Setup correct user rights, then start and open http://localhost:3333
chmod +x start.sh
./start.shExecute defined commands.
php cli <command> <..attr> <..b>Includes configurable PHP Dockerfile with:
pdo)For docker image configs see files in _docker and _nginx.
Start containers specified in docker-compose.yml, then open: http://localhost:3333
docker-compose up
# open shell in app container
docker-compose exec app sh
# run command in temporary worker container
docker-compose run --rm worker php cli demo
# run extra composer container on windows:
docker run -it --rm -v %cd%:/app composer dumpautoload
# run extra composer container on unix:
docker run -it --rm -v `pwd`:/app composer dumpautoload
# run tests with temporary `app` container:
docker-compose run -T --rm app sh -c "cd /var/www/html && ./vendor/bin/phpunit --testdox tests"
# running tests with a temporary `phpunit` in a prebuild container:
docker run -i --rm bemiteu/satellite-app:master sh -c "cd /var/www && wget -O phpunit https://phar.phpunit.de/phpunit-9.phar && chmod +x phpunit && cd html && /var/www/phpunit --testdox tests"On a web-server the web/index.php file serves as public entry point.
Apache: point server/vhost root to /web and use the included .htaccess
NGINX: example files in _nginx.
Use e.g. .env to add configuration.
Default's config includes:
env: if in production or not in production
prod it is assumed in the App (not the framework) that it is in production$_ENV['env'] === 'prod' to check for productiondev.editor with one value of PrettyPageHandler::EDITOR_* to link whoops "open file" with IDE/config/config.php - main config
/config/dependencies.php - definitions for PHP-DI/config/events.php - define app components flow/config/pipeline.php - setup PSR middlewares and pipelineThis app serves as mini-framework, with PSR powered libraries, ready-to-use Annotations and not much more.
It is build upon PSRs and popular, specialized packages implementing them or other great stuff.
monolog/monologrequire_once
{cache/filesystem-adapterFilesystemCachePoolNormalized for DoctrineCommonAnnotationsPsrCachedReader compatibilitynyholmpsr7PSR-15, PSR-17 and PSR-18php-di/php-di@Annotations, @var PHPDoc and Reflection supportorbiter/satelliteorbiter/satellite-responsecache/filesystem-adapternyholmpsr7guzzlehttp/guzzle? = included in
satellite-apptemplate
orbiter/satellite
orbiter/satellite-console
orbiter/satellite-response
equip/dispatch, PSR-11 compliantnyholm/psr7 and nyholm/psr7-servernarrowspark/http-emitterorbiter/satellite-route
orbiter/annotations-util
doctrine/annotations with cached reflectionsorbiter/satellite-whoops
$_ENV['env'] not prod (configurable in assemble.php)orbiter/satellite-config
orbiter/satellite-launch
SatelliteApp event data objectsorbiter/satellite-system
$config to a cached PSR containerA lot of work for APIs is done by PSR-15 HTTP Middleware, find more awesome middlewares.
There is no downloadable version - see Setup on how to install with composer.
We use composer as package manager, like in any modern PHP project.
Feel free to reach out for a training request.
This project is free software distributed under the MIT License.
By committing your code to the code repository you agree to release the code under the MIT License attached to the repository.
Maintained by Michael Becker