Skip to content

Regression: stream_bucket_new Reflection return resource — Zend object (re-#27797 default profile, ext/standard/streamsfuncs.stub.php) #28824

Description

@PurHur

Category

Regression · php-src-strict · Reflection · default / PHP 8.2 profile · pillar 4

Problem

On the default (8.2) profile, runtime stream_bucket_new() correctly returns an object (stdClass on 8.2; StreamBucket under PROFILE≥8.4), but Reflection still advertises return type resource. Zend 8.2 Reflection reports object.

Distinct from closed #27797 (PROFILE=8.4 StreamBucket stub shapes) — this is the reference-profile return-type wire still wrong after that close.

Verified on master @b394c0c47e via ./script/docker-exec.sh (2026-08-08), PHP_COMPILER_PROFILE unset.

Symbol Zend 8.2 Reflection (php -n) VM default
stream_bucket_new return object resource
runtime gettype(stream_bucket_new(...)) object object (match)

php-src reference

PHP implementation target

  • Wire Reflection / InternalArgInfo for stream_bucket_new (and siblings if still drifting) to profile-correct stubs in ext/standard — object on 8.2, StreamBucket on ≥8.4
  • PHP-in-PHP; no new runtime/*.c

Repro

./script/docker-exec.sh -- bash -lc 'unset PHP_COMPILER_PROFILE
cat > /tmp/sb_ref.php <<'"'"'PHP'"'"'
<?php
$r = new ReflectionFunction("stream_bucket_new");
echo "ret=", $r->hasReturnType() ? (string)$r->getReturnType() : "none", "\n";
PHP
php -n /tmp/sb_ref.php
php bin/vm.php /tmp/sb_ref.php
'

Done when

Maintainer gate snapshot (2026-08-08)

Probe green; release-readiness red (helper-runtime-prelink fingerprint mismatch + cold-build timeout).

Activity

  1. added
    bugSomething isn't working
    phase-4:stdlibPhase 4 – stdlib for web apps
    area:vmVirtual machine
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Aug 8, 2026
  2. PurHur commented on Aug 9, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — batch (issues #28857, #28824, #28908, #28568, #28842)

    Streams/sockets/proc Reflection stub cluster (php-src-strict). Sequential PRs; starting with #28824 when its turn.

  3. PurHur commented on Aug 9, 2026

    @PurHur
    OwnerAuthor

    Merged via #29256

    Verification: default-profile repro → ret=object; PROFILE=8.4 StreamBucket unchanged (#27797). PHPUnit OK (3 tests).

    Next in batch: #28908 (stream_filter_append/prepend param names + untyped return).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinebugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions