Download the PHP package pcf/addendum-framework without Composer

On this page you can find all versions of the php package pcf/addendum-framework. 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 addendum-framework

PCF Addendum Framework

PHP 8.5 CI Quality Docker CodeQL codecov Security

PCF Addendum is a PHP 8.5 API framework for PSR-based HTTP applications. It provides attribute-driven routing, request validation, authentication helpers, middleware composition, CLI commands and compiled HTTP route metadata for production runtimes.

Contents

Requirements

Framework Overview

Addendum applications are built from small action classes. Routes, validation rules, middleware, rate limits and cache policies are declared with PHP attributes on endpoint classes. Runtime handling uses PSR-7 requests/responses and PSR-15 middleware.

Core capabilities:

Design Principles

First Steps

Install dependencies:

Create an application class:

Create an action:

Create an HTTP entry point:

Use the bundled CLI during development:

Build compiled HTTP cache when running with compiled routes:

JWT Signing

JWT tokens are signed with OpenSSL RSA keys using RS256. Generate a key pair outside the public web root:

Store absolute paths in .env:

JWT_PRIVATE_KEY_PASSPHRASE may stay empty for an unencrypted private key. REQUEST_SIGNATURE_SECRET is separate from JWT signing and is used only by request signature HMAC validation.

The FrankenPHP dev app exposes GET /dev/auth/token to verify that a request is correctly authorized and signed. Import dev/postman/addendum-dev-auth.postman_collection.json, set access_token, fingerprint and request_signature_secret, then run the Inspect Authorized Token request. The signing script is also available as dev/js/sign-request.js.

Application token hashes are stored in the database and cached for 300 seconds under auth:application_token:{jti}. Validation compares the cached or database hash with hash_equals(). Revoke application tokens through token_revocations with an issue-time cutoff:

User sessions and refresh tokens

Each login creates a session ID (sid) shared by its access and refresh tokens. Every token has its own jti. Refreshing issues a new pair with new token IDs while retaining the session ID.

Endpoint Accepted token Behavior
Protected API endpoints User/admin access token, or application token where permitted Auth always rejects refresh tokens
POST /v1/session-refreshes user_refresh only RefreshAuth validates the refresh token and session revocation; no access token is required
DELETE /v1/sessions/current User/admin access token Revokes all access and refresh tokens belonging to this session; other sessions remain active

Refresh and logout requests retain request-signature, fingerprint and nonce/replay checks. To sign a refresh request with dev/js/sign-request.js, set its access_token variable to the refresh token for that request.

Apply pending migrations before running the updated application:

Migration 009_session_revocations.sql adds session revocations, retires obsolete SQL function overloads left by the original schema, and keeps the four-argument token validator for existing SQL callers. Authentication uses the new five-argument validator with sid. Previously issued user/admin/refresh tokens without sid are rejected and require a new login. Application tokens do not require sid.

Session revocation records are retained by cleanup_expired_revocations(): their creation date alone does not prove that all tokens in a refreshable session have expired.

The PostgreSQL-backed session lifecycle test can run against a dedicated database with all migrations applied. It rolls back its changes:

Development Server

The repository includes a Docker Compose development stack with FrankenPHP, PostgreSQL and Redis.

Build and start the server:

Open http://localhost:8080.

Health check:

Run PHPUnit through the test profile:

Run database pgTAP tests through the database profile:

Tests and Code Quality

Install development dependencies with composer install, then run:

composer quality runs PHP_CodeSniffer, PHPStan and PHPMD sequentially and stops at the first failing check. PHPUnit and the dependency audit are separate commands.

The analyzers check all framework source code in src/:

Tool Configuration Rules
PHP_CodeSniffer 4 phpcs.xml.dist Full PSR-12; both errors and warnings fail the check
PHPStan 2 phpstan.neon.dist Level 6, targeting PHP 8.5
PHPMD 3 phpmd.xml Full codesize, design and unusedcode rulesets

Checks are strict from the first run: there are no baselines or excluded source files. PHP_CodeSniffer ignores suppression annotations and PHPMD runs with --strict. Existing violations also fail the checks.

GitHub Actions runs PHPUnit, coverage, dependency auditing and three independent quality jobs on pull requests and pushes to main. Workflows can also be started manually. Quality jobs report file annotations and continue independently when another analyzer fails. Composer Audit additionally runs every Monday to catch newly published advisories.

CodeQL uses Action v4 to analyze GitHub Actions workflow security. CodeQL does not support PHP; PHP source analysis is provided by PHPStan, PHP_CodeSniffer and PHPMD. CodeQL also runs every Monday.

Documentation


All versions of addendum-framework with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-ds Version *
ext-openssl Version *
ext-pdo Version *
ext-pdo_pgsql Version *
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/log Version ^3.0
psr/simple-cache Version ^3.0
psr/container Version ^2.0
guzzlehttp/psr7 Version ^2.7
symfony/finder Version ^7.0
symfony/dotenv Version ^7.0
symfony/console Version ^7.0
symfony/process Version ^7.0
web-token/jwt-framework Version ^3.3
predis/predis Version ^2.2
dragonmantank/cron-expression Version ^3.3
monolog/monolog Version ^3.0
nette/php-generator Version ^4.1
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 pcf/addendum-framework contains the following files

Loading the files please wait ...