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
11 changes: 0 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
version: 2

updates:

- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
commit-message:
include: "scope"
prefix: "composer"
labels:
- "enhancement"
versioning-strategy: "widen"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
include: "scope"
prefix: "github-actions"
labels:
- "enhancement"
102 changes: 102 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: "CI"

on:
pull_request:
push:
branches:
- "master"

env:
INI_VALUES: zend.assertions=1,error_reporting=-1

jobs:
composer-json-lint:
name: "Lint composer.json"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"

steps:
- uses: "actions/checkout@v3"
- uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: "${{ env.INI_VALUES }}"
tools: composer-normalize,composer-require-checker,composer-unused
- uses: "ramsey/composer-install@v2"

- run: "composer validate --strict"
- run: "composer-normalize --dry-run"
- run: "composer-require-checker check --config-file=$(realpath composer-require-checker.json)"
- run: "composer-unused"

tests:
name: "Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.2"
code-coverage:
- "none"
include:
- php-version: "8.1"
code-coverage: "pcov"

steps:
- uses: "actions/checkout@v3"
- uses: "shivammathur/setup-php@v2"
with:
coverage: "${{ matrix.code-coverage }}"
php-version: "${{ matrix.php-version }}"
ini-values: "${{ env.INI_VALUES }}"
- uses: "ramsey/composer-install@v2"

- run: "vendor/bin/phpunit --no-coverage --no-logging"
if: ${{ matrix.code-coverage == 'none' }}
timeout-minutes: 1

- run: "vendor/bin/phpunit"
if: ${{ matrix.code-coverage != 'none' }}
timeout-minutes: 1

coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"

steps:
- uses: "actions/checkout@v3"
- uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: "${{ env.INI_VALUES }}"
- uses: "ramsey/composer-install@v2"

- run: "vendor/bin/php-cs-fixer fix --verbose --dry-run --diff"

static-analysis:
name: "Static Analysis"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"

steps:
- uses: "actions/checkout@v3"
- uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: "${{ env.INI_VALUES }}"
- uses: "ramsey/composer-install@v2"

- run: "vendor/bin/phpstan analyse --no-progress --error-format=github"
181 changes: 0 additions & 181 deletions .github/workflows/integrate.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.idea/
/coverage/
/.phpunit.cache/
/vendor/
/coverage/
/.php-cs-fixer.cache
/.phpunit.result.cache
/composer.lock
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
CSFIX_PHP_BIN=PHP_CS_FIXER_IGNORE_ENV=1 php8.2
PHP_BIN=php8.2 -d zend.assertions=1
COMPOSER_BIN=$(shell command -v composer)

all: csfix static-analysis test
@echo "Done."

vendor: composer.json
composer update
composer bump
$(PHP_BIN) $(COMPOSER_BIN) update
$(PHP_BIN) $(COMPOSER_BIN) bump
touch vendor

.PHONY: csfix
csfix: vendor
vendor/bin/php-cs-fixer fix --verbose
$(CSFIX_PHP_BIN) vendor/bin/php-cs-fixer fix -v $(arg)

.PHONY: static-analysis
static-analysis: vendor
php -d zend.assertions=1 vendor/bin/phpstan analyse
$(PHP_BIN) vendor/bin/phpstan analyse $(PHPSTAN_ARGS)

.PHONY: test
test: vendor
php -d zend.assertions=1 vendor/bin/phpunit
$(PHP_BIN) vendor/bin/phpunit $(PHPUNIT_ARGS)
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# php-errorhandler-legacy

[![Latest Stable Version](https://img.shields.io/packagist/v/slam/php-errorhandler-legacy.svg)](https://packagist.org/packages/slam/php-errorhandler-legacy)
[![Integrate](https://github.com/Slamdunk/php-errorhandler-legacy/workflows/Integrate/badge.svg?branch=master)](https://github.com/Slamdunk/php-errorhandler-legacy/actions)
[![Downloads](https://img.shields.io/packagist/dt/slam/php-errorhandler-legacy.svg)](https://packagist.org/packages/slam/php-errorhandler-legacy)
[![Integrate](https://github.com/Slamdunk/php-errorhandler-legacy/workflows/CI/badge.svg)](https://github.com/Slamdunk/php-errorhandler-legacy/actions)

Crappy class to manage errors and exceptions
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"php": "~8.1.0 || ~8.2.0"
},
"require-dev": {
"phpstan/phpstan": "^1.9.6",
"phpstan/phpstan-phpunit": "^1.3.3",
"phpstan/phpstan-strict-rules": "^1.4.4",
"phpunit/phpunit": "^9.5.27",
"phpstan/phpstan": "^1.9.17",
"phpstan/phpstan-phpunit": "^1.3.4",
"phpstan/phpstan-strict-rules": "^1.4.5",
"phpunit/phpunit": "^10.0.7",
"slam/php-cs-fixer-extensions": "^3.3",
"slam/php-debug-r": "^1.7.0",
"symfony/console": "^6.2.3"
"symfony/console": "^6.2.5"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 4 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0"?>
<phpunit
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
verbose="true"
cacheDirectory=".phpunit.cache"
>
<coverage>
<include>
<directory suffix=".php">./lib</directory>
</include>
<report>
<clover outputFile="coverage/clover.xml" />
<html outputDirectory="coverage/html" />
<clover outputFile="coverage/clover.xml"/>
<html outputDirectory="coverage/html"/>
<text outputFile="php://stdout" showOnlySummary="true"/>
</report>
</coverage>
Expand Down
Loading