Skip to content

Commit 7dd1713

Browse files
authored
chore: update dependencies (#16)
* update phpunit * update docs workflow actions * update workflows * cs fix * psalm update * rector update * myth-collection dev-develop
1 parent 330e54c commit 7dd1713

17 files changed

Lines changed: 57 additions & 72 deletions

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
deploy:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
19-
- uses: actions/setup-python@v5
18+
- uses: actions/checkout@v6
19+
- uses: actions/setup-python@v6
2020
with:
2121
python-version: 3.x
2222
- run: pip install mkdocs-material

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
php-versions: ['8.1', '8.2', '8.3']
29+
php-versions: ['8.1', '8.4']
3030

3131
steps:
3232
- name: Checkout

.github/workflows/phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
if: "!contains(github.event.head_commit.message, '[ci skip]')"
2626
strategy:
2727
matrix:
28-
php-versions: ['8.1', '8.2', '8.3']
28+
php-versions: ['8.1', '8.2', '8.3', '8.4']
2929

3030
steps:
3131
- name: Free Disk Space (Ubuntu)

.github/workflows/rector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
php-versions: ['8.1', '8.2', '8.3']
29+
php-versions: ['8.1', '8.4']
3030

3131
steps:
3232
- name: Checkout

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"homepage": "https://github.com/michalsn/codeigniter-tags",
1515
"require": {
1616
"php": "^8.1",
17-
"myth/collection": "dev-master"
17+
"myth/collection": "dev-develop"
1818
},
1919
"require-dev": {
2020
"codeigniter4/devkit": "^1.0",

phpunit.xml.dist

Lines changed: 33 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
4-
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
5-
backupGlobals="false"
6-
beStrictAboutCoversAnnotation="true"
7-
beStrictAboutOutputDuringTests="true"
8-
beStrictAboutTodoAnnotatedTests="true"
9-
colors="true"
10-
convertErrorsToExceptions="true"
11-
convertNoticesToExceptions="true"
12-
convertWarningsToExceptions="true"
13-
executionOrder="random"
14-
failOnRisky="true"
15-
failOnWarning="true"
16-
stopOnError="false"
17-
stopOnFailure="false"
18-
stopOnIncomplete="false"
19-
stopOnSkipped="false"
20-
verbose="true">
21-
22-
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
23-
<include>
24-
<directory suffix=".php">./src/</directory>
25-
</include>
26-
<exclude>
27-
<directory suffix=".php">./src/Commands</directory>
28-
<directory suffix=".php">./src/Config</directory>
29-
</exclude>
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
5+
backupGlobals="false"
6+
beStrictAboutOutputDuringTests="true"
7+
colors="true"
8+
executionOrder="random"
9+
failOnRisky="true"
10+
failOnWarning="true"
11+
stopOnError="false"
12+
stopOnFailure="false"
13+
stopOnIncomplete="false"
14+
stopOnSkipped="false"
15+
cacheDirectory="build/.phpunit.cache"
16+
beStrictAboutCoverageMetadata="true">
17+
<coverage includeUncoveredFiles="true">
3018
<report>
3119
<clover outputFile="build/phpunit/clover.xml"/>
3220
<html outputDirectory="build/phpunit/html"/>
@@ -35,68 +23,52 @@
3523
<xml outputDirectory="build/phpunit/xml-coverage"/>
3624
</report>
3725
</coverage>
38-
3926
<testsuites>
4027
<testsuite name="main">
4128
<directory>./tests</directory>
4229
</testsuite>
4330
</testsuites>
44-
4531
<extensions>
46-
<extension class="Nexus\PHPUnit\Extension\Tachycardia">
47-
<arguments>
48-
<array>
49-
<element key="timeLimit">
50-
<double>0.50</double>
51-
</element>
52-
<element key="reportable">
53-
<integer>30</integer>
54-
</element>
55-
<element key="precision">
56-
<integer>2</integer>
57-
</element>
58-
<element key="collectBare">
59-
<boolean>true</boolean>
60-
</element>
61-
<element key="tabulate">
62-
<boolean>true</boolean>
63-
</element>
64-
</array>
65-
</arguments>
66-
</extension>
32+
<bootstrap class="Nexus\PHPUnit\Tachycardia\TachycardiaExtension">
33+
<parameter name="time-limit" value="0.50"/>
34+
<parameter name="report-count" value="30"/>
35+
<parameter name="format" value="table"/>
36+
</bootstrap>
6737
</extensions>
68-
6938
<logging>
7039
<testdoxHtml outputFile="build/phpunit/testdox.html"/>
7140
<testdoxText outputFile="build/phpunit/testdox.txt"/>
7241
<junit outputFile="build/phpunit/junit.xml"/>
7342
</logging>
74-
7543
<php>
7644
<env name="XDEBUG_MODE" value="coverage"/>
7745
<server name="app.baseURL" value="https://example.com/"/>
78-
7946
<!-- Directory containing phpunit.xml -->
8047
<const name="HOMEPATH" value="./"/>
81-
8248
<!-- Directory containing the Paths config file -->
8349
<const name="CONFIGPATH" value="vendor/codeigniter4/framework/app/Config/"/>
84-
8550
<!-- Directory containing the front controller (index.php) -->
8651
<const name="PUBLICPATH" value="./public/"/>
87-
8852
<!-- https://getcomposer.org/xdebug -->
8953
<env name="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
90-
9154
<!-- Database configuration -->
9255
<env name="database.tests.strictOn" value="true"/>
9356
<!-- Uncomment to use alternate testing database configuration
94-
<env name="database.tests.hostname" value="localhost"/>
95-
<env name="database.tests.database" value="tests"/>
96-
<env name="database.tests.username" value="tests_user"/>
57+
<env name="database.tests.hostname" value="127.0.0.1"/>
58+
<env name="database.tests.port" value="3306"/>
59+
<env name="database.tests.database" value=""/>
60+
<env name="database.tests.username" value=""/>
9761
<env name="database.tests.password" value=""/>
9862
<env name="database.tests.DBDriver" value="MySQLi"/>
99-
<env name="database.tests.DBPrefix" value="tests_"/>
63+
<env name="database.tests.DBPrefix" value="db_"/>
10064
-->
10165
</php>
66+
<source>
67+
<include>
68+
<directory suffix=".php">./src/</directory>
69+
</include>
70+
<exclude>
71+
<directory suffix=".php">./src/Config</directory>
72+
</exclude>
73+
</source>
10274
</phpunit>

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
cacheDirectory="build/psalm/"
1010
findUnusedBaselineEntry="true"
1111
findUnusedCode="false"
12+
ensureOverrideAttribute="false"
1213
>
1314
<projectFiles>
1415
<directory name="src/" />

rector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
use Rector\Set\ValueObject\LevelSetList;
4040
use Rector\Set\ValueObject\SetList;
4141
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
42-
use Rector\Strict\Rector\If_\BooleanInIfConditionRuleFixerRector;
4342
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
4443
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
4544
use Rector\ValueObject\PhpVersion;
@@ -138,7 +137,6 @@
138137
$rectorConfig->rule(StringClassNameToClassConstantRector::class);
139138
$rectorConfig->rule(PrivatizeFinalClassPropertyRector::class);
140139
$rectorConfig->rule(CompleteDynamicPropertiesRector::class);
141-
$rectorConfig->rule(BooleanInIfConditionRuleFixerRector::class);
142140
$rectorConfig->rule(SingleInArrayToCompareRector::class);
143141
$rectorConfig->rule(VersionCompareFuncCallToConstantRector::class);
144142
$rectorConfig->rule(ExplicitBoolCompareRector::class);

src/Models/TagModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function cleanupTags(): bool|string
7676
->table('tags')
7777
->whereNotIn(
7878
'id',
79-
static fn (BaseBuilder $builder) => $builder->distinct()->select('tag_id')->from('taggable')
79+
static fn (BaseBuilder $builder) => $builder->distinct()->select('tag_id')->from('taggable'),
8080
)
8181
->delete();
8282
}
@@ -143,7 +143,7 @@ public function search(string $name, ?string $type = null, int $perPage = 5, int
143143
$type !== null,
144144
static fn (BaseBuilder $builder) => $builder
145145
->join('taggable', 'taggable.tag_id = tags.id', 'inner')
146-
->where('taggable.taggable_type', $type)
146+
->where('taggable.taggable_type', $type),
147147
)
148148
->groupBy('tags.id')
149149
->limit($perPage, $page)

src/Traits/HasTags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ protected function tagsBeforeFind(array $eventData): array
150150
->orGroupStart()
151151
->whereIn(
152152
$this->table . '.' . $this->primaryKey,
153-
static fn (BaseBuilder $builder) => $tagScope->getQuery($builder, $tagIds)
153+
static fn (BaseBuilder $builder) => $tagScope->getQuery($builder, $tagIds),
154154
)
155155
->groupEnd();
156156
}

0 commit comments

Comments
 (0)