Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into new-frontend
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Module/Profiler/Struct/Profile.php
  • Loading branch information
roxblnfk committed Jan 10, 2025
2 parents 51cf8c2 + f59e224 commit dcdec54
Show file tree
Hide file tree
Showing 58 changed files with 1,009 additions and 804 deletions.
69 changes: 1 addition & 68 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,73 +124,6 @@ jobs:
run: .phive/composer-normalize --ansi --dry-run

coding-standards:
timeout-minutes: 4
runs-on: ${{ matrix.os }}
concurrency:
cancel-in-progress: true
group: coding-standards-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
strategy:
matrix:
os:
- ubuntu-latest
php-version:
- '8.1'
dependencies:
- locked
permissions:
contents: write
steps:
- name: ⚙️ Set git to use LF line endings
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: 🛠️ Setup PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets
ini-values: error_reporting=E_ALL
coverage: none

- name: 📦 Check out the codebase
uses: actions/[email protected]

- name: 🛠️ Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: 🤖 Validate composer.json and composer.lock
run: composer validate --ansi --strict

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/[email protected]

- name: ♻️ Restore cached dependencies installed with composer
uses: actions/[email protected]
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-

- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
uses: wayofdev/gh-actions/actions/composer/[email protected]
with:
dependencies: ${{ matrix.dependencies }}

- name: 🛠️ Prepare environment
run: make prepare

- name: 🚨 Run coding standards task
run: composer cs:fix
env:
PHP_CS_FIXER_IGNORE_ENV: true

- name: 📤 Commit and push changed files back to GitHub
uses: stefanzweifel/[email protected]
with:
commit_message: 'style(php-cs-fixer): lint php files and fix coding standards'
branch: ${{ github.head_ref }}
commit_author: 'github-actions <[email protected]>'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master
67 changes: 67 additions & 0 deletions .github/workflows/refactoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---

on: # yamllint disable-line rule:truthy
pull_request:
paths:
- 'src/**'
- 'tests/**'
- 'composer.*'
push:
paths:
- 'src/**'
- 'tests/**'
- 'composer.*'

name: ⚙️ Refactoring

jobs:
rector:
timeout-minutes: 4
runs-on: ${{ matrix.os }}
concurrency:
cancel-in-progress: true
group: rector-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
php-version:
- '8.2'
dependencies:
- locked
steps:
- name: 📦 Check out the codebase
uses: actions/[email protected]

- name: 🛠️ Setup PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets, opcache, pcntl, posix
ini-values: error_reporting=E_ALL
coverage: none

- name: 🛠️ Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: 🤖 Validate composer.json and composer.lock
run: composer validate --ansi --strict

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/[email protected]

- name: ♻️ Restore cached dependencies installed with composer
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-

- name: 📥 Install "${{ matrix.dependencies }}" dependencies
uses: wayofdev/gh-actions/actions/composer/[email protected]
with:
dependencies: ${{ matrix.dependencies }}

- name: 🔍 Run static analysis using rector/rector
run: composer refactor:ci
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
uses: wayofdev/gh-actions/actions/composer/[email protected]

- name: ♻️ Restore cached dependencies installed with composer
uses: actions/cache@v4.0.2
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
uses: wayofdev/gh-actions/actions/composer/[email protected]

- name: ♻️ Restore cached dependencies installed with composer
uses: actions/cache@v4.0.2
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
Expand Down
24 changes: 8 additions & 16 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@

declare(strict_types=1);

use WayOfDev\PhpCsFixer\Config\ConfigBuilder;
use WayOfDev\PhpCsFixer\Config\RuleSets\ExtendedPERSet;

require_once 'vendor/autoload.php';

$config = ConfigBuilder::createFromRuleSet(new ExtendedPERSet())
->inDir(__DIR__ . '/bin')
->inDir(__DIR__ . '/src')
->inDir(__DIR__ . '/tests')
->exclude([
__DIR__ . '/src/Test/Proto',
])
->addFiles([__FILE__])
->getConfig();

$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/php-cs-fixer.cache');

return $config;
return \Spiral\CodeStyle\Builder::create()
->include(__DIR__ . '/bin')
->include(__DIR__ . '/src')
->include(__DIR__ . '/tests')
->include(__DIR__ . '/rector.php')
->include(__FILE__)
->exclude(__DIR__ . '/src/Test/Proto')
->build();
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

## 1.11.1 (2024-12-07)

## What's Changed
* Resolve PHP 8.4 deprecations by @roxblnfk in https://github.com/buggregator/trap/pull/144


**Full Changelog**: https://github.com/buggregator/trap/compare/1.11.0...1.11.1

## 1.11.0 (2024-09-25)

## What's Changed
* Add config for main loop interval and socket polling interval by @roxblnfk in https://github.com/buggregator/trap/pull/141


**Full Changelog**: https://github.com/buggregator/trap/compare/1.10.2...1.11.0

## 1.10.2 (2024-09-24)

## What's Changed
* Fix Psalm issues by @Kaspiman in https://github.com/buggregator/trap/pull/131
* Add Rector to CI by @Kaspiman in https://github.com/buggregator/trap/pull/133
* Separate polling intervals for sockets by @roxblnfk in https://github.com/buggregator/trap/pull/140

## New Contributors
* @Kaspiman made their first contribution in https://github.com/buggregator/trap/pull/131

**Full Changelog**: https://github.com/buggregator/trap/compare/1.10.1...1.10.2

## 1.10.1 (2024-06-23)

## What's Changed
* Better HTTP/SMTP Multipart parsing by @roxblnfk in https://github.com/buggregator/trap/pull/128


**Full Changelog**: https://github.com/buggregator/trap/compare/1.10.0...1.10.1

## 1.10.0 (2024-06-20)

## What's Changed
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Trap includes:

**Table of content:**

* [Installation](#installation)
* [Overview](#overview)
* [Usage](#usage)
* [Contributing](#contributing)
* [License](#license)
- [Installation](#installation)
- [Overview](#overview)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)

## Installation

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

<!--
[![Contributors](https://contrib.rocks/image?repo=buggregator/trap)](https://github.com/buggregator/trap/graphs/contributors)
Quality badges:
[![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)
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"require-dev": {
"dereuromark/composer-prefer-lowest": "^0.1.10",
"ergebnis/phpunit-slow-test-detector": "^2.14",
"friendsofphp/php-cs-fixer": "^3.54",
"google/protobuf": "^3.23",
"pestphp/pest": "^2.34",
"phpstan/extension-installer": "^1.3",
Expand All @@ -67,9 +66,10 @@
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "^10.5",
"rector/rector": "^1.1",
"roxblnfk/unpoly": "^1.8.1",
"vimeo/psalm": "^5.11",
"wayofdev/cs-fixer-config": "^1.4"
"spiral/code-style": "*",
"vimeo/psalm": "^5.11"
},
"suggest": {
"ext-simplexml": "To load trap.xml",
Expand Down
Loading

0 comments on commit dcdec54

Please sign in to comment.