Skip to content

Remove react/filesystem dev dependency; use file_get_contents for file reading#84

Merged
voku merged 3 commits intomasterfrom
copilot/update-for-php-8-4
Apr 11, 2026
Merged

Remove react/filesystem dev dependency; use file_get_contents for file reading#84
voku merged 3 commits intomasterfrom
copilot/update-for-php-8-4

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

react/filesystem ^0.2@dev has never had a stable release, forcing downstream users to set minimum-stability: dev in their composer.json to install this package.

Changes

  • composer.json: Removed react/async and react/filesystem dependencies entirely
  • PhpCodeParser.php: Replaced the promise-based async file reading with plain file_get_contents(); all reads were already being await()-ed synchronously so there is no behavioral difference

Before:

$filesystem = \React\Filesystem\Factory::create();
foreach ($phpFileArrayChunk as $cacheKey => $path) {
    $phpFilePromises[] = $filesystem->detect($path)->then(/* ... */);
}
$phpFilePromiseResponses = await(all($phpFilePromises));

After:

foreach ($phpFileArray as $cacheKey => $path) {
    $content = \file_get_contents($path);
    // ...
}

Copilot AI linked an issue Apr 11, 2026 that may be closed by this pull request
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copilot AI changed the title [WIP] Update dependencies for compatibility with PHP 8.4 Remove react/filesystem dev dependency; use file_get_contents for file reading Apr 11, 2026
Copilot AI requested a review from voku April 11, 2026 06:59
Copilot finished work on behalf of voku April 11, 2026 06:59
@voku voku marked this pull request as ready for review April 11, 2026 07:14
@voku voku merged commit 1566369 into master Apr 11, 2026
13 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update for use with PHP 8.4

2 participants