Skip to content

Commit bc5e2ed

Browse files
committed
Merge branch 'release/3.5.1'
# Conflicts: # psalm-baseline.xml # src/Optimization/Enqueue.php
2 parents 0bd0f8e + 2a5bc34 commit bc5e2ed

File tree

6 files changed

+11
-48
lines changed

6 files changed

+11
-48
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@
2626
"composer/installers": "^2.2",
2727
"jazzman/autoload-interface": "^0.3.1",
2828
"jazzman/wp-app-config": "^2.3",
29-
"jazzman/wp-db-pdo": "^0.1.5"
29+
"jazzman/wp-db-pdo": "^0.1.6"
3030
},
3131
"require-dev": {
3232
"jazzman/php-cs-fixer-rules": "^0.2.1",
33-
"jetbrains/phpstorm-attributes": "@dev",
34-
"php-stubs/wordpress-stubs": "^6.3",
35-
"phpstan/extension-installer": "^1.3",
36-
"rector/rector": "^0.17.13",
33+
"jetbrains/phpstorm-attributes": "^1.2",
34+
"php-stubs/wordpress-stubs": "^6.7",
35+
"phpstan/extension-installer": "^1.4",
36+
"rector/rector": "^1.2",
3737
"roave/security-advisories": "@dev",
38-
"roots/wordpress": "^6.3",
38+
"roots/wordpress": "^6.7",
3939
"szepeviktor/phpstan-wordpress": "^1.3"
4040
},
4141
"autoload": {

phpstan-baseline.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ parameters:
2626
path: src/Optimization/Update.php
2727

2828
-
29-
message: "#^PHPDoc tag @var with type array\\<int\\> is not subtype of native type mixed\\.$#"
29+
message: "#^Parameter \\#1 \\$maybeint of function absint expects array\\|bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#"
3030
count: 2
3131
path: src/Optimization/WPQuery.php
3232

phpstan-rector.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
includes:
2-
- phar://vendor/rector/vendor/phpstan/phpstan.phar/conf/bleedingEdge.neon
2+
- phar://vendor/phpstan/phpstan/phpstan.phar/conf/bleedingEdge.neon
33
- phpstan.neon.dist

psalm.xml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,6 @@
2020
</ignoreFiles>
2121
</projectFiles>
2222

23-
<issueHandlers>
24-
<TooManyArguments>
25-
<errorLevel type="suppress">
26-
<referencedFunction name="apply_filters"/>
27-
</errorLevel>
28-
</TooManyArguments>
29-
<MissingClosureParamType>
30-
<errorLevel type="suppress">
31-
<directory name="src"/>
32-
</errorLevel>
33-
</MissingClosureParamType>
34-
<MixedReturnStatement>
35-
<errorLevel type="suppress">
36-
<file name="src/helper.php"/>
37-
</errorLevel>
38-
</MixedReturnStatement>
39-
<MixedArgumentTypeCoercion>
40-
<errorLevel type="suppress">
41-
<file name="src/Optimization/Update.php"/>
42-
</errorLevel>
43-
</MixedArgumentTypeCoercion>
44-
<MissingFile>
45-
<errorLevel type="suppress">
46-
<file name="src/Optimization/Update.php"/>
47-
</errorLevel>
48-
</MissingFile>
49-
<DuplicateFunction>
50-
<errorLevel type="suppress">
51-
<file name="src/helper.php"/>
52-
</errorLevel>
53-
</DuplicateFunction>
54-
</issueHandlers>
55-
5623
<stubs>
5724
<file name="vendor/php-stubs/wordpress-stubs/wordpress-stubs.php" preloadClasses="true"/>
5825
</stubs>
@@ -62,5 +29,7 @@
6229
<var name="wp_rewrite" type="\WP_Rewrite"/>
6330
<var name="wp_version" type="string"/>
6431
<var name="ABSPATH" type="string"/>
32+
<var name="WPINC" type="string"/>
33+
<var name="SCRIPT_DEBUG" type="boolean"/>
6534
</globals>
6635
</psalm>

rector.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
declare( strict_types=1 );
44

5-
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
65
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
76
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
87
use Rector\Config\RectorConfig;
@@ -11,8 +10,6 @@
1110
use Rector\Set\ValueObject\SetList;
1211
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
1312

14-
// use Rector\TypeDeclaration\Rector\ClassMethod\ArrayShapeFromConstantArrayReturnRector;
15-
1613
return static function ( RectorConfig $config ): void {
1714
$config->sets( [
1815
SetList::CODE_QUALITY,
@@ -29,7 +26,6 @@
2926
$config->removeUnusedImports();
3027
$config->importShortClasses( false );
3128
$config->parallel();
32-
// $config->cacheDirectory(__DIR__.'/cache/rector');
3329
$config->phpstanConfig( __DIR__.'/phpstan-rector.neon' );
3430

3531
$config->paths( [
@@ -40,12 +36,9 @@
4036
$config->skip( [
4137
__DIR__.'/vendor',
4238
__DIR__.'/cache',
43-
CallableThisArrayToAnonymousFunctionRector::class,
44-
// ClassConstantToSelfClassRector::class,
4539
RemoveExtraParametersRector::class,
4640
EncapsedStringsToSprintfRector::class,
4741
DisallowedEmptyRuleFixerRector::class,
4842
SimplifyEmptyCheckOnEmptyArrayRector::class,
49-
// ArrayShapeFromConstantArrayReturnRector::class,
5043
] );
5144
};

src/Optimization/Update.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ private static function preSiteTransientUpdatePlugins(): object {
420420
if ( null === $pluginsList ) {
421421
// Add our plugin file if we don't have it.
422422
if ( ! \function_exists( 'get_plugins' ) ) {
423+
/** @psalm-suppress MissingFile */
423424
require_once ABSPATH.'wp-admin/includes/plugin.php';
424425
}
425426

0 commit comments

Comments
 (0)