Skip to content

Commit b851b81

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into fix/lone-inheritDoc
2 parents eb696ed + bc6b0f6 commit b851b81

28 files changed

+686
-404
lines changed

Diff for: .github/workflows/php.yml

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
php-version:
16-
- "7.3"
1716
- "7.4"
1817
- "8.0"
1918
- "8.1"

Diff for: Magento2/Helpers/Commenting/PHPDocFormattingValidator.php

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ public function hasDeprecatedWellFormatted($commentStartPtr, $tokens)
123123
}
124124
$seePtr = $this->getTagPosition('@see', $commentStartPtr, $tokens);
125125
if ($seePtr === -1) {
126+
if (preg_match(
127+
"/This [a-zA-Z]* will be removed in version \d.\d.\d without replacement/",
128+
$tokens[$deprecatedPtr + 2]['content']
129+
)) {
130+
return true;
131+
}
126132
return false;
127133
}
128134

Diff for: Magento2/Rector/Tests/AddArrayAccessInterfaceReturnTypes/AddArrayAccessInterfaceReturnTypesTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class AddArrayAccessInterfaceReturnTypesTest extends AbstractRectorTestCase
1616
/**
1717
* @dataProvider provideData()
1818
*/
19-
public function test(SmartFileInfo $fileInfo): void
19+
public function test(string $fileInfo): void
2020
{
21-
$this->doTestFileInfo($fileInfo);
21+
$this->doTestFile($fileInfo);
2222
}
2323

2424
/**

Diff for: Magento2/Rector/Tests/ReplaceMbStrposNullLimit/ReplaceMbStrposNullLimitTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class ReplaceMbStrposNullLimitTest extends AbstractRectorTestCase
1616
/**
1717
* @dataProvider provideData()
1818
*/
19-
public function test(SmartFileInfo $fileInfo): void
19+
public function test(string $fileInfo): void
2020
{
21-
$this->doTestFileInfo($fileInfo);
21+
$this->doTestFile($fileInfo);
2222
}
2323

2424
/**

Diff for: Magento2/Rector/Tests/ReplaceNewDateTimeNull/ReplaceNewDateTimeNullTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class ReplaceNewDateTimeNullTest extends AbstractRectorTestCase
1616
/**
1717
* @dataProvider provideData()
1818
*/
19-
public function test(SmartFileInfo $fileInfo): void
19+
public function test(string $fileInfo): void
2020
{
21-
$this->doTestFileInfo($fileInfo);
21+
$this->doTestFile($fileInfo);
2222
}
2323

2424
/**

Diff for: Magento2/Rector/Tests/ReplacePregSplitNullLimit/ReplacePregSplitNullLimitTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class ReplacePregSplitNullLimitTest extends AbstractRectorTestCase
1616
/**
1717
* @dataProvider provideData()
1818
*/
19-
public function test(SmartFileInfo $fileInfo): void
19+
public function test(string $fileInfo): void
2020
{
21-
$this->doTestFileInfo($fileInfo);
21+
$this->doTestFile($fileInfo);
2222
}
2323

2424
/**

Diff for: Magento2/Sniffs/Commenting/ClassAndInterfacePHPDocFormattingSniff.php

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class ClassAndInterfacePHPDocFormattingSniff implements Sniff
2424
* @var string[] List of tags that can not be used in comments
2525
*/
2626
public $forbiddenTags = [
27+
'@author',
2728
'@category',
2829
'@package',
2930
'@subpackage'

Diff for: Magento2/Sniffs/Commenting/ClassPropertyPHPDocFormattingSniff.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class ClassPropertyPHPDocFormattingSniff extends AbstractVariableSniff
2929
T_NS_SEPARATOR,
3030
T_STRING,
3131
T_COMMENT,
32-
T_NULLABLE
32+
T_NULLABLE,
33+
T_BITWISE_AND,
34+
T_TYPE_UNION,
3335
];
3436

3537
/**

Diff for: Magento2/Sniffs/Legacy/TableNameSniff.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,10 @@ private function checkOccurrencesInProperty(File $phpcsFile, int $stackPtr, arra
189189
private function checkOccurrencesInArray(File $phpcsFile, int $stackPtr, array $tokens): void
190190
{
191191
$aliasPos = $phpcsFile->findPrevious(
192-
T_CONSTANT_ENCAPSED_STRING,
193-
$stackPtr -1
192+
T_WHITESPACE,
193+
$stackPtr - 1,
194+
null,
195+
true,
194196
);
195197

196198
$alias = trim($tokens[$aliasPos]['content'], '\'"');

0 commit comments

Comments
 (0)