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
91 changes: 0 additions & 91 deletions .github/workflows/build.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Checks

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
checks:
name: Checks (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
steps:
- name: Checkout code
uses: actions/checkout@v5

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

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-

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

- name: Security audit
run: composer security-audit

- name: Composer normalize
run: composer composer-normalize-check

- name: PHP CodeSniffer
run: composer phpcs-check

- name: Rector
run: composer rector-check

- name: PHPStan
run: composer analyse

- name: Tests
run: composer test

runtime:
name: Runtime (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3']
steps:
- name: Checkout code
uses: actions/checkout@v5

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

- name: Validate composer.json
run: composer validate --strict --no-check-lock

# The development tools (pekral/*, PHPStan 2, Rector 2) require PHP 8.4+, so composer --no-dev
# still fails to resolve require-dev here. Resolve a dev-free manifest instead, so this step
# verifies exactly what a consumer on PHP 8.2 / 8.3 installs.
- name: Verify runtime dependencies resolve
run: |
php -r '$c = json_decode(file_get_contents("composer.json"), true); unset($c["require-dev"], $c["scripts"], $c["autoload-dev"]); file_put_contents("composer.runtime.json", json_encode($c, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));'
COMPOSER=composer.runtime.json composer update --no-interaction --no-progress --prefer-dist --no-plugins

- name: Lint shipped sources
run: find src -name '*.php' -print0 | xargs -0 -n1 php -l
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@
.DS_Store
tests/.DS_Store
.phpunit.result.cache
/.phpunit.cache
composer.lock

# Generated by pekral/ai-olympus (vendor/bin/ai-olympus install)
/.claude
/.codex
/.agents
/AGENTS.md
/composer.runtime.*
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Jednoduchý cURL client, který se stará o správné složení requestu do syst
[![License](https://poser.pugx.org/ecomailcz/flexibee-client/license?format=flat)](https://packagist.org/packages/ecomailcz/flexibee-client)
[![Latest version](https://img.shields.io/packagist/v/ecomailcz/flexibee-client.svg?colorB=007EC6)](https://packagist.org/packages/ecomailcz/flexibee-client)
[![Downloads](https://img.shields.io/packagist/dt/ecomailcz/flexibee-client.svg?colorB=007EC6)](https://packagist.org/packages/ecomailcz/flexibee-client)
![PHPStan](https://img.shields.io/badge/style-level%207-brightgreen.svg?&label=phpstan)
![PHPStan](https://img.shields.io/badge/style-level%20max-brightgreen.svg?&label=phpstan)

Podporované verze PHP: 8.2, 8.3, 8.4, 8.5.

## Sponsored by
[![Downloads](https://ecomail.cz/images/logo@2.png)](https://ecomail.cz)

Expand Down
46 changes: 0 additions & 46 deletions build.xml

This file was deleted.

60 changes: 45 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,34 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ecomailcz/purl": "^2.0",
"rakit/validation": "^1.4"
"ecomailcz/purl": "^2.0"
},
"require-dev": {
"brianium/paratest": "^6.10.0",
"ergebnis/composer-normalize": "^2.34.0",
"fzaninotto/faker": "^1.9",
"fakerphp/faker": "^1.24",
"mockery/mockery": "^1.6.4",
"phing/phing": "^2.17.4",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"pekral/ai-olympus": "^0.4",
"pekral/phpcs-rules": "dev-master",
"pekral/phpstan-rules": "dev-master",
"pekral/rector-rules": "dev-master",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.26",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-phpunit": "^1.3.13",
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-mockery": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^9.6.10",
"slevomat/coding-standard": "^6.0 || ^7.2.1"
"rector/rector": "^2.8"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"EcomailFlexibee\\": [
"src/"
],
"EcomailFlexibeeTest\\": [
"tests/"
],
"EcomailFlexibee\\": [
"src/"
]
}
},
Expand All @@ -47,10 +48,39 @@
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
"pekral/ai-olympus": true,
"phpstan/extension-installer": true
},
"sort-packages": true
},
"scripts": {
"ai-olympus:install": "vendor/bin/ai-olympus install --force",
"analyse": "vendor/bin/phpstan analyse --memory-limit=2G --no-progress",
"build": [
"@fix",
"@check"
],
"check": [
"@composer-normalize-check",
"@phpcs-check",
"@rector-check",
"@analyse",
"@test"
],
"composer-normalize-check": "@composer normalize --dry-run",
"fix": [
"@composer normalize",
"@rector-fix",
"@phpcs-fix"
],
"phpcs-check": "vendor/bin/phpcs --standard=ruleset.xml src tests",
"phpcs-fix": "vendor/bin/phpcbf --standard=ruleset.xml src tests || true",
"rector-check": "vendor/bin/rector process --dry-run",
"rector-fix": "vendor/bin/rector process",
"security-audit": "@composer audit",
"test": "vendor/bin/paratest --exclude-group=integration",
"test:integration": "vendor/bin/paratest --group=integration"
}
}
8 changes: 6 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
parameters:
level: max
checkMissingIterableValueType: false
treatPhpDocTypesAsCertain: false
phpVersion:
min: 80200
max: 80599
paths:
- src
- tests
6 changes: 3 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" beStrictAboutTestsThatDoNotTestAnything="false" bootstrap="vendor/autoload.php" colors="true" failOnRisky="true" failOnWarning="true" beStrictAboutChangesToGlobalState="true" beStrictAboutCoversAnnotation="true" beStrictAboutOutputDuringTests="true" beStrictAboutTodoAnnotatedTests="true" verbose="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" beStrictAboutTestsThatDoNotTestAnything="false" bootstrap="tests/bootstrap.php" colors="true" failOnRisky="true" failOnWarning="true" beStrictAboutChangesToGlobalState="true" beStrictAboutCoversAnnotation="true" beStrictAboutOutputDuringTests="true" beStrictAboutTodoAnnotatedTests="true" verbose="false">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">../src</directory>
<directory suffix=".php">src</directory>
</include>
</coverage>
<testsuite name="FlexiBeeClient">
<directory suffix="Test.php">.</directory>
<directory suffix="Test.php">tests</directory>
</testsuite>
</phpunit>
12 changes: 12 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types = 1);

use Rector\Config\RectorConfig;
use Rector\ValueObject\PhpVersion;

return RectorConfig::configure()
->withPaths([__DIR__ . '/src', __DIR__ . '/tests'])
// The package supports PHP 8.2+: rules that need a newer PHP version are skipped.
->withPhpVersion(PhpVersion::PHP_82)
->withSets([__DIR__ . '/vendor/pekral/rector-rules/rector.php']);
Loading
Loading