Skip to content

Getting started

Installation

Start with the core Fast Forward packages, then compose the services your application needs.

Package fast-forward/framework Format Documentation reference

Before you start

The documented framework example requires PHP 8.3 or higher and Composer. Work in your PHP project's directory.

Check the release you intend to use

Requirements can change between releases. The framework README used for this reference supplies the installation and bootstrap examples below.

1. Install with Composer

Add the framework metapackage to your project:

Terminal
composer require fast-forward/framework

Composer resolves the package's declared dependencies. Keep the generated lock file with your application's normal dependency workflow.

2. Compose the core services

Pass the framework provider's class name to the container factory. The example then retrieves the response factory, event dispatcher, and clock through their interfaces.

PHP · bootstrap example
<?php

declare(strict_types=1);

use FastForward\Framework\ServiceProvider\FrameworkServiceProvider;
use Psr\Clock\ClockInterface;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Http\Message\ResponseFactoryInterface;

use function FastForward\Container\container;

require __DIR__ . '/vendor/autoload.php';

$container = container(FrameworkServiceProvider::class);

$responseFactory = $container->get(ResponseFactoryInterface::class);
$dispatcher = $container->get(EventDispatcherInterface::class);
$clock = $container->get(ClockInterface::class);
A foundation for your application

This example creates the container and obtains services. Add application behavior through the relevant components and their documented contracts.

Choose your next step

Use the package repository to explore the provider and component documentation. Keep the responsibility of each dependency clear as your application grows.

fast-forward/framework

An aggregate metapackage that brings the core stack together through one service-provider entry point.

Explore the framework repository