Skip to content
Proyectos

Acerca de

Spiral Framework Skeleton HTTP Application: Queue, Console, Cycle ORM

Datos y análisis

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

Spiral Framework

Spiral Framework Web application skeleton

Documentation Discord Sponsor


A ready-to-run Web application on RoadRunner with Cycle ORM, Stempler templates, queues, cache, mailer, events, translations and sample pages. The installer rebuilds this branch on each release.

To pick only the components you need, install the application with the installer instead:

composer create-project spiral/app my-app

Get Started

The application needs PHP 8.2+ with the mbstring and sockets extensions.

git clone https://github.com/spiral/app.git my-app
cd my-app
composer install
cp .env.sample .env
php app.php encrypt:key -m .env
php app.php configure
composer rr:download
composer serve:dev

Open http://127.0.0.1:8080 in the browser.

Development

composer serve:dev
  • APP_ENV=local and debug mode: errors come with details and a stack trace.
  • The tokenizer, view and ORM schema caches are off: code changes apply after a worker restart, without clearing caches.
  • Buggregator Trap starts next to the application and receives what it sends.

Open the Trap web UI at http://127.0.0.1:5007; the Buggregator plugin for PhpStorm connects to the same port. The command points the application at Trap:

What Sent to Trap by
dump() and trap() VAR_DUMPER_FORMAT=server, VAR_DUMPER_SERVER=127.0.0.1:9912
Logs of the default channel MONOLOG_DEFAULT_CHANNEL=remote, MONOLOG_REMOTE_URL=127.0.0.1:9913
Emails MAILER_DSN=smtp://127.0.0.1:1025
Sentry events SENTRY_DSN=http://[email protected]:8000/1, with spiral/sentry-bridge installed
OpenTelemetry traces, logs and metrics OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318, OTEL_EXPORTER_OTLP_PROTOCOL=http/json, with spiral/otel-bridge installed

Production

composer serve
  • APP_ENV=prod, no debug mode and basic error verbosity: errors come without details.
  • The tokenizer, view and ORM schema caches are on; the command clears them before the start.

Both commands override the matching variables of .env. To run the application in production without Composer, set them in .env:

APP_ENV=prod
DEBUG=false
VERBOSITY_LEVEL=basic
TOKENIZER_CACHE_TARGETS=true
VIEW_CACHE=true
CYCLE_SCHEMA_CACHE=true
CYCLE_SCHEMA_WARMUP=true

Clear the caches after each deploy:

php app.php cache:clean

Explorar proyectos relacionados

Cargando…