Skip to content

Commit 4ae5969

Browse files
committed
update dev dependencies
Fix styling Fix styling
1 parent e6e89fc commit 4ae5969

File tree

6 files changed

+35
-30
lines changed

6 files changed

+35
-30
lines changed

composer.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@
2222
"spatie/laravel-package-tools": "^1.13.0"
2323
},
2424
"require-dev": {
25-
"driftingly/rector-laravel": "^0.21.0",
26-
"laravel/pint": "^1.10.4",
27-
"nunomaduro/collision": "^7.7.0",
28-
"nunomaduro/larastan": "^2.6.3",
29-
"orchestra/testbench": "^8.5.10",
25+
"driftingly/rector-laravel": "^1.0",
26+
"larastan/larastan": "^2.9.2",
27+
"laravel/pint": "^1.14.0",
28+
"nunomaduro/collision": "^7.10.0",
29+
"orchestra/testbench": "^8.22.0",
3030
"phpstan/extension-installer": "^1.3.1",
31-
"phpstan/phpstan-deprecation-rules": "^1.1.3",
32-
"phpstan/phpstan-phpunit": "^1.3.13",
33-
"phpstan/phpstan-strict-rules": "^1.5.1",
34-
"phpunit/phpunit": "^10.2.5",
31+
"phpstan/phpstan-deprecation-rules": "^1.1.4",
32+
"phpstan/phpstan-phpunit": "^1.3.16",
33+
"phpstan/phpstan-strict-rules": "^1.5.2",
34+
"phpunit/phpunit": "^10.5.13",
3535
"psr/log": "^3.0",
36-
"rector/rector": "^0.17.5",
37-
"sentry/sentry": "^3.20.1",
38-
"symfony/http-client": "^6.3.1"
36+
"rector/rector": "^1.0.3",
37+
"sentry/sentry": "^4.6.1",
38+
"symfony/http-client": "^6.4.5"
3939
},
4040
"autoload": {
4141
"psr-4": {
@@ -52,9 +52,7 @@
5252
},
5353
"scripts": {
5454
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
55-
"post-update-cmd": [
56-
"@composer bump --dev-only"
57-
],
55+
"post-update-cmd": "@composer bump --dev-only",
5856
"analyse": "vendor/bin/phpstan analyse",
5957
"test": "vendor/bin/phpunit",
6058
"test-coverage": "vendor/bin/phpunit --coverage",

rector.php

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,27 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6-
use Rector\Set\ValueObject\LevelSetList;
6+
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
7+
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
78
use RectorLaravel\Set\LaravelSetList;
89

9-
return static function (RectorConfig $rectorConfig): void {
10-
$rectorConfig->paths([
10+
return RectorConfig::configure()
11+
->withPreparedSets()
12+
->withSets([
13+
LaravelSetList::LARAVEL_100,
14+
])
15+
->withPhpSets()
16+
->withPaths([
1117
__DIR__.'/config',
1218
__DIR__.'/src',
1319
__DIR__.'/tests',
20+
])
21+
->withRootFiles()
22+
->withSkip([
23+
ReadOnlyPropertyRector::class => [
24+
'src/Client/ElasticaClient.php',
25+
],
26+
StringClassNameToClassConstantRector::class => [
27+
'src/Client/ElasticaClient.php',
28+
],
1429
]);
15-
16-
$rectorConfig->sets([
17-
LevelSetList::UP_TO_PHP_81,
18-
LaravelSetList::LARAVEL_100,
19-
]);
20-
};

src/Exception/BaseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
abstract class BaseException extends RuntimeException
1111
{
12-
public function __construct(string $message, int $code = 0, Throwable $previous = null)
12+
public function __construct(string $message, int $code = 0, ?Throwable $previous = null)
1313
{
1414
parent::__construct($message, $code, $previous);
1515
}

src/Index/AbstractIndex.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function getElasticaIndex(): Index
6060
}
6161

6262
/**
63-
* @param int $size Max number of elements to be retrieved aka limit
64-
* @param int $from Number of elements to skip from the beginning aka offset
63+
* @param int $size Max number of elements to be retrieved aka limit
64+
* @param int $from Number of elements to skip from the beginning aka offset
6565
* @return Model[]
6666
*/
6767
public function searchForElements(Query\AbstractQuery $query, int $size = 10, int $from = 0): array

src/Index/IndexInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ public function getModelInstance(Document $document): Model;
134134

135135
/**
136136
* Given a Laravel model, return the corresponding Elastica document.
137-
*
138-
* @return Document
139137
*/
140138
public function getDocumentInstance(Model|ElasticsearchableInterface $model): ?Document;
141139

src/Jobs/AbstractIndexJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Illuminate\Queue\SerializesModels;
1414
use Limenet\LaravelElasticaBridge\Index\IndexInterface;
1515

16-
abstract class AbstractIndexJob implements ShouldQueue, ShouldBeUnique
16+
abstract class AbstractIndexJob implements ShouldBeUnique, ShouldQueue
1717
{
1818
use Dispatchable;
1919
use InteractsWithQueue;

0 commit comments

Comments
 (0)