Skip to content

Commit e672191

Browse files
committed
chore: update PHP version to 8.1 and adjust dependencies
1 parent 62073a5 commit e672191

File tree

8 files changed

+347
-415
lines changed

8 files changed

+347
-415
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpCsFixer\Config;
6+
use PhpCsFixer\Finder;
7+
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
8+
9+
return (new Config())
10+
->setParallelConfig(ParallelConfigFactory::detect())
11+
->setRiskyAllowed(true)
12+
->setRules([
13+
'@PhpCsFixer' => true
14+
])
15+
->setUsingCache(false)
16+
->setFinder(
17+
(new Finder())
18+
->in(__DIR__)
19+
)
20+
;

clients/algoliasearch-client-php/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
2424
},
2525
"require-dev": {
26-
"friendsofphp/php-cs-fixer": "^3.80.0",
27-
"phpunit/phpunit": "^11.0",
26+
"friendsofphp/php-cs-fixer": "^3.91.3",
27+
"phpunit/phpunit": "^10.0",
2828
"vlucas/phpdotenv": "^5.4",
2929
"phpstan/phpstan": "^1.12"
3030
},

clients/algoliasearch-client-php/composer.lock

Lines changed: 314 additions & 407 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/.php-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.4.14
1+
8.1

config/clients.config.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,12 @@
273273
"snippets": {
274274
"extension": ".php",
275275
"outputFolder": "src"
276-
}
276+
},
277+
"supportedVersions": [
278+
"8.1",
279+
"8.2",
280+
"8.4"
281+
]
277282
},
278283
"python": {
279284
"clients": [

scripts/formatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function formatter(language: string, cwd: string): Promise<void> {
4848
case 'php':
4949
await runComposerInstall();
5050
await run(
51-
`php clients/algoliasearch-client-php/vendor/bin/php-cs-fixer fix ${cwd} --rules=@PhpCsFixer --using-cache=no --allow-risky=yes`,
51+
`php clients/algoliasearch-client-php/vendor/bin/php-cs-fixer fix ${cwd} --config=clients/algoliasearch-client-php/.php-cs-fixer.dist.php`,
5252
{ language },
5353
);
5454
break;

templates/do-not-edit-this-repository.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: Close PR
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v5
17+
- uses: actions/checkout@v6
1818

1919
- name: Close PR
2020
env:

templates/php/composer.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
2424
},
2525
"require-dev": {
26-
"friendsofphp/php-cs-fixer": "^3.80.0",
27-
"phpunit/phpunit": "^11.0",
26+
"friendsofphp/php-cs-fixer": "^3.91.3",
27+
"phpunit/phpunit": "^10.0",
2828
"vlucas/phpdotenv": "^5.4",
2929
"phpstan/phpstan": "^1.12"
3030
},

0 commit comments

Comments
 (0)