Repository navigation
Update issue-bot dependencies - #6844
Merged
Merged
Conversation
…install it PostGenerator compares the diff it builds with the diff in earlier bot comments to avoid posting the same comment again. sebastian/diff 9 removed UnifiedDiffOutputBuilder and switched to a different diff algorithm, so it would produce different diffs for the same errors and the bot would comment again on issues it already commented on. Pin the major version the bot has been posting with. Amp-Thread-ID: https://ampcode.com/threads/T-01a176c6-528a-7430-b296-e66930d153b4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates issue-bot dependencies in small steps, one commit per step:
Json::FORCE_ARRAYwithforceArrays: trueNeon::encode()writes the generated playground config byte-for-byte the same as 3.4.Application::add()withaddCommand()^7.0directly.src/andconsole.phpuse it, but it only arrived through PHPUnit.Not updated: PHPUnit 13. It requires sebastian/diff 9, which removed
UnifiedDiffOutputBuilderand switched to a different diff algorithm.PostGeneratordecides whether to comment again by comparing its diff with the diff in the bot's earlier comment. On random error lists, diff 9 produced a different diff for about 22% of the pairs that diff 7 handled, so the bot would post again on issues it already commented on.Verification (PHP 8.5):
vendor/bin/phpunitpasses after every step (27 tests).../bin/phpstanreports only the 3RunCommand::runPool()errors that Build Issue Bot has reported on 2.3.x since September. They come from PHPStan 2.3.x-dev's own inference, not from these updates.PlaygroundClientfetched results from api.phpstan.org.Supersedes #6011, #3442, #6336 and #5920.
One expected change in bot output. The Issue bot run on this PR reports a changed result for phpstan/phpstan#11359 (
mb_ucfirst): no errors on PHP 8.4–8.6,Function mb_ucfirst not found.on 7.2–8.3. On 2.3.x the bot reports no error on any version. The cause is symfony/polyfill-mbstring 1.37 → 1.43, which comes from the patch-level update in the first commit.bin/phpstanloads issue-bot's ownvendor/autoload.phpwhile it analyses playground snippets. The old polyfill declaredmb_ucfirstin itsbootstrap.php, where PHPStan found it for every PHP version. 1.43 moved those declarations tobootstrap72.php. I confirmed this locally by swapping only that package in the old vendor directory. The new result is the correct one, becausemb_ucfirstexists only from PHP 8.4. Evaluating the same CI artifacts with the old and the new dependencies gives byte-identical output, so nothing else changes. After this is merged, the bot will post this one comment on #11359.