Skip to content

Commit dcdec54

Browse files
committed
Merge branch 'refs/heads/master' into new-frontend
# Conflicts: # src/Module/Profiler/Struct/Profile.php
2 parents 51cf8c2 + f59e224 commit dcdec54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1009
-804
lines changed

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -124,73 +124,6 @@ jobs:
124124
run: .phive/composer-normalize --ansi --dry-run
125125

126126
coding-standards:
127-
timeout-minutes: 4
128-
runs-on: ${{ matrix.os }}
129-
concurrency:
130-
cancel-in-progress: true
131-
group: coding-standards-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
132-
strategy:
133-
matrix:
134-
os:
135-
- ubuntu-latest
136-
php-version:
137-
- '8.1'
138-
dependencies:
139-
- locked
140127
permissions:
141128
contents: write
142-
steps:
143-
- name: ⚙️ Set git to use LF line endings
144-
run: |
145-
git config --global core.autocrlf false
146-
git config --global core.eol lf
147-
148-
- name: 🛠️ Setup PHP
149-
uses: shivammathur/setup-php@2.30.4
150-
with:
151-
php-version: ${{ matrix.php-version }}
152-
extensions: none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets
153-
ini-values: error_reporting=E_ALL
154-
coverage: none
155-
156-
- name: 📦 Check out the codebase
157-
uses: actions/checkout@v4.1.6
158-
159-
- name: 🛠️ Setup problem matchers
160-
run: |
161-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
162-
163-
- name: 🤖 Validate composer.json and composer.lock
164-
run: composer validate --ansi --strict
165-
166-
- name: 🔍 Get composer cache directory
167-
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
168-
169-
- name: ♻️ Restore cached dependencies installed with composer
170-
uses: actions/cache@v4.0.2
171-
with:
172-
path: ${{ env.COMPOSER_CACHE_DIR }}
173-
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
174-
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
175-
176-
- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
177-
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
178-
with:
179-
dependencies: ${{ matrix.dependencies }}
180-
181-
- name: 🛠️ Prepare environment
182-
run: make prepare
183-
184-
- name: 🚨 Run coding standards task
185-
run: composer cs:fix
186-
env:
187-
PHP_CS_FIXER_IGNORE_ENV: true
188-
189-
- name: 📤 Commit and push changed files back to GitHub
190-
uses: stefanzweifel/git-auto-commit-action@v5.0.1
191-
with:
192-
commit_message: 'style(php-cs-fixer): lint php files and fix coding standards'
193-
branch: ${{ github.head_ref }}
194-
commit_author: 'github-actions <github-actions@users.noreply.github.com>'
195-
env:
196-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129+
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master

.github/workflows/refactoring.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
paths:
6+
- 'src/**'
7+
- 'tests/**'
8+
- 'composer.*'
9+
push:
10+
paths:
11+
- 'src/**'
12+
- 'tests/**'
13+
- 'composer.*'
14+
15+
name: ⚙️ Refactoring
16+
17+
jobs:
18+
rector:
19+
timeout-minutes: 4
20+
runs-on: ${{ matrix.os }}
21+
concurrency:
22+
cancel-in-progress: true
23+
group: rector-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
strategy:
25+
fail-fast: true
26+
matrix:
27+
os:
28+
- ubuntu-latest
29+
php-version:
30+
- '8.2'
31+
dependencies:
32+
- locked
33+
steps:
34+
- name: 📦 Check out the codebase
35+
uses: actions/checkout@v4.1.7
36+
37+
- name: 🛠️ Setup PHP
38+
uses: shivammathur/setup-php@2.30.4
39+
with:
40+
php-version: ${{ matrix.php-version }}
41+
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets, opcache, pcntl, posix
42+
ini-values: error_reporting=E_ALL
43+
coverage: none
44+
45+
- name: 🛠️ Setup problem matchers
46+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
47+
48+
- name: 🤖 Validate composer.json and composer.lock
49+
run: composer validate --ansi --strict
50+
51+
- name: 🔍 Get composer cache directory
52+
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
53+
54+
- name: ♻️ Restore cached dependencies installed with composer
55+
uses: actions/cache@v4
56+
with:
57+
path: ${{ env.COMPOSER_CACHE_DIR }}
58+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
59+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
60+
61+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
62+
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
63+
with:
64+
dependencies: ${{ matrix.dependencies }}
65+
66+
- name: 🔍 Run static analysis using rector/rector
67+
run: composer refactor:ci

.github/workflows/static-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
5959

6060
- name: ♻️ Restore cached dependencies installed with composer
61-
uses: actions/cache@v4.0.2
61+
uses: actions/cache@v4
6262
with:
6363
path: ${{ env.COMPOSER_CACHE_DIR }}
6464
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
@@ -109,7 +109,7 @@ jobs:
109109
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
110110

111111
- name: ♻️ Restore cached dependencies installed with composer
112-
uses: actions/cache@v4.0.2
112+
uses: actions/cache@v4
113113
with:
114114
path: ${{ env.COMPOSER_CACHE_DIR }}
115115
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}

.php-cs-fixer.dist.php

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@
22

33
declare(strict_types=1);
44

5-
use WayOfDev\PhpCsFixer\Config\ConfigBuilder;
6-
use WayOfDev\PhpCsFixer\Config\RuleSets\ExtendedPERSet;
7-
85
require_once 'vendor/autoload.php';
96

10-
$config = ConfigBuilder::createFromRuleSet(new ExtendedPERSet())
11-
->inDir(__DIR__ . '/bin')
12-
->inDir(__DIR__ . '/src')
13-
->inDir(__DIR__ . '/tests')
14-
->exclude([
15-
__DIR__ . '/src/Test/Proto',
16-
])
17-
->addFiles([__FILE__])
18-
->getConfig();
19-
20-
$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/php-cs-fixer.cache');
21-
22-
return $config;
7+
return \Spiral\CodeStyle\Builder::create()
8+
->include(__DIR__ . '/bin')
9+
->include(__DIR__ . '/src')
10+
->include(__DIR__ . '/tests')
11+
->include(__DIR__ . '/rector.php')
12+
->include(__FILE__)
13+
->exclude(__DIR__ . '/src/Test/Proto')
14+
->build();

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Changelog
22

3+
## 1.11.1 (2024-12-07)
4+
5+
## What's Changed
6+
* Resolve PHP 8.4 deprecations by @roxblnfk in https://github.com/buggregator/trap/pull/144
7+
8+
9+
**Full Changelog**: https://github.com/buggregator/trap/compare/1.11.0...1.11.1
10+
11+
## 1.11.0 (2024-09-25)
12+
13+
## What's Changed
14+
* Add config for main loop interval and socket polling interval by @roxblnfk in https://github.com/buggregator/trap/pull/141
15+
16+
17+
**Full Changelog**: https://github.com/buggregator/trap/compare/1.10.2...1.11.0
18+
19+
## 1.10.2 (2024-09-24)
20+
21+
## What's Changed
22+
* Fix Psalm issues by @Kaspiman in https://github.com/buggregator/trap/pull/131
23+
* Add Rector to CI by @Kaspiman in https://github.com/buggregator/trap/pull/133
24+
* Separate polling intervals for sockets by @roxblnfk in https://github.com/buggregator/trap/pull/140
25+
26+
## New Contributors
27+
* @Kaspiman made their first contribution in https://github.com/buggregator/trap/pull/131
28+
29+
**Full Changelog**: https://github.com/buggregator/trap/compare/1.10.1...1.10.2
30+
31+
## 1.10.1 (2024-06-23)
32+
33+
## What's Changed
34+
* Better HTTP/SMTP Multipart parsing by @roxblnfk in https://github.com/buggregator/trap/pull/128
35+
36+
37+
**Full Changelog**: https://github.com/buggregator/trap/compare/1.10.0...1.10.1
38+
339
## 1.10.0 (2024-06-20)
440

541
## What's Changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ Trap includes:
2727

2828
**Table of content:**
2929

30-
* [Installation](#installation)
31-
* [Overview](#overview)
32-
* [Usage](#usage)
33-
* [Contributing](#contributing)
34-
* [License](#license)
30+
- [Installation](#installation)
31+
- [Overview](#overview)
32+
- [Usage](#usage)
33+
- [Contributing](#contributing)
34+
- [License](#license)
3535

3636
## Installation
3737

@@ -251,6 +251,8 @@ Buggregator Trap is open-sourced software licensed under the BSD-3 license.
251251

252252
<!--
253253
254+
[![Contributors](https://contrib.rocks/image?repo=buggregator/trap)](https://github.com/buggregator/trap/graphs/contributors)
255+
254256
Quality badges:
255257
256258
[![Tests Status](https://img.shields.io/github/actions/workflow/status/buggregator/trap/testing.yml?label=tests&style=flat-square)](https://github.com/buggregator/trap/actions/workflows/testing.yml?query=workflow%3Atesting%3Amaster)

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"require-dev": {
5959
"dereuromark/composer-prefer-lowest": "^0.1.10",
6060
"ergebnis/phpunit-slow-test-detector": "^2.14",
61-
"friendsofphp/php-cs-fixer": "^3.54",
6261
"google/protobuf": "^3.23",
6362
"pestphp/pest": "^2.34",
6463
"phpstan/extension-installer": "^1.3",
@@ -67,9 +66,10 @@
6766
"phpstan/phpstan-phpunit": "^1.3",
6867
"phpstan/phpstan-strict-rules": "^1.5",
6968
"phpunit/phpunit": "^10.5",
69+
"rector/rector": "^1.1",
7070
"roxblnfk/unpoly": "^1.8.1",
71-
"vimeo/psalm": "^5.11",
72-
"wayofdev/cs-fixer-config": "^1.4"
71+
"spiral/code-style": "*",
72+
"vimeo/psalm": "^5.11"
7373
},
7474
"suggest": {
7575
"ext-simplexml": "To load trap.xml",

0 commit comments

Comments
 (0)