Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
b07d03b
feat: enhance rule engine documentation with detailed PHPDoc comments…
maniaba Jul 19, 2025
78a87af
feat: enhance documentation with detailed PHPDoc comments for action …
maniaba Jul 19, 2025
2e215a3
feat: enhance documentation with PHPDoc comments for ArrayBuilder and…
maniaba Jul 19, 2025
d2500b5
feat: update failure message handling and improve PHPDoc for getFailu…
maniaba Jul 19, 2025
5ce2959
feat: improve FieldSelector handling for stdClass and object properties
maniaba Jul 19, 2025
7155259
feat: update argument type validation in ActionFactory and upgrade PH…
maniaba Jul 19, 2025
ac2e5f6
feat: update argument type validation in ActionFactory and upgrade PH…
maniaba Jul 19, 2025
d5dadcc
feat: refactor ObjectContext to implement Stringable and update TestA…
maniaba Jul 19, 2025
8a0d98b
feat: remove redundant ActionInterface assertions in tests
maniaba Jul 19, 2025
d4e6024
feat: update ActionFactory to use callable type and improve test comm…
maniaba Jul 19, 2025
f556eb0
feat: clean up test files by removing unused imports and updating com…
maniaba Jul 19, 2025
ef047c6
feat: update data provider return types to use Generator for improved…
maniaba Jul 19, 2025
5ce0931
feat: update ActionFactory type checks and improve test data provider…
maniaba Jul 19, 2025
3473101
feat: update test comments and data provider descriptions for clarity
maniaba Jul 19, 2025
a8255c1
feat: improve type checks and update return type annotations for clarity
maniaba Jul 19, 2025
a3bdd91
feat: update comments for clarity and add phpstan baseline configuration
maniaba Jul 19, 2025
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
71 changes: 0 additions & 71 deletions .github/workflows/deptrac.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/phpcpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
php-version: '8.1'
tools: phpcpd
extensions: dom, mbstring
coverage: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpcsfixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
php-version: '8.1'
extensions: json, tokenizer
coverage: none
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.3', '8.4']
php-versions: ['8.1']

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
if: (! contains(github.event.head_commit.message, '[ci skip]'))
strategy:
matrix:
php-versions: ['8.3', '8.4']
php-versions: ['8.1']

steps:
- name: Checkout
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
TERM: xterm-256color
TACHYCARDIA_MONITOR_GA: enabled

- if: matrix.php-versions == '8.3'
- if: matrix.php-versions == '8.1'
name: Run Coveralls
continue-on-error: true
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
php-version: '8.1'
tools: phpstan, phpunit
extensions: intl, json, mbstring, xml
coverage: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.3', '8.4']
php-versions: ['8.1']

steps:
- name: Checkout
Expand Down
7 changes: 2 additions & 5 deletions composer-unused.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use ComposerUnused\ComposerUnused\Configuration\PatternFilter;
use Webmozart\Glob\Glob;

return static fn (Configuration $config): Configuration => $config
return static fn (Configuration $config): Configuration => $config;
// ->addNamedFilter(NamedFilter::fromString('symfony/config'))
// ->addPatternFilter(PatternFilter::fromString('/symfony-.*/'))
->setAdditionalFilesFor('codeigniter4/framework', [
...Glob::glob(__DIR__ . '/vendor/codeigniter4/framework/system/Helpers/*.php'),
]);
// ->addPatternFilter(PatternFilter::fromString('/symfony-.*/'));
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
],
"homepage": "https://github.com/maniaba/rule-engine",
"require": {
"php": "^8.1"
"php": "^8.1",
"symfony/polyfill-php83": "^1.32"
},
"require-dev": {
"icanhazstring/composer-unused": "dev-main",
Expand Down
156 changes: 0 additions & 156 deletions deptrac.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions infection.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"source": {
"directories": [
"src/"
]
},
"logs": {
"text": "build/infection.log"
},
"mutators": {
"@default": true
}
}
19 changes: 19 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
parameters:
ignoreErrors:
-
message: '#^Parameter \#2 \$action of method Maniaba\\RuleEngine\\Factories\\ActionFactory\:\:registerAction\(\) expects class\-string\<Maniaba\\RuleEngine\\Actions\\ActionInterface\>\|\(Closure\(Maniaba\\RuleEngine\\Context\\ContextInterface\)\: mixed\)\|Maniaba\\RuleEngine\\Actions\\ActionInterface, Closure\(Maniaba\\RuleEngine\\Context\\ContextInterface, mixed, mixed\=\)\: string given\.$#'
identifier: argument.type
count: 1
path: tests/Factories/ActionFactoryTest.php

-
message: '#^Parameter \#2 \$action of method Maniaba\\RuleEngine\\Factories\\ActionFactory\:\:registerAction\(\) expects class\-string\<Maniaba\\RuleEngine\\Actions\\ActionInterface\>\|\(Closure\(Maniaba\\RuleEngine\\Context\\ContextInterface\)\: mixed\)\|Maniaba\\RuleEngine\\Actions\\ActionInterface, Closure\(Maniaba\\RuleEngine\\Context\\ContextInterface, string, int\)\: non\-falsy\-string given\.$#'
identifier: argument.type
count: 3
path: tests/Factories/ActionFactoryTest.php

-
message: '#^Parameter \#2 \$action of method Maniaba\\RuleEngine\\Factories\\ActionFactory\:\:registerAction\(\) expects class\-string\<Maniaba\\RuleEngine\\Actions\\ActionInterface\>\|\(Closure\(Maniaba\\RuleEngine\\Context\\ContextInterface\)\: mixed\)\|Maniaba\\RuleEngine\\Actions\\ActionInterface, Closure\(Maniaba\\RuleEngine\\Context\\ContextInterface, string, int\=\)\: non\-falsy\-string given\.$#'
identifier: argument.type
count: 1
path: tests/Factories/ActionFactoryTest.php
8 changes: 1 addition & 7 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@ parameters:
- src/
- tests/
bootstrapFiles:
- vendor/codeigniter4/framework/system/Test/bootstrap.php
excludePaths:
universalObjectCratesClasses:
- CodeIgniter\Entity
- CodeIgniter\Entity\Entity
- Faker\Generator
scanDirectories:
- vendor/codeigniter4/framework/system/Helpers
dynamicConstantNames:
- APP_NAMESPACE
- CI_DEBUG
- ENVIRONMENT
strictRules:
allRules: false
Expand All @@ -24,3 +17,4 @@ parameters:
matchingInheritedMethodNames: true
treatPhpDocTypesAsCertain: false
includes:
- phpstan-baseline.neon
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
backupGlobals="false"
beStrictAboutOutputDuringTests="true"
colors="true"
Expand Down
5 changes: 4 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
cacheDirectory="build/psalm/"
findUnusedBaselineEntry="true"
findUnusedCode="false"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src/" />
Expand All @@ -18,4 +17,8 @@
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

<issueHandlers>
<MissingOverrideAttribute errorLevel="suppress" />
</issueHandlers>
</psalm>
Loading