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
34 changes: 24 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Unset local path repositories
run: composer config --unset repositories

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
Expand All @@ -39,42 +42,53 @@ jobs:
${{ runner.os }}-php-${{ matrix.php }}-

- name: Install dependencies
run: composer install --prefer-dist --no-progress
run: composer update --prefer-dist --no-progress

- name: Run test suite
run: composer test

lint:
name: Code Style (PHP-CS-Fixer)
name: PHP ${{ matrix.php }} Code Style (PHP-CS-Fixer)
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: ${{ matrix.php }}
extensions: mbstring, json
coverage: none
tools: php-cs-fixer

- name: Run PHP-CS-Fixer
run: php-cs-fixer fix --dry-run --diff --verbose
run: php-cs-fixer fix --dry-run --diff --verbose --allow-risky=yes

static-analysis:
name: Static Analysis (PHPStan)
name: PHP ${{ matrix.php }} Static Analysis (PHPStan)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Unset local path repositories
run: composer config --unset repositories

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: ${{ matrix.php }}
extensions: mbstring, json, pcntl, posix, zlib, sockets
coverage: none

Expand All @@ -83,12 +97,12 @@ jobs:
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-8.3-
${{ runner.os }}-php-${{ matrix.php }}-

- name: Install dependencies
run: composer install --prefer-dist --no-progress
run: composer update --prefer-dist --no-progress

- name: Run PHPStan
run: composer phpstan
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Phunkie Streams #

[![CI](https://github.com/phunkie/streams/actions/workflows/ci.yml/badge.svg)](https://github.com/phunkie/streams/actions)
[![Latest Stable Version](https://poser.pugx.org/phunkie/streams/v/stable)](https://packagist.org/packages/phunkie/streams)
[![Total Downloads](https://poser.pugx.org/phunkie/streams/downloads)](https://packagist.org/packages/phunkie/streams)
[![License](https://poser.pugx.org/phunkie/streams/license)](https://packagist.org/packages/phunkie/streams)
Expand Down
44 changes: 27 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,22 @@
"description": "Functional Streams for PHP",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Marcello Duarte",
"email": "marcello.duarte@gmail.com"
}
],
"require": {
"php": ">=8.2",
"phunkie/phunkie": "^0.11.3",
"phunkie/effect": "^0.4.1"
"php": "^8.2 || ^8.3 || ^8.4",
"phunkie/phunkie": "^1.0",
"phunkie/effect": "^1.0"
},
"require-dev": {
"pestphp/pest": "^2.35",
"phpstan/phpstan": "^2.0",
"friendsofphp/php-cs-fixer": "^3.90",
"phunkie/phpstan": "^1.0"
},
"autoload": {
"psr-4": {
Expand All @@ -17,12 +29,6 @@
"src/Functions/common.php"
]
},
"authors": [
{
"name": "Marcello Duarte",
"email": "marcello.duarte@gmail.com"
}
],
"suggest": {
"ext-parallel": "Required for parallel processing capabilities",
"ext-mbstring": "Required for encoding and decoding text in various encodings",
Expand All @@ -32,16 +38,20 @@
"ext-zlib": "Required for stream compression and decompression",
"ext-sockets": "Required for socket communication in networking applications"
},
"require-dev": {
"pestphp/pest": "^2.35",
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "^3.0"
},
"scripts": {
"test": "pest",
"phpstan": "phpstan analyse",
"cs-fix": "php-cs-fixer fix",
"cs-check": "php-cs-fixer fix --dry-run --diff"
"phpstan": "phpstan analyse --memory-limit=512M",
"cs-fix": "php-cs-fixer fix --allow-risky=yes",
"cs-check": "php-cs-fixer fix --dry-run --diff --allow-risky=yes",
"lint": [
"@cs-check",
"@phpstan"
],
"test-all": "scripts/test-all-versions.sh",
"check": [
"@lint",
"@test"
]
},
"config": {
"bin-dir": "bin",
Expand Down
Loading