Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
60e5307
Apply https://github.com/yiisoft/data/pull/233
rossaddison Aug 18, 2025
70dd1d9
Composer update
rossaddison Aug 18, 2025
2b06142
Update static.yml
rossaddison Aug 18, 2025
67efb07
Psalm testing: Override Attribute
rossaddison Aug 18, 2025
8e14617
Php 8.3 - 8.4
rossaddison Aug 18, 2025
c04849a
Test All replaced with AndX
rossaddison Aug 18, 2025
1ca788e
Update composer.json
rossaddison Aug 18, 2025
322ded2
Update MySql and Sqlite Tests
rossaddison Aug 18, 2025
766852a
Update sqlite.yml
rossaddison Aug 18, 2025
e8b662e
syntax error
rossaddison Aug 18, 2025
6ac4e4d
Testing: Restructure tests according to yiisoft data
rossaddison Aug 20, 2025
e8e3dbf
Psalm
rossaddison Aug 20, 2025
4522d4b
Tests passing locally
rossaddison Aug 22, 2025
fa3c6d6
Typo mysql to mssql
rossaddison Aug 22, 2025
7166b2e
Upgrade LikeHandler postgres and mssql
rossaddison Aug 22, 2025
fde1686
Test 8.1 and 8.2 workflows
rossaddison Aug 22, 2025
4eb4a2a
Update composer.json
rossaddison Aug 22, 2025
cf82dde
Revert to 8.3 and 8.4
rossaddison Aug 22, 2025
79c05d9
Test mssql.yml
rossaddison Aug 22, 2025
4c10faa
Update mssql.yml
rossaddison Aug 22, 2025
69d2e20
Update mssql.yml
rossaddison Aug 22, 2025
a7a5dc2
Update mssql.yml
rossaddison Aug 22, 2025
64a13a7
Update mssql.yml
rossaddison Aug 22, 2025
5f3f5f8
Additional Base Tests - Test 1 - msi = 99
rossaddison Aug 23, 2025
a92ddc2
Update PHP version requirement to 8.3 or higher
rossaddison Aug 23, 2025
38a7f28
Update README.md
rossaddison Aug 23, 2025
2af7588
Additional Base Tests - yiisoft/data/pull/234 - msi 100
rossaddison Aug 25, 2025
46c9e52
Additional Base Tests - Test 3 - msi 100
rossaddison Aug 25, 2025
2cd749c
Additional Base Tests - Test 4 - msi 100 - mySql
rossaddison Aug 25, 2025
97dc2a3
Additional Base Tests - Test 5 - empty string
rossaddison Aug 25, 2025
46ceb16
Additional Base Tests - Test 6 - mssql
rossaddison Aug 25, 2025
c4fb2f3
Additional Base Tests - Test 7 - trustserver certificate
rossaddison Aug 25, 2025
aecd003
Additional Base Tests - Test 8 - DataTrait
rossaddison Aug 25, 2025
ff3a005
Additional Base Tests - Test 9 - Normalize milliseconds
rossaddison Aug 25, 2025
fe129f6
Additional Base Tests - Test 10 - mssql 8.3 only
rossaddison Aug 25, 2025
9742bc6
Additional Base Tests - Test 10 - mssql 8.3 + 8.4
rossaddison Aug 25, 2025
7616e69
Additional Base Tests - Test 11 - assert..Same..Equals
rossaddison Aug 25, 2025
20e9d83
Additional Base Tests - Test 12 - PostgresLikeHandler
rossaddison Aug 25, 2025
5b83fcf
Additional Base Tests - Test 13 - Improve Menu
rossaddison Aug 29, 2025
c87bfda
Additional Base Tests - Test 14 - PostgresLikeHandler
rossaddison Aug 29, 2025
1de5e0c
Additional Base Tests - Test 15 - SQLServer
rossaddison Aug 29, 2025
664c59f
Apply fixes from StyleCI
StyleCIBot Aug 29, 2025
0dd040b
Merge pull request #1 from rossaddison/analysis-jDlJOJ
rossaddison Aug 29, 2025
70f9508
Update static.yml
rossaddison Aug 29, 2025
6fc4fd3
CodeQL - Security Permissions Improve
rossaddison Aug 29, 2025
10a47ab
Update composer-require-checker.yml
rossaddison Aug 29, 2025
dd32ad4
Potential fix for code scanning alert no. 2: Workflow does not contai…
rossaddison Aug 29, 2025
b277620
Merge pull request #2 from rossaddison/alert-autofix-2
rossaddison Aug 29, 2025
baaa867
Initial plan
Copilot Aug 29, 2025
7975f61
Merge pull request #3 from rossaddison/copilot/fix-b3e6ba89-e970-4e05…
rossaddison Aug 29, 2025
c51d75a
Revert "Update PHP version requirement from 8.3+ to 8.1+ for broader …
rossaddison Aug 29, 2025
290c790
Merge pull request #4 from rossaddison/revert-3-copilot/fix-b3e6ba89-…
rossaddison Aug 29, 2025
b146d1e
Update .env
rossaddison Aug 29, 2025
7ba0a3f
Merge branch 'master' into master
vjik Sep 4, 2025
d56b192
Update .github/workflows/rector.yml
vjik Sep 4, 2025
a8d4131
Update composer.json
rossaddison Sep 6, 2025
ce02fb3
Update README.md
rossaddison Sep 6, 2025
2a2fd68
Create Makefile
rossaddison Sep 6, 2025
16d9ed3
Delete m.bat and w.bat
rossaddison Sep 6, 2025
2e5c452
Code Coverage: Restore $ref->setAccessible(true); for php 8.1
rossaddison Sep 6, 2025
812d44d
Apply Rector changes (CI)
rossaddison Sep 6, 2025
b4c73bf
styleci fixes
rossaddison Sep 6, 2025
1911c9f
Merge branch 'master' of https://github.com/rossaddison/data-cycle
rossaddison Sep 6, 2025
b490eac
styci changes
rossaddison Sep 6, 2025
c7e5ec6
styleci changes
rossaddison Sep 6, 2025
eb39682
styleci
rossaddison Sep 6, 2025
775f7ad
styleci
rossaddison Sep 6, 2025
54c8d32
stylci
rossaddison Sep 6, 2025
afd0f9d
Update composer.json
rossaddison Sep 8, 2025
25a2b10
Delete package.json
rossaddison Sep 8, 2025
f4b69a5
Delete .php-cs-fixer.cache
rossaddison Sep 10, 2025
df438a0
Include ImpureMethodCall in psalm.xml
rossaddison Sep 10, 2025
631b62a
Testing 1
rossaddison Sep 10, 2025
b1397a4
Lower msi to 97
rossaddison Sep 11, 2025
5682793
Update EntityReader.php
rossaddison Sep 11, 2025
fc796ed
Update src/Reader/FilterHandler/LikeHandler/SqliteLikeHandler.php
rossaddison Sep 11, 2025
5f0a48b
Update src/Reader/FilterHandler/NotHandler.php
rossaddison Sep 11, 2025
7d8f89a
Update tests/Feature/Base/Writer/BaseEntityWriterTestCase.php
rossaddison Sep 11, 2025
d33215e
Update .php-cs-fixer.php
rossaddison Sep 11, 2025
6ebb760
Merge branch 'master' of https://github.com/rossaddison/data-cycle
rossaddison Sep 11, 2025
801ec70
Update SqliteLikeHandler.php
rossaddison Sep 11, 2025
d24507f
Update SqliteLikeHandler.php
rossaddison Sep 11, 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
2 changes: 1 addition & 1 deletion .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3']
['8.3', '8.4']
19 changes: 5 additions & 14 deletions .github/workflows/mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,16 @@ jobs:
strategy:
matrix:
php:
- 8.1
- 8.2
- 8.3
- 8.4

mssql:
- server: 2022-latest
odbc-version: 18
flag: "-C"

include:
- php: 8.3
mssql:
server: 2017-latest
os: ubuntu-20.04
- php: 8.3
mssql:
server: 2019-latest
odbc-version: 18
flag: "-C"
- server: 2019-latest
odbc-version: 18
flag: "-C"

services:
mssql:
Expand Down Expand Up @@ -113,4 +104,4 @@ jobs:
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
files: ./coverage.xml
2 changes: 1 addition & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
['ubuntu-latest']
php: >-
['8.3']
min-covered-msi: 100
min-covered-msi: 97
secrets:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
3 changes: 1 addition & 2 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ jobs:
- ubuntu-latest

php:
- 8.1
- 8.2
- 8.3
- 8.4

mysql:
- 5.7
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ jobs:
- ubuntu-latest

php:
- 8.1
- 8.2
- 8.3
- 8.4

pgsql:
- 9
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ jobs:
- ubuntu-latest

php:
- 8.1
- 8.2
- 8.3
- 8.4

steps:
- name: Checkout.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3']
['8.3', '8.4']
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ composer.phar
# PhpUnit
/phpunit.phar
/phpunit.xml
/.phpunit.cache
/.phpunit.cache
35 changes: 35 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

ini_set('memory_limit', '512M');

$root = __DIR__;
$finder = (new Finder())
->in([
$root.'/src',
$root.'/tests',
])
->exclude([
])
->append([
]);

return (new Config())
->setCacheFile(__DIR__ . '/runtime/cache/.php-cs-fixer.cache')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no such directory.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still relevant.

->setParallelConfig(ParallelConfigFactory::detect(
// $filesPerProcess
10,
// $processTimeout in seconds
200,
// $maxProcesses
10
))
->setRules([
'@PER-CS2.0' => true,
])
->setFinder($finder);
122 changes: 122 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
.PHONY: m p pf pc pu ric riu i co cwn cs cm cu crc rdr rmc ep em es ex ea rp rm rs re x xd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This style could be adjusted to match one is yiisoft/app for consistency.


m:
@echo "================================================================================"
@echo " Data Cycle SYSTEM MENU (Make targets)"
@echo "================================================================================"
@echo ""
@echo "make p - Run PHP Psalm"
@echo "make pf FILE=src/Foo.php - Run PHP Psalm on a specific file"
@echo "make pc - Clear Psalm's cache"
@echo "make pu - Run PHPUnit tests"
@echo "make ric - Roave Infection Covered"
@echo "make riu - Roave Infection Uncovered"
@echo "make i - Infection Mutation Test"
@echo "make co - Composer outdated"
@echo "make cwn REPO=yiisoft/yii-demo VERSION=1.1.1 - Composer why-not"
@echo "make cs - PHP CS Fixer dry-run"
@echo "make cm - PHP CS Fixer fix"
@echo "make cu - Composer update"
@echo "make crc - Composer require checker"
@echo "make rdr - Rector Dry Run (see changes)"
@echo "make rmc - Rector (make changes)"
@echo ""
@echo "Extension & DB Test Suite Menu:"
@echo "make ep - Check PostgreSQL PHP extensions"
@echo "make em - Check MySQL PHP extensions"
@echo "make es - Check SQLite PHP extensions"
@echo "make ex - Check MSSQL PHP extensions"
@echo "make ea - Check ALL DB PHP extensions"
@echo "make rp - Run PHPUnit Pgsql test suite"
@echo "make rm - Run PHPUnit Mysql test suite"
@echo "make rs - Run PHPUnit Sqlite test suite"
@echo "make re - Run PHPUnit Mssql test suite"
@echo "================================================================================"

p:
php vendor/bin/psalm

pf:
ifndef FILE
$(error Please provide FILE, e.g. 'make pf FILE=src/Foo.php')
endif
php vendor/bin/psalm "$(FILE)"

pc:
php vendor/bin/psalm --clear-cache

pu:
php vendor/bin/phpunit

ric:
php vendor/bin/roave-infection-static-analysis-plugin --only-covered

riu:
php vendor/bin/roave-infection-static-analysis-plugin

i:
php vendor/bin/infection

co:
composer outdated

cwn:
ifndef REPO
$(error Please provide REPO, e.g. 'make cwn REPO=yiisoft/yii-demo VERSION=1.1.1')
endif
ifndef VERSION
$(error Please provide VERSION, e.g. 'make cwn REPO=yiisoft/yii-demo VERSION=1.1.1')
endif
composer why-not $(REPO) $(VERSION)

cs:
php vendor/bin/php-cs-fixer fix --dry-run --diff

cm:
php vendor/bin/php-cs-fixer fix

cu:
composer update

crc:
php vendor/bin/composer-require-checker

rdr:
php vendor/bin/rector process --dry-run

rmc:
php vendor/bin/rector

ep:
@echo "Checking for pdo_pgsql and pgsql extensions..."
@php -m | grep -E "^pdo_pgsql$$|^pgsql$$" || (echo 'Missing PostgreSQL extensions!'; exit 1)

em:
@echo "Checking for pdo_mysql and mysql extensions..."
@php -m | grep -E "^pdo_mysql$$|^mysql$$" || (echo 'Missing MySQL extensions!'; exit 1)

es:
@echo "Checking for pdo_sqlite and sqlite3 extensions..."
@php -m | grep -E "^pdo_sqlite$$|^sqlite3$$" || (echo 'Missing SQLite extensions!'; exit 1)

ex:
@echo "Checking for pdo_sqlsrv and sqlsrv extensions..."
@php -m | grep -E "^pdo_sqlsrv$$|^sqlsrv$$" || (echo 'Missing MSSQL extensions!'; exit 1)

ea:
$(MAKE) ep
$(MAKE) em
$(MAKE) es
$(MAKE) ex

rp:
php vendor/bin/phpunit --testsuite Pgsql

rm:
php vendor/bin/phpunit --testsuite Mysql

rs:
php vendor/bin/phpunit --testsuite Sqlite

re:
php vendor/bin/phpunit --testsuite Mssql
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
[![Latest Stable Version](https://poser.pugx.org/yiisoft/data-cycle/v)](https://packagist.org/packages/yiisoft/data-cycle)
[![Total Downloads](https://poser.pugx.org/yiisoft/data-cycle/downloads)](https://packagist.org/packages/yiisoft/data-cycle)
[![Code Coverage](https://codecov.io/gh/yiisoft/data-cycle/branch/master/graph/badge.svg)](https://codecov.io/gh/yiisoft/data-cycle)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Fdata%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/data-cycle/master)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Fdata-cycle%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/data-cycle/master)
[![static analysis](https://github.com/yiisoft/data-cycle/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/data-cycle/actions?query=workflow%3A%22static+analysis%22)
[![type-coverage](https://shepherd.dev/github/yiisoft/data-cycle/coverage.svg)](https://shepherd.dev/github/yiisoft/data-cycle)
[![psalm-level](https://shepherd.dev/github/yiisoft/data-cycle/level.svg)](https://shepherd.dev/github/yiisoft/data-cycle)

[![Monthly Downloads](https://poser.pugx.org/yiisoft/data-cycle/d/monthly)](https://packagist.org/packages/yiisoft/data-cycle)
[![Daily Downloads](https://poser.pugx.org/yiisoft/data-cycle/d/daily)](https://packagist.org/packages/yiisoft/data-cycle)

Comment on lines +17 to +19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[![Monthly Downloads](https://poser.pugx.org/yiisoft/data-cycle/d/monthly)](https://packagist.org/packages/yiisoft/data-cycle)
[![Daily Downloads](https://poser.pugx.org/yiisoft/data-cycle/d/daily)](https://packagist.org/packages/yiisoft/data-cycle)

I don't think these are particularly useful. We don't have these in any other package.

There package provides [Cycle ORM](https://github.com/cycle/orm) query adapter for[Yii Data](https://github.com/yiisoft/data). For other
integrations of Cycle ORM with Yii framework see [Yii Cycle](https://github.com/yiisoft/yii-cycle) package.

Expand Down
25 changes: 14 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,22 @@
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": "^8.1",
"php": "8.1 - 8.4",
"ext-mbstring": "*",
"cycle/database": "^2.11",
"cycle/orm": "^2.9",
"yiisoft/data": "dev-master"
"cycle/database": "^2.15",
"cycle/orm": "^2.10.1",
"yiisoft/data": "dev-master",
"yiisoft/var-dumper": "^1.7"
},
"require-dev": {
"maglnet/composer-require-checker": "^4.7",
"phpunit/phpunit": "^10.5",
"rector/rector": "^2.1.5",
"roave/infection-static-analysis-plugin": "^1.35",
"spatie/phpunit-watcher": "^1.24",
"vimeo/psalm": "^5.26",
"vlucas/phpdotenv": "^5.6"
"maglnet/composer-require-checker": "^4.16.1",
"friendsofphp/php-cs-fixer": "^3.87.1",
"phpunit/phpunit": "^12.3.8",
"rector/rector": "^2.1.6",
"roave/infection-static-analysis-plugin": ">=1.39",
"spatie/phpunit-watcher": ">=1.24.0",
"vimeo/psalm": "^6.13.1",
"vlucas/phpdotenv": "^5.6.2"
},
"autoload": {
"psr-4": {
Expand All @@ -63,6 +65,7 @@
},
"config": {
"sort-packages": true,
"bump-after-update": true,
"allow-plugins": {
"infection/extension-installer": true,
"composer/package-versions-deprecated": true
Expand Down
5 changes: 2 additions & 3 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -9,12 +9,11 @@
>
<projectFiles>
<directory name="src" />
<directory name="tests" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
<RiskyTruthyFalsyComparison errorLevel="suppress" />
</issueHandlers>
</psalm>
Loading