Download the PHP package waffle-commons/skeleton without Composer

On this page you can find all versions of the php package waffle-commons/skeleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package skeleton

Waffle Ecosystem Logo

๐Ÿฆ Waffle Skeleton

The official starting point for building robust, secure, and high-performance applications with the Waffle Ecosystem.

Minimum PHP Version Waffle Ecosystem

Release: 0.1.0-beta7  |  PHP 8.5+ ยท FrankenPHP worker mode

Welcome to the Waffle Skeleton, the official starting point for building robust, secure, and high-performance applications with the Waffle Ecosystem.

This skeleton is not just a folder structure; it is a Production-Grade Boilerplate pre-configured with:

๐Ÿš€ Installation

Prerequisites

Create a New Project

Until 1.0.0, every Waffle release is a beta, and Composer offers only stable releases unless you name a version. Name the one you want:

The setup scripts run on the way: .env is created from .env.example with its secrets generated, and var/ is initialised.

With Docker only (no PHP or Composer on your machine): download the script at the release you want, read it, then run it. It runs the same composer create-project in the official Composer image, pinned by digest, as your own user.

Without the script, the same thing in one command (the Composer image lacks the redis and yaml extensions; your application's image installs them):

๐Ÿณ Docker Environment

Waffle is Cloud-Native by design. We provide two distinct environments managed via a single Dockerfile.

1. Development Mode (dev)

Optimized for Developer Experience (DX).

Start the Dev Server:

Your application is now available at: ๐Ÿ‘‰ https://localhost (Accept the self-signed certificate auto-generated by Caddy).

2. Production Mode (prod)

Optimized for Performance and Security.

Test the Production Build locally:

Production needs APP_SECRET and WAFFLE_AUTH_SECRET (32 bytes or more): without them, docker compose stops and names the missing variable, and the kernel would refuse to boot anyway. The CSRF signing key derives from APP_SECRET; set WAFFLE_CSRF_SECRET only to impose a key of your own. Locally, Compose reads them from your .env; in a real deployment, inject them from your CI/CD or secret store, never from a committed file.

๐Ÿ“‚ Directory Structure

A Waffle application follows a strict but simple structure:

๐Ÿ› ๏ธ Configuration

Environment Variables (.env)

Waffle ships a native DotEnv parser (no third-party dependency). When you run create-project, a .env file is automatically created from .env.example with generated secrets: APP_SECRET and WAFFLE_AUTH_SECRET (32 random bytes each, in hex). WAFFLE_CSRF_SECRET stays empty, since the CSRF key derives from APP_SECRET. composer install does the same when .env is missing, so a fresh clone of your project gets its own.

Variable Description
APP_ENV dev (debug enabled) or prod (optimized).
APP_DEBUG true displays detailed stack traces. false renders JSON errors.
APP_SECRET Root secret of the application, 32 bytes or more, generated by create-project. The CSRF signing key derives from it (HKDF-SHA256, App\Factory\SecretFactory::csrf()) unless WAFFLE_CSRF_SECRET is set, so every worker and replica that shares it signs with the same key. Required in prod.
WAFFLE_CSRF_SECRET Optional 32+ byte signing key for stateless HMAC CSRF tokens (Beta-1 / SEC-01), used instead of the key derived from APP_SECRET. In prod, a value shorter than 32 bytes aborts boot, as does the absence of both; non-prod falls back to the derived key, then to a per-process random one.
WAFFLE_AUTH_SECRET 32+ byte shared HMAC-SHA256 secret for the Universal Authentication Bridge (RFC-021). Signs X-Wfl-Assert-User identity assertions and validates the demo HS256 JWTs. In prod, a missing or short value aborts boot (fail-closed). Never derived from APP_SECRET: the services of the bridge share it.
SERVER_NAME The domain name used by Caddy (e.g., example.com or localhost).
DB_HOST / DB_PORT Database host and port consumed by waffle.database.* (RFC-022).
DB_NAME Database / schema name.
DB_USER / DB_PASSWORD Database credentials. Override from your orchestrator in production.

โš  Precedence: OS env wins over .env. AppKernelFactory merges your .env with the live process environment (Docker environment:, Kubernetes env:, shell exports, etc.) via array_merge((new DotEnv($root))->load(), getenv()). Because array_merge is rightmost-wins on string keys, the OS value beats .env on collision. If you edit .env and the change doesn't take effect, check whether the same variable is exported by your shell or docker-compose.yml โ€” that export will silently override .env. This matches the Twelve-Factor convention. See documentation/how-to/configuration.md for the merge rules and the type-normalization foot-gun around APP_DEBUG/DEBUG.

Framework Config (config/app.yaml)

Waffle uses native YAML parsing (via PECL extension) for blazing-fast configuration loading.

The shipped config/app.yaml also wires log (PSR-3 channel) and cache (PSR-16 adapter) โ€” see the file for the full, commented set.

Security defaults (Beta-4)

The skeleton ships the canonical Beta-4 middleware pipeline out of the box:

This means every controller action you write is, by default, subject to:

The outbound HTTP client is hardened too: default-on SSRF protection (SEC-02) resolves โ†’ validates โ†’ pins every target host and refuses private/reserved addresses, with waffle.security.ssrf.allowed_hosts whitelisting trusted internal backends.

See the framework docs at waffle-commons/documentation for the full design rationale.

๐Ÿ—ƒ๏ธ Database & Migrations

Waffle ships a lightweight SQL migration runner (RFC-022, via waffle-commons/data). Database access is configured under waffle.database in config/app.yaml (credentials from the DB_* env vars), and the connection pool + runner are wired in src/Factory/AppKernelFactory.php and registered in bin/waffle as db:migrate, db:status and db:rollback, next to the make:migration scaffolder.

From the project root, create a version, write its SQL, then apply the pending ones:

Each migration runs in its own transaction and is recorded in a waffle_migrations table, so re-runs skip already-applied scripts; a script that holds only comments is refused, never recorded. The skeleton ships a sample migrations/Version2026053101_CreateUsersTable.sql and its down script to get you started. See the Database Migrations how-to for the full workflow and the transactional-DDL caveat on MySQL, MariaDB and Oracle.

๐Ÿ“– API Documentation (OpenAPI)

waffle-commons/openapi (a development dependency) describes your routes and their #[Dto] bodies as an OpenAPI 3.1 document, with no hand-written YAML:

In debug mode only, the application also serves /_docs (Swagger UI) and /_docs/openapi.json (the document generated from the routes at that moment); ApiDocsFactory mounts them, and production, which refuses debug mode, never does. The #[OA\Operation], #[OA\Response] and #[OA\Property] attributes from Waffle\Commons\Contracts\OpenApi\Attribute add summaries, tags, extra responses and field descriptions; see the openapi README.

๐Ÿ‘ฉโ€๐Ÿ’ป Usage Example

1. Create a Service

Create src/Service/Greeter.php:

2. Create a Controller

Create src/Controller/HelloController.php. Waffle uses Attributes for routing.

Go to https://localhost/greet/Developer. You should see your JSON response!

๐Ÿงช Running Tests

The skeleton comes with PHPUnit pre-configured.

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE.md file for details.


All versions of skeleton with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-redis Version *
ext-yaml Version *
ext-zend-opcache Version *
waffle-commons/async Version self.version
waffle-commons/auth Version self.version
waffle-commons/cache Version self.version
waffle-commons/config Version self.version
waffle-commons/console Version self.version
waffle-commons/container Version self.version
waffle-commons/contracts Version self.version
waffle-commons/data Version self.version
waffle-commons/error-handler Version self.version
waffle-commons/event-dispatcher Version self.version
waffle-commons/http Version self.version
waffle-commons/http-client Version self.version
waffle-commons/log Version self.version
waffle-commons/pipeline Version self.version
waffle-commons/routing Version self.version
waffle-commons/runtime Version self.version
waffle-commons/security Version self.version
waffle-commons/telemetry Version self.version
waffle-commons/utils Version self.version
waffle-commons/waffle Version self.version
web-auth/webauthn-lib Version ^5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package waffle-commons/skeleton contains the following files

Loading the files please wait ...