softlivery/softwork 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

softlivery/softwork

最新稳定版本:v2.1.0

Composer 安装命令:

composer require softlivery/softwork

包简介

SoftWork is an API-first framework for internet applications

README 文档

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.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固