Skip to content

Commit 6e56719

Browse files
committed
Upgrade connection dependency + coverage with PHP 8.4
1 parent 53e9641 commit 6e56719

File tree

10 files changed

+255
-49
lines changed

10 files changed

+255
-49
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"require": {
2222
"php": ">=8.2",
23-
"squirrelphp/connection": "^0.2",
23+
"squirrelphp/connection": "^0.3",
2424
"squirrelphp/debug": "^2.0"
2525
},
2626
"require-dev": {
@@ -66,8 +66,8 @@
6666
"psalm": "vendor-bin/psalm/vendor/bin/psalm --config=tools/psalm.xml --show-info=false",
6767
"psalm_full": "vendor-bin/psalm/vendor/bin/psalm --config=tools/psalm.xml --clear-cache && vendor-bin/psalm/vendor/bin/psalm --config=tools/psalm.xml --show-info=false",
6868
"psalm_base": "vendor-bin/psalm/vendor/bin/psalm --config=tools/psalm.xml --set-baseline=tools/psalm-baseline.xml",
69-
"phpunit": "vendor/bin/phpunit --configuration=tools/phpunit.xml.dist --cache-result-file=tools/cache/.phpunit.result.cache --colors=always --testsuite=unit",
70-
"phpunit_clover": "vendor/bin/phpunit --configuration=tools/phpunit.xml.dist --cache-result-file=tools/cache/.phpunit.result.cache --coverage-text --coverage-clover build/logs/clover.xml",
69+
"phpunit": "vendor/bin/phpunit --configuration=tools/phpunit.xml.dist --colors=always --testsuite=unit",
70+
"phpunit_clover": "vendor/bin/phpunit --configuration=tools/phpunit.xml.dist --coverage-text --coverage-clover build/logs/clover.xml",
7171
"coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --configuration=tools/phpunit.xml.dist --coverage-html=tests/_reports",
7272
"phpcs": "vendor-bin/phpcs/vendor/bin/phpcs --standard=tools/ruleset.xml --extensions=php --cache=tools/cache/.phpcs-cache --colors src tests",
7373
"phpcs_diff": "vendor-bin/phpcs/vendor/bin/phpcs -s --standard=tools/ruleset.xml --extensions=php --cache=tools/cache/.phpcs-cache --colors src tests",

docker/compose/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
coverage:
3-
image: thecodingmachine/php:8.3-v4-cli
3+
image: thecodingmachine/php:8.4-v4-cli
44
container_name: squirrel_queries_coverage
55
tty: true
66
working_dir: /usr/src/app

docker/compose/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
test:
3-
image: thecodingmachine/php:8.3-v4-cli
3+
image: thecodingmachine/php:8.2-v4-cli
44
container_name: squirrel_queries_test
55
tty: true
66
working_dir: /usr/src/app

src/DB/AbstractImplementation.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,7 @@ public function insertOrUpdateEmulation(
339339
$rowUpdates = $this->prepareUpsertRowUpdates($rowUpdates, $row, $indexColumns);
340340

341341
// Do all queries in a transaction to correctly emulate the UPSERT
342-
$this->transaction(function (
343-
string $tableName,
344-
array $row,
345-
array $indexColumns,
346-
array $rowUpdates,
347-
) {
342+
$this->transaction(function () use ($tableName, $row, $indexColumns, $rowUpdates): void {
348343
// Contains all WHERE restrictions for the UPDATE query
349344
$whereForUpdate = [];
350345

@@ -370,7 +365,7 @@ public function insertOrUpdateEmulation(
370365

371366
// Because the UPDATE did not work, we do a regular insert
372367
$this->insert($tableName, $row);
373-
}, $tableName, $row, $indexColumns, $rowUpdates);
368+
});
374369
}
375370

376371
protected function validateMandatoryUpsertParameters(

tools/phpstan-baseline.php

Lines changed: 244 additions & 16 deletions
Large diffs are not rendered by default.

tools/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.2/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="../vendor/autoload.php" cacheDirectory="cache/.phpunit.cache">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="../vendor/autoload.php" cacheDirectory="cache/.phpunit.cache">
33
<coverage includeUncoveredFiles="false"/>
44
<testsuites>
55
<testsuite name="Squirrel Test Suite">

tools/psalm-baseline.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
2+
<files psalm-version="6.5.1@3f17a6b24a2dbe543e21408c2b19108cf6a355ef">
33
<file src="src/Builder/FlattenedFieldsWithTypeTrait.php">
44
<InvalidReturnType>
55
<code><![CDATA[bool[]]]></code>

tools/psalm.xml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,12 @@
2727
<directory name="tests"/>
2828
</errorLevel>
2929
</PropertyNotSetInConstructor>
30-
<!-- Deprecated method warnings in tests are false-positives -->
31-
<DeprecatedMethod>
32-
<errorLevel type="suppress">
33-
<directory name="tests"/>
34-
</errorLevel>
35-
</DeprecatedMethod>
3630
<!-- Conflicts with tests where invalid arguments are tested -->
3731
<InvalidArgument>
3832
<errorLevel type="suppress">
3933
<directory name="tests"/>
4034
</errorLevel>
4135
</InvalidArgument>
42-
<!-- We test with internal doctrine classes and methods -->
43-
<InternalClass>
44-
<errorLevel type="suppress">
45-
<directory name="tests"/>
46-
</errorLevel>
47-
</InternalClass>
48-
<InternalMethod>
49-
<errorLevel type="suppress">
50-
<directory name="tests"/>
51-
</errorLevel>
52-
</InternalMethod>
5336
</issueHandlers>
5437

5538
<plugins>

vendor-bin/phpstan/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"phpstan/phpstan": "^1.0"
3+
"phpstan/phpstan": "^2.0"
44
}
55
}

vendor-bin/psalm/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"vimeo/psalm": "^5.2",
3+
"vimeo/psalm": "^6.0",
44
"psalm/plugin-phpunit": "*",
55
"psalm/plugin-mockery": "*"
66
}

0 commit comments

Comments
 (0)