Skip to content

Commit

Permalink
Initial draft of Horde_Http_Server
Browse files Browse the repository at this point in the history
  • Loading branch information
ralflang committed Jul 16, 2021
1 parent f845a19 commit b5945e7
Show file tree
Hide file tree
Showing 51 changed files with 695 additions and 2,464 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ jobs:
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer install
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer require --dev horde/test dev-FRAMEWORK_6_0 horde/log dev-FRAMEWORK_6_0
- name: run phpunit
run: phpunit --bootstrap test/Horde/Controller/bootstrap.php test/Horde/Controller/
run: phpunit --bootstrap test/Horde/Http/Server/bootstrap.php test/Horde/Http/Server/

2 changes: 0 additions & 2 deletions .github/workflows/phpdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- master
- maintaina-composerfixed
- FRAMEWORK_6_0
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/update-satis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This is a basic workflow to help you get started with Actions

name: Update Satis

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- FRAMEWORK_6_0
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
run:
runs-on: ubuntu-20.04
steps:
- name: Setup github ssh key
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
- name: Setup uut dir
run: |
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
export UUT_DIR=$(pwd)
export WORK_DIR=~
export BIN_DIR="${WORK_DIR}/bin"
mkdir -p $BIN_DIR
git config --global user.name "PHPDOC CI Job"
git config --global user.email "[email protected]"
- name: Checkout
uses: actions/checkout@v2
- name: Checkout satis web dir
uses: actions/checkout@v2
with:
repository: maintaina-com/maintaina-com.github.io
token: ${{secrets.PHPDOC_TOKEN}}
path: "maintaina-com.github.io"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter
ini-values: post_max_size=512M, max_execution_time=3600
coverage: xdebug
tools: composer:v2
- name: Setup Github Token as composer credential
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Run Satis
run: |
export UUT_DIR=$(pwd)
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
export WORK_DIR=/home/runner/
export BIN_DIR="${WORK_DIR}/bin"
composer create-project composer/satis:dev-main
php satis/bin/satis build -vvv maintaina-com.github.io/satis.json maintaina-com.github.io/ horde/injector
cd maintaina-com.github.io
git add include/ index.html p2/ packages.json
git commit -m "Update for horde/injector"
git push
36 changes: 15 additions & 21 deletions .horde.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
---
id: Controller
name: Controller
full: Controller library
description: The controller part of an MVC system for Horde.
id: Http_Server
name: Http_Server
full: HTTP Request Handling Library adhering to PSR-15 standard. This evolved out of horde/controller.
description: A PSR-15 compatible Server/RequestHandler implementation with limited ties to the Horde Framework.
list: dev
type: library
homepage: https://www.horde.org/libraries/Horde_Controller
authors:
-
name: Mike Naberezny
user: mnaberez
email: [email protected]
active: false
role: lead
-
name: Chuck Hagenbuch
user: chuck
email: [email protected]
active: false
name: Ralf Lang
user: rlang
email: [email protected]
active: true
role: lead
version:
release: 3.0.0alpha4
api: 3.0.0alpha1
release: 1.0.0alpha1
api: 1.0.0alpha1
state:
release: alpha
api: alpha
Expand All @@ -30,13 +24,13 @@ license:
uri: http://www.horde.org/licenses/bsd
dependencies:
required:
php: ^7
php: ^7 || ^8
composer:
psr/http-server-middleware: ^1
psr/http-server-handler: ^1
horde/exception: ^3
horde/injector: ^3
horde/log: ^3
horde/support: ^3
horde/util: ^3
## is a psr-7 implementation
horde/http: ^3
optional:
composer:
horde/test: ^3
Expand Down
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Horde PSR-15 Server Middleware/RequestHandler implementation

The horde\http_server is an implementation of PSR-15. Together with horde\http, it provides all the necessary building blocks needed for a standalone website, a slim API microframework or for fullstack horde applications. The http_server library has evolved out of efforts to modernize the horde/controller library and accompanying core components.

## Usage

See examples/ folder


## Design goals

### MVP

- horde/http_server aims at having few dependencies and subdependencies.
- Keep all the deeper Horde relations somewhere else
- Strict, simple implementation of a PSR-15 (middleware standard) ecosystem
- Through horde\http, adhere to PSR-7 (request/response standard), PSR-17 (request/response factories) and PSR-18 (HTTP client)
- allow opening the Horde ecosystem to external middleware vendors (avoid NIH)

### Stretch Goals

- Support a PSR-3 logger (once we have one in the ecosystem)
- Passing external compliance tests (which?)

### Non-Goals

- Backward compatibility with horde/controller (that library should offer a wrapper middleware instead)
- Advanced Routing (Integration should be done either in the router library or in a router middleware package)
- horde/core integration (That should be the job of horde/core or a separate package)
- httplug extensions
30 changes: 12 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,39 @@
{
"minimum-stability": "dev",
"name": "horde/controller",
"description": "Controller library",
"name": "horde/http_server",
"description": "HTTP Request Handling Library adhering to PSR-15 standard. This evolved out of horde/controller.",
"type": "library",
"homepage": "https://www.horde.org/libraries/Horde_Controller",
"license": "BSD-2-Clause",
"authors": [
{
"name": "Mike Naberezny",
"email": "[email protected]",
"role": "lead"
},
{
"name": "Chuck Hagenbuch",
"email": "[email protected]",
"name": "Ralf Lang",
"email": "[email protected]",
"role": "lead"
}
],
"time": "2021-03-13",
"time": "2021-07-16",
"repositories": [
{
"type": "composer",
"url": "https://horde-satis.maintaina.com/"
}
],
"require": {
"php": "^7",
"php": "^7 || ^8",
"psr/http-server-middleware": "^1",
"psr/http-server-handler": "^1",
"horde/exception": "^3 || dev-FRAMEWORK_6_0",
"horde/injector": "^3 || dev-FRAMEWORK_6_0",
"horde/log": "^3 || dev-FRAMEWORK_6_0",
"horde/support": "^3 || dev-FRAMEWORK_6_0",
"horde/util": "^3 || dev-FRAMEWORK_6_0"
"horde/http": "^3 || dev-FRAMEWORK_6_0"
},
"require-dev": {},
"suggest": {
"horde/test": "^3 || dev-FRAMEWORK_6_0",
"ext-mbstring": "*",
"ext-zlib": "*"
},
"autoload": {
"psr-0": {
"Horde_Controller": "lib/"
"psr-4": {
"Horde\\Http\\Server\\": "src/"
}
}
}
140 changes: 0 additions & 140 deletions doc/Horde/Controller/CHANGES

This file was deleted.

Loading

0 comments on commit b5945e7

Please sign in to comment.