Search by

jield / framework

japaveh

A modular PHP framework built on top of Laminas, Doctrine, and other powerful libraries, designed to provide a flexible and scalable foundation for web applications.

v0.1.0-alpha.4 2026-11-29 18:20 UTC

This package is auto-updated.

Last update: 2026-11-29 20:10:46 UTC


README

A modular PHP framework built on Laminas, Doctrine, and Twig.

The migration and installation examples target 0.1.0-alpha.4. The release path is 0.x alpha → 0.x beta → 0.x RC → 1.0.0. Prerelease APIs and configuration can change. See the release policy and changelog.

Migrate an existing Laminas application

The standalone migration tool runs directly from a framework checkout with PHP 8.5 or newer. Start in the application's Git checkout, alongside its composer.json, and preview the changes before installing Jield.

git switch -c migrate-to-jield
jield_setup=$(mktemp -d)
git clone --depth 1 --branch main \
  https://github.com/jield-webdev/jield-framework.git "$jield_setup/framework"
php "$jield_setup/framework/tools/jield-migration/migrate.php" \
  --dry-run --report="$jield_setup/preview.json"

Review preview.json in the temporary directory, then apply the migration and inspect the resulting Git diff.

php "$jield_setup/framework/tools/jield-migration/migrate.php" \
  --apply --report="$jield_setup/applied.json"
git status --short
git diff

The tool adds the target framework version and its Composer settings, converts known Laminas classes and modules, and updates standard MVC bootstrap paths. Review applied.json for project-specific changes. If you get the package from Git, configure the repository as shown in the installation instructions.

Use PHP 8.4 or 8.5 to run Composer, or follow the PHP 8.6 Composer workflow.

composer validate --no-check-lock
composer update --dry-run --no-plugins --no-scripts

Once the dry run resolves, run composer update, clear generated application caches, and test the website and CLI command list (for example, vendor/bin/laminas list --raw). See the migration tool guide.

Install in another project

Run the application on PHP 8.4 or 8.5. Install the extensions required by Composer, including igbinary and redis (^6.0).

Merge these settings into the consuming application's root composer.json. Use composer init first if the application has no manifest.

{
  "minimum-stability": "dev",
  "prefer-stable": true,
  "require": {
    "jield/framework": "0.1.0-alpha.4",
    "laminas/laminas-stdlib": "4.0.x-dev as 3.22.0"
  }
}

For a Packagist installation, use a version listed in the registry. For a Git installation, add the repository that contains the matching tag to the application's root configuration. Configure Composer authentication separately for a private repository.

composer config repositories.jield-framework vcs https://github.com/jield-webdev/jield-framework.git

Install the package and update the lock file.

composer update

In an existing project with a lock file, limit the update to these packages with composer update jield/framework laminas/laminas-stdlib --with-all-dependencies.

The alpha needs development versions of several Laminas packages and Azure Blob Storage, plus Twig 4 alpha. The consuming application must allow these versions: a dependency's minimum-stability is ignored. The Stdlib alias must also be repeated in the application because inline aliases are root-only. An @alpha flag on jield/framework alone does not allow its development dependencies. prefer-stable keeps other packages on stable versions where constraints permit. Commit the application's lock file so deployments use the tested references.

For another alpha or the moving dev-main branch (0.1.x-dev), use the Stdlib alias from that version's composer.json.

When another library depends on this alpha, its final consuming application must carry the stability configuration, the Stdlib alias, and any custom repository settings too. Composer does not inherit those root settings from libraries.

Application bootstrap and PDF fonts

Load the framework bootstrap before creating the application. It loads Composer and registers the current Laminas compatibility adapters:

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

Composer does not execute scripts belonging to dependencies. Applications using PDF rendering should add these root scripts (adjust vendor/ if customized):

{
  "scripts": {
    "pdf-fonts": "@php vendor/jield/framework/bin/build-pdf-fonts.php",
    "post-install-cmd": [
      "@pdf-fonts"
    ],
    "post-update-cmd": [
      "@pdf-fonts"
    ]
  }
}

Run composer pdf-fonts once after adding the scripts. Font preparation downloads upstream font sources on its first run; later runs reuse generated fonts.

Logging

Enable Jield\Log\Module to use Monolog 3 through Psr\Log\LoggerInterface. See the logging guide for destinations, configuration, and migrating from laminas/laminas-log.

Development and releases

composer install
composer release:check

composer.lock records the dependencies tested by CI and releases; update it deliberately during development. It does not constrain dependencies in consuming projects and is excluded from distribution archives.

Run Composer in Docker

Build the images from the repository root. The Dockerfile defaults to PHP 8.4.

docker build --pull -t jield-composer:8.4 - < Dockerfile
docker build --pull --build-arg PHP_VERSION=8.5 -t jield-composer:8.5 - < Dockerfile
docker build --pull --build-arg PHP_VERSION=8.6 -t jield-composer:8.6 - < Dockerfile

Use any of these images with install, update, or another Composer command. Composer uses your local user and group IDs when writing to the mounted checkout.

docker run --rm -it --user "$(id -u):$(id -g)" \
  --mount "type=bind,source=$PWD,target=/app" jield-composer:8.4 install
docker run --rm -it --user "$(id -u):$(id -g)" \
  --mount "type=bind,source=$PWD,target=/app" jield-composer:8.6 update

The PHP 8.6 image tells Composer to ignore dependency PHP upper bounds. PHP minimums and extension requirements are still checked. When running Composer directly on PHP 8.6, use the same Composer option.

composer install --ignore-platform-req=php+
composer update --ignore-platform-req=php+

Tag a release

Add release notes under Unreleased or under the target version in CHANGELOG.md, then commit your changes on main. Set release_version to the version you plan to publish.

release_version=VERSION
composer release -- "$release_version" --dry-run
composer release -- "$release_version"
git push origin main

The dry run previews the changed files. The release command runs the same checks, commits the updated migration map, installation version, and release notes when needed, and creates an annotated local tag. After CI passes on main, publish the tag.

git push origin "refs/tags/v$release_version"

See the release guide for publishing and the 1.0.0 acceptance criteria.

Jield BV