softlivery/softwork

SoftWork is an API-first framework for internet applications

Maintainers

Package info

bitbucket.org/softlivery/softwork.php

Homepage

Issues

pkg:composer/softlivery/softwork

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

v2.1.0 2026-02-28 17:16 UTC

This package is auto-updated.

Last update: 2026-03-21 18:55:39 UTC


README

Lightweight API-first framework primitives used by the Contact Center Platform.

What this project owns

  • Routing (SoftWork\\Routing\\Router)
  • HTTP handler lifecycle (SoftWork\\Handler\\HttpHandler)
  • Request bootstrap and proxy/PSR-7 bridge (SoftWork\\Http\\RequestFactory)
  • Runtime config loading (SoftWork\\Config\\ConfigManager)
  • API response rendering (SoftWork\\EventListener\\RenderResponseListener + SoftWork\\Render\\JsonRender)
  • Supporting utilities (event dispatcher, error handlers)

v2.0.0 breaking changes

  • Smarty/template rendering was removed from the active runtime contract.
  • SoftWork\\Http\\Response::$template was removed.
  • HTML/template-based responses are no longer part of framework behavior.
  • Legacy static HTML assets and template files were removed from repository runtime paths.
  • html/ is now a minimal API bootstrap surface (index.php, .htaccess).
  • Default startup no longer loads runtime config from sw_parameters.
  • Default startup no longer bootstraps ORM/DB connections (SoftWork\\DB\\ORM removed).
  • Legacy SoftWork\\OAuth2\\* module was removed from framework source.
  • Repository-local Docker scaffolding (.docker/, docker-compose.yml) was removed.

Migration from v1.x

  1. Remove assignments to Response::$template.
  2. Return payloads via Response::set() / Response::replace().
  3. Ensure consumers treat SoftWork responses as JSON (application/json).
  4. Move any HTML/template rendering to consumer applications, not framework core.
  5. Pass runtime config overrides in memory via HttpManager::run($root, $routes, $configOverrides).
  6. If consumer startup relied on SoftWork\\DB\\ORM::configure(), move DB bootstrap to the consumer application.
  7. If consumer code imported SoftWork\\OAuth2\\*, migrate to consumer-owned OAuth implementation.

Quick start

composer install
cp .env.example .env

Quality gate

composer validate --strict
composer quality-gate

Optional local coverage run:

composer test-coverage

Documentation

Versioning

Current release version is stored in VERSION.