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
6 changes: 3 additions & 3 deletions .github/workflows/check-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Check coding standards
on: [push, pull_request]

jobs:
psalm:
php-cs-fixer:
name: Check coding standards
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -15,7 +15,7 @@ jobs:
with:
coverage: "none"
ini-values: memory_limit=-1,apc.enable_cli=1,zend.assertions=1
php-version: "7.4"
php-version: "8.1"
tools: flex

- name: Install dependencies
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: PHPStan Static analysis

on: [push, pull_request]

jobs:
psalm:
name: PHPStan
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
ini-values: memory_limit=-1,apc.enable_cli=1,zend.assertions=1
php-version: "8.1"
tools: flex

- name: Install dependencies
run: composer install

- name: "Restore result cache"
uses: actions/cache/restore@v4
with:
path: tmp # same as in phpstan.neon
key: "phpstan-result-cache-${{ github.run_id }}"
restore-keys: |
phpstan-result-cache-

- name: "Run PHPStan"
run: "vendor/bin/phpstan"

- name: "Save result cache"
uses: actions/cache/save@v4
if: always()
with:
path: tmp # same as in phpstan.neon
key: "phpstan-result-cache-${{ github.run_id }}"
25 changes: 0 additions & 25 deletions .github/workflows/psalm.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:
strategy:
matrix:
include:
- php: '8.4'
- php: '8.3'
- php: '8.2'
- php: '8.1'
- php: '8.0'
- php: '7.4'
fail-fast: false

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor/
/.php-cs-fixer.cache
/.phpunit.result.cache
/tmp
16 changes: 15 additions & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'concat_space' => ['spacing' => 'one'],
'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
'declare_strict_types' => true,
'ordered_imports' => [
'imports_order' => [
Expand All @@ -27,17 +29,29 @@
'no_useless_else' => true,
'no_useless_return' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_order' => ['order' => ['param', 'return', 'throws']],
'strict_param' => true,
'phpdoc_to_comment' => false,
'phpdoc_align' => false,
'yoda_style' => false,
'increment_style' => false,
'phpdoc_no_empty_return' => false,
'single_line_throw' => false,
'blank_line_before_statement' => false,
'phpdoc_separation' => [
'groups' => [
['Annotation', 'NamedArgumentConstructor', 'Target'],
['author', 'copyright', 'license'],
['category', 'package', 'subpackage'],
['property', 'property-read', 'property-write'],
['deprecated', 'link', 'see', 'since'],
['return', 'phpstan-return', 'param', 'phpstan-param'],
],
],
])
->setFinder(
Finder::create()
->in(__DIR__)
->exclude(['tmp', 'vendor'])
)
;
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
### [Unreleased]

There are next changes:
- Update minimum php version from 7.4 to 8.1
- Remove psalm, now phpstan is used

### [v0.5.1]

Expand Down
3 changes: 2 additions & 1 deletion bin/xdebug-proxy
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);
/**
* @author Mougrim <rinat@mougrim.ru>
*/
Expand Down Expand Up @@ -27,7 +29,6 @@ if (!$composerInstall) {
);
exit(1);
}
/** @noinspection PhpIncludeInspection */
require $composerInstall;
unset($composerInstall);

Expand Down
19 changes: 9 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
"description": "Xdebug (dbgp) proxy",
"type": "project",
"require": {
"php": ">=7.4",
"amphp/socket": "^0.10.8"
"php": ">=8.1",
"amphp/socket": "^2.3"
},
"require-dev": {
"ext-dom": "*",
"roave/security-advisories": "dev-latest",
"phpro/grumphp": "^1.5",
"friendsofphp/php-cs-fixer": "^3.5",
"phpunit/phpunit": "^9.0",
"amphp/log": "^1.0.0",
"vimeo/psalm": "^4.20"
},
"conflict": {
"amphp/parallel-functions": "=1.1.0"
"phpro/grumphp": "^2.9",
"friendsofphp/php-cs-fixer": "^3.64.0",
"phpunit/phpunit": "^10.5",
"amphp/log": "^2.0",
"phpstan/phpstan": "^2.0",
"jetbrains/phpstorm-attributes": "^1.2"
},
"license": "MIT",
"authors": [
Expand All @@ -38,6 +36,7 @@
},
"suggest": {
"ext-dom": "Required for parse XML by default",
"ext-pcntl": "Required for graceful stop daemon",
"amphp/log": "Required for write logs by default"
},
"config": {
Expand Down
Loading