Skip to content

Commit b5a6db1

Browse files
committed
Updated Rector to commit 2dad902c5232e23cadfb517d652190ba0ebf3c33
rectorphp/rector-src@2dad902 [Php85] Skip increment/decrement on ArrayFirstLastRector (#9079)
1 parent c354167 commit b5a6db1

8 files changed

Lines changed: 40 additions & 32 deletions

File tree

‎rules/Php85/Rector/ArrayDimFetch/ArrayFirstLastRector.php‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ private function shouldSkip(ArrayDimFetch $arrayDimFetch, Node $scopeNode): bool
161161
if ($arrayDimFetch->getAttribute(AttributeKey::IS_ASSIGN_OP_VAR) === \true) {
162162
return \true;
163163
}
164+
if ($arrayDimFetch->getAttribute(AttributeKey::IS_INCREMENT_OR_DECREMENT) === \true) {
165+
return \true;
166+
}
164167
return (bool) $arrayDimFetch->getAttribute(AttributeKey::IS_UNSET_VAR);
165168
}
166169
}

‎src/Application/VersionResolver.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'c90860d25fe98cefa6c5ef9710aa3575c79e4e10';
22+
public const PACKAGE_VERSION = '2dad902c5232e23cadfb517d652190ba0ebf3c33';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-11-27 12:35:18';
27+
public const RELEASE_DATE = '2026-11-27 16:14:47';
2828
/**
2929
* @var int
3030
*/

‎vendor/composer/installed.json‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,17 +1981,17 @@
19811981
},
19821982
{
19831983
"name": "symfony\/filesystem",
1984-
"version": "v8.1.12",
1985-
"version_normalized": "8.1.12.0",
1984+
"version": "v8.1.13",
1985+
"version_normalized": "8.1.13.0",
19861986
"source": {
19871987
"type": "git",
19881988
"url": "https:\/\/github.com\/symfony\/filesystem.git",
1989-
"reference": "a8f7a3cf9d3140902eaee85baf1f8e98666d336a"
1989+
"reference": "5215ed1c40d7f5532dc109f53f0defd3478ac6ea"
19901990
},
19911991
"dist": {
19921992
"type": "zip",
1993-
"url": "https:\/\/api.github.com\/repos\/symfony\/filesystem\/zipball\/a8f7a3cf9d3140902eaee85baf1f8e98666d336a",
1994-
"reference": "a8f7a3cf9d3140902eaee85baf1f8e98666d336a",
1993+
"url": "https:\/\/api.github.com\/repos\/symfony\/filesystem\/zipball\/5215ed1c40d7f5532dc109f53f0defd3478ac6ea",
1994+
"reference": "5215ed1c40d7f5532dc109f53f0defd3478ac6ea",
19951995
"shasum": ""
19961996
},
19971997
"require": {
@@ -2003,8 +2003,8 @@
20032003
"require-dev": {
20042004
"symfony\/process": "^7.4|^8.0"
20052005
},
2006-
"time": "2026-11-24T15:59:55+00:00",
2007-
"published-time": "2026-11-25T09:29:32+00:00",
2006+
"time": "2026-11-27T13:27:33+00:00",
2007+
"published-time": "2026-11-27T14:50:03+00:00",
20082008
"type": "library",
20092009
"installation-source": "dist",
20102010
"autoload": {
@@ -2032,7 +2032,7 @@
20322032
"description": "Provides basic utilities for the filesystem",
20332033
"homepage": "https:\/\/symfony.com",
20342034
"support": {
2035-
"source": "https:\/\/github.com\/symfony\/filesystem\/tree\/v8.1.12"
2035+
"source": "https:\/\/github.com\/symfony\/filesystem\/tree\/v8.1.13"
20362036
},
20372037
"funding": [
20382038
{
@@ -2056,17 +2056,17 @@
20562056
},
20572057
{
20582058
"name": "symfony\/finder",
2059-
"version": "v8.1.12",
2060-
"version_normalized": "8.1.12.0",
2059+
"version": "v8.1.13",
2060+
"version_normalized": "8.1.13.0",
20612061
"source": {
20622062
"type": "git",
20632063
"url": "https:\/\/github.com\/symfony\/finder.git",
2064-
"reference": "7022913b72c56ac5123922726aa94f2f98b726ad"
2064+
"reference": "5dc8602a3ad3430a97efb70f9d7e9f0aec1410dc"
20652065
},
20662066
"dist": {
20672067
"type": "zip",
2068-
"url": "https:\/\/api.github.com\/repos\/symfony\/finder\/zipball\/7022913b72c56ac5123922726aa94f2f98b726ad",
2069-
"reference": "7022913b72c56ac5123922726aa94f2f98b726ad",
2068+
"url": "https:\/\/api.github.com\/repos\/symfony\/finder\/zipball\/5dc8602a3ad3430a97efb70f9d7e9f0aec1410dc",
2069+
"reference": "5dc8602a3ad3430a97efb70f9d7e9f0aec1410dc",
20702070
"shasum": ""
20712071
},
20722072
"require": {
@@ -2075,8 +2075,8 @@
20752075
"require-dev": {
20762076
"symfony\/filesystem": "^7.4|^8.0"
20772077
},
2078-
"time": "2026-11-24T15:06:41+00:00",
2079-
"published-time": "2026-11-25T09:29:36+00:00",
2078+
"time": "2026-11-27T14:07:58+00:00",
2079+
"published-time": "2026-11-27T14:50:47+00:00",
20802080
"type": "library",
20812081
"installation-source": "dist",
20822082
"autoload": {
@@ -2104,7 +2104,7 @@
21042104
"description": "Finds files and directories via an intuitive fluent interface",
21052105
"homepage": "https:\/\/symfony.com",
21062106
"support": {
2107-
"source": "https:\/\/github.com\/symfony\/finder\/tree\/v8.1.12"
2107+
"source": "https:\/\/github.com\/symfony\/finder\/tree\/v8.1.13"
21082108
},
21092109
"funding": [
21102110
{
@@ -2658,17 +2658,17 @@
26582658
},
26592659
{
26602660
"name": "symfony\/string",
2661-
"version": "v7.4.24",
2662-
"version_normalized": "7.4.24.0",
2661+
"version": "v7.4.25",
2662+
"version_normalized": "7.4.25.0",
26632663
"source": {
26642664
"type": "git",
26652665
"url": "https:\/\/github.com\/symfony\/string.git",
2666-
"reference": "71cd5014e85d05d46796ce60dc4aed9104122b89"
2666+
"reference": "93c0ef02c1548d3b9498e8c4cc92f77106ca5d46"
26672667
},
26682668
"dist": {
26692669
"type": "zip",
2670-
"url": "https:\/\/api.github.com\/repos\/symfony\/string\/zipball\/71cd5014e85d05d46796ce60dc4aed9104122b89",
2671-
"reference": "71cd5014e85d05d46796ce60dc4aed9104122b89",
2670+
"url": "https:\/\/api.github.com\/repos\/symfony\/string\/zipball\/93c0ef02c1548d3b9498e8c4cc92f77106ca5d46",
2671+
"reference": "93c0ef02c1548d3b9498e8c4cc92f77106ca5d46",
26722672
"shasum": ""
26732673
},
26742674
"require": {
@@ -2689,8 +2689,8 @@
26892689
"symfony\/translation-contracts": "^2.5|^3.0",
26902690
"symfony\/var-exporter": "^6.4|^7.0|^8.0"
26912691
},
2692-
"time": "2026-11-24T15:24:17+00:00",
2693-
"published-time": "2026-11-25T09:24:05+00:00",
2692+
"time": "2026-11-25T18:09:18+00:00",
2693+
"published-time": "2026-11-27T14:42:23+00:00",
26942694
"type": "library",
26952695
"installation-source": "dist",
26962696
"autoload": {
@@ -2729,7 +2729,7 @@
27292729
"utf8"
27302730
],
27312731
"support": {
2732-
"source": "https:\/\/github.com\/symfony\/string\/tree\/v7.4.24"
2732+
"source": "https:\/\/github.com\/symfony\/string\/tree\/v7.4.25"
27332733
},
27342734
"funding": [
27352735
{

‎vendor/composer/installed.php‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎vendor/symfony/filesystem/Path.php‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ public static function getFilenameWithoutExtension(string $path, ?string $extens
228228
return '';
229229
}
230230
if (null !== $extension) {
231-
// remove extension and trailing dot
232-
return rtrim(basename($path, $extension), '.');
231+
$filename = basename($path);
232+
if (strncmp($extension, '.', strlen('.')) === 0 || substr_compare($filename, '.' . $extension, -strlen('.' . $extension)) === 0) {
233+
$filename = basename($filename, $extension);
234+
}
235+
return rtrim($filename, '.');
233236
}
234237
return pathinfo($path, \PATHINFO_FILENAME);
235238
}

‎vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function isAccepted(string $string): bool
7171
*/
7272
protected function isRegex(string $str): bool
7373
{
74-
$availableModifiers = 'imsxuADUn';
74+
$availableModifiers = 'imsxuADUnSXJr';
7575
if (preg_match('/^(.{3,}?)[' . $availableModifiers . ']*$/', $str, $m)) {
7676
$start = substr($m[1], 0, 1);
7777
$end = substr($m[1], -1);

‎vendor/symfony/string/AbstractUnicodeString.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ public function reverse()
340340
public function snake()
341341
{
342342
$str = $this->camel();
343-
$str->string = mb_strtolower(preg_replace(['/(\p{Lu}+)(\p{Lu}\p{Ll})/u', '/([\p{Ll}0-9])(\p{Lu})/u'], '\1_\2', $str->string), 'UTF-8');
343+
$str->string = preg_replace('/(\p{Lu})(?=\p{Lu}\p{Ll})/u', '\1_', $str->string);
344+
$str->string = mb_strtolower(preg_replace('/([\p{Ll}0-9])(\p{Lu})/u', '\1_\2', $str->string), 'UTF-8');
344345
return $str;
345346
}
346347
/**

‎vendor/symfony/string/ByteString.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ public function slice(int $start = 0, ?int $length = null)
344344
public function snake()
345345
{
346346
$str = $this->camel();
347-
$str->string = strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $str->string));
347+
$str->string = preg_replace('/([A-Z])(?=[A-Z][a-z])/', '\1_', $str->string);
348+
$str->string = strtolower(preg_replace('/([a-z\d])([A-Z])/', '\1_\2', $str->string));
348349
return $str;
349350
}
350351
/**

0 commit comments

Comments
 (0)