Skip to content

Commit

Permalink
Fixed bin proxies on PHP < 8 to support stream_seek (#10468)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstevenson committed Jan 21, 2022
1 parent 6a70161 commit db64534
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Composer/Installer/BinaryInstaller.php
Expand Up @@ -333,6 +333,16 @@ public function stream_lock(\$operation)
return \$operation ? flock(\$this->handle, \$operation) : true;
}
public function stream_seek(\$offset, \$whence)
{
if (0 === fseek(\$this->handle, \$offset, \$whence)) {
\$this->position = ftell(\$this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return \$this->position;
Expand Down

0 comments on commit db64534

Please sign in to comment.