Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/renovate.json export-ignore
/.laminas-ci.json export-ignore
/phpunit.xml.dist export-ignore
/test/ export-ignore
/clover.xml export-ignore

# Force our line endings to be LF, even for Windows
* text eol=lf
# Set certain files to be binary
*.png binary
*.jpg binary
*.gif binary
*.tgz binary
*.zip binary
*.tar.gz binary
*.ttf binary
*.svg binary
*.dia binary
*.xcf binary
31 changes: 31 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Continuous Integration"

on:
pull_request:
push:
branches:
tags:

jobs:
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1

qa:
name: QA Checks
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
15 changes: 15 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Automatic Releases"

on:
milestone:
types:
- "closed"

jobs:
release:
uses: laminas/workflow-automatic-releases/.github/workflows/release-on-milestone-closed.yml@1.x
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
ORGANIZATION_ADMIN_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/.php-cs-fixer.cache
/.phpunit.cache
/.phpunit.result.cache
/.phpstan-cache
/phpstan.neon
/phpbench.json
/clover.xml
/coveralls-upload.json
/phpunit.xml
/vendor/
/.vscode
*:Zone.Identifier
12 changes: 12 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"additional_checks": [
{
"name": "PhpStan",
"job": {
"php": "8.2",
"dependencies": "latest",
"command": "composer require --dev phpstan/phpstan && vendor/bin/phpstan analyse"
}
}
]
}
52 changes: 52 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
use Webware\CodingStandard\Webware1x0Set;
use Webware\CodingStandard\WebwareCopyRight;

$composerData = json_decode(
file_get_contents('composer.json'),
true,
512,
);

return (new Config())
->registerCustomRuleSets([
new Webware1x0Set(),
new WebwareCopyRight(
packageName: $composerData['name'],
authorName: $composerData['authors'][0]['name'],
authorEmail: $composerData['authors'][0]['email'],
),
])
->setParallelConfig(ParallelConfigFactory::detect()) // @TODO 4.0 no need to call this manually
->setRiskyAllowed(true)
->setRules([
'@Webware/copyright-header' => true,
'@Webware/coding-standard-1.0' => true,
])
// 💡 by default, Fixer looks for `*.php` files excluding `./vendor/` - here, you can groom this config
->setFinder(
(new Finder())
// 💡 root folder to check
->in(__DIR__)
->notPath([
])
->exclude([
'.github',
'stubs',
])
// 💡 additional files, eg bin entry file
// ->append([__DIR__.'/bin-entry-file'])
// 💡 folders to exclude, if any
// ->exclude([/* ... */])
// 💡 path patterns to exclude, if any
// ->notPath([/* ... */])
// 💡 extra configs
// ->ignoreDotFiles(false) // true by default in v3, false in v4 or future mode
// ->ignoreVCS(true) // true by default
);
65 changes: 65 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "webware/webware-core",
"description": "Contracts and utilities for the webware-* ecosystem.",
"license": "BSD-3-Clause",
"keywords": [
"webware",
"core",
"mezzio"
],
"authors": [
{
"name": "Joey Smith",
"email": "jsmith@webinertia.net",
"role": "Developer"
}
],
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"fig/http-message-util": "^1.1",
"psr/http-message": "^2.0",
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^13.0.0",
"roave/security-advisories": "dev-master",
"webware/coding-standard": "^0.1.0"
},
"autoload": {
"psr-4": {
"Webware\\Core\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Webware\\CoreTest\\": "test/unit/",
"Webware\\CoreIntegrationTest\\": "test/integration/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"scripts": {
"check-all": [
"@cs-check",
"@sa",
"@test"
],
"cs-check": "vendor/bin/php-cs-fixer check",
"cs-fix": "vendor/bin/php-cs-fixer fix",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"sa": "vendor/bin/phpstan analyse --memory-limit=256M",
"sa-gen-baseline": "vendor/bin/phpstan analyse --memory-limit=256M --generate-baseline",
"sa-verbose": "vendor/bin/phpstan analyse --memory-limit=256M -vv",
"serve": [
"Composer\\Config::disableProcessTimeout",
"php -S 0.0.0.0:8080 -t public/"
]
}
}
Loading