Skip to content

Commit 76b9a8c

Browse files
authored
Require ext-mbstring + composer update (phpactor#2852)
Prevent historical off-by-one errors reported in phpactor#2838 due to the pollyfill
1 parent e45534e commit 76b9a8c

5 files changed

+46
-12
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Improvements:
2121
- Completion for `@internal` tag #2827 @mamazu
2222
- Add documentation for Nova Language Client #2830 @EmranMR
2323
- Enable fill constructor code action on attributes #2810 @mamazu
24+
- Require `ext-mbstring` extension to avoid off-by-one issues #2838 @dantleech
2425

2526
Bug fix:
2627

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Requirements
3030
------------
3131

3232
- PHP 8.1+
33+
- PHP [mbstring](https://www.php.net/manual/en/book.mbstring.php) extension.
3334
- [Composer](https://getcomposer.org/)
3435
- Linux or MacOS (Windows users will need to use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install))
3536

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"license": "MIT",
55
"require": {
66
"php": "^8.1",
7+
"ext-mbstring": "*",
78
"composer/xdebug-handler": "^3.0",
89
"symfony/yaml": "^5.1",
910
"phpactor/container": "^3.0",

composer.lock

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan-baseline.neon

+40-10
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,16 @@ parameters:
865865
count: 1
866866
path: lib/Completion/Tests/Unit/Bridge/TolerantParser/ChainTolerantCompletorTest.php
867867

868+
-
869+
message: "#^Property Phpactor\\\\Completion\\\\Tests\\\\Unit\\\\Bridge\\\\TolerantParser\\\\ChainTolerantCompletorTest\\:\\:\\$qualifiableCompletor1 \\(Prophecy\\\\Prophecy\\\\ObjectProphecy\\<Phpactor\\\\Completion\\\\Bridge\\\\TolerantParser\\\\TolerantCompletor&Phpactor\\\\Completion\\\\Bridge\\\\TolerantParser\\\\TolerantQualifiable\\>\\) does not accept \\$this\\(Phpactor\\\\Completion\\\\Tests\\\\Unit\\\\Bridge\\\\TolerantParser\\\\ChainTolerantCompletorTest\\)\\.$#"
870+
count: 1
871+
path: lib/Completion/Tests/Unit/Bridge/TolerantParser/ChainTolerantCompletorTest.php
872+
873+
-
874+
message: "#^Property Phpactor\\\\Completion\\\\Tests\\\\Unit\\\\Bridge\\\\TolerantParser\\\\ChainTolerantCompletorTest\\:\\:\\$qualifiableCompletor2 \\(Prophecy\\\\Prophecy\\\\ObjectProphecy\\<Phpactor\\\\Completion\\\\Bridge\\\\TolerantParser\\\\TolerantCompletor&Phpactor\\\\Completion\\\\Bridge\\\\TolerantParser\\\\TolerantQualifiable\\>\\) does not accept \\$this\\(Phpactor\\\\Completion\\\\Tests\\\\Unit\\\\Bridge\\\\TolerantParser\\\\ChainTolerantCompletorTest\\)\\.$#"
875+
count: 1
876+
path: lib/Completion/Tests/Unit/Bridge/TolerantParser/ChainTolerantCompletorTest.php
877+
868878
-
869879
message: "#^Method Phpactor\\\\Completion\\\\Tests\\\\Unit\\\\Bridge\\\\TolerantParser\\\\LimitingCompletorTest\\:\\:primeInnerCompletor\\(\\) has parameter \\$suggestions with no value type specified in iterable type array\\.$#"
870880
count: 1
@@ -5715,16 +5725,6 @@ parameters:
57155725
count: 1
57165726
path: lib/TextDocument/TextDocumentUri.php
57175727

5718-
-
5719-
message: "#^Parameter \\#2 \\$name of method Phpactor\\\\WorseReferenceFinder\\\\TolerantVariableReferenceFinder\\:\\:find\\(\\) expects string, string\\|null given\\.$#"
5720-
count: 1
5721-
path: lib/WorseReferenceFinder/TolerantVariableReferenceFinder.php
5722-
5723-
-
5724-
message: "#^Parameter \\#3 \\$uri of method Phpactor\\\\WorseReferenceFinder\\\\TolerantVariableReferenceFinder\\:\\:find\\(\\) expects string, Phpactor\\\\TextDocument\\\\TextDocumentUri\\|null given\\.$#"
5725-
count: 1
5726-
path: lib/WorseReferenceFinder/TolerantVariableReferenceFinder.php
5727-
57285728
-
57295729
message: "#^Method Phpactor\\\\WorseReferenceFinder\\\\WorsePlainTextClassDefinitionLocator\\:\\:resolveImportTable\\(\\) return type has no value type specified in iterable type array\\.$#"
57305730
count: 1
@@ -6115,6 +6115,26 @@ parameters:
61156115
count: 1
61166116
path: lib/WorseReflection/Core/NodeText.php
61176117

6118+
-
6119+
message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:byMemberClass\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\<T\\>\\) but returns static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\<M of T&object&T\\>\\)\\.$#"
6120+
count: 1
6121+
path: lib/WorseReflection/Core/Reflection/Collection/AbstractReflectionCollection.php
6122+
6123+
-
6124+
message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:fromReflections\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\<T\\>\\) but returns static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\<T\\>\\)\\.$#"
6125+
count: 1
6126+
path: lib/WorseReflection/Core/Reflection/Collection/AbstractReflectionCollection.php
6127+
6128+
-
6129+
message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\:\\:merge\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\<T\\>\\) but returns static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\AbstractReflectionCollection\\<T\\>\\)\\.$#"
6130+
count: 1
6131+
path: lib/WorseReflection/Core/Reflection/Collection/AbstractReflectionCollection.php
6132+
6133+
-
6134+
message: "#^PHPDoc tag @return contains generic type static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ClassLikeReflectionMemberCollection\\) but class Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ClassLikeReflectionMemberCollection is not generic\\.$#"
6135+
count: 1
6136+
path: lib/WorseReflection/Core/Reflection/Collection/ClassLikeReflectionMemberCollection.php
6137+
61186138
-
61196139
message: "#^Parameter \\#4 \\$node of class Phpactor\\\\WorseReflection\\\\Bridge\\\\TolerantParser\\\\Reflection\\\\ReflectionConstant constructor expects Microsoft\\\\PhpParser\\\\Node\\\\ConstElement, mixed given\\.$#"
61206140
count: 1
@@ -6125,6 +6145,16 @@ parameters:
61256145
count: 1
61266146
path: lib/WorseReflection/Core/Reflection/Collection/HomogeneousReflectionMemberCollection.php
61276147

6148+
-
6149+
message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\HomogeneousReflectionMemberCollection\\:\\:fromMembers\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\HomogeneousReflectionMemberCollection\\<T of Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionMember\\>\\) but returns static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\HomogeneousReflectionMemberCollection\\<Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionMember\\>\\)\\.$#"
6150+
count: 1
6151+
path: lib/WorseReflection/Core/Reflection/Collection/HomogeneousReflectionMemberCollection.php
6152+
6153+
-
6154+
message: "#^Method Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\HomogeneousReflectionMemberCollection\\:\\:map\\(\\) should return static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\HomogeneousReflectionMemberCollection\\<T of Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionMember\\>\\) but returns static\\(Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\HomogeneousReflectionMemberCollection\\<Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionMember\\>\\)\\.$#"
6155+
count: 1
6156+
path: lib/WorseReflection/Core/Reflection/Collection/HomogeneousReflectionMemberCollection.php
6157+
61286158
-
61296159
message: "#^Parameter \\#1 \\$items of class Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionConstantCollection constructor expects array\\<Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionConstant\\>, array\\<Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\Collection\\\\ReflectionConstant&T of Phpactor\\\\WorseReflection\\\\Core\\\\Reflection\\\\ReflectionMember\\> given\\.$#"
61306160
count: 1

0 commit comments

Comments
 (0)