Skip to content

ext/spl: fix class_parents for classes with leading slash in non-autoload mode#22283

Merged
Girgias merged 1 commit into
php:PHP-8.4from
jorgsowa:fix/spl-class-parents-leading-backslash-8.4
Jun 24, 2026
Merged

ext/spl: fix class_parents for classes with leading slash in non-autoload mode#22283
Girgias merged 1 commit into
php:PHP-8.4from
jorgsowa:fix/spl-class-parents-leading-backslash-8.4

Conversation

@jorgsowa

Copy link
Copy Markdown
Contributor

Extracted from #22260

Instead of custom logic, we can reuse zend_lookup_class_ex in spl_find_ce_by_name

FIxes #22282

@jorgsowa
jorgsowa requested a review from Girgias as a code owner June 11, 2026 23:24
@jorgsowa
jorgsowa changed the base branch from master to PHP-8.4 June 11, 2026 23:27
@Girgias
Girgias merged commit 7f4e0f4 into php:PHP-8.4 Jun 24, 2026
17 of 18 checks passed
Girgias added a commit that referenced this pull request Jun 24, 2026
* PHP-8.5:
  NEWS entries for recent SPL bug fixes
  ext/spl: ignore leading namespace separator in spl_autoload() (#22323)
  ext/spl: fix class_parents for classes with leading slash in non-autoload mode (#22283)
hariuc pushed a commit to hariuc/php-src that referenced this pull request Jun 24, 2026
* PHP-8.4:
  NEWS entries for recent SPL bug fixes
  ext/spl: ignore leading namespace separator in spl_autoload() (php#22323)
  ext/spl: fix class_parents for classes with leading slash in non-autoload mode (php#22283)
@jorgsowa
jorgsowa deleted the fix/spl-class-parents-leading-backslash-8.4 branch July 10, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spl: class_* functions should ignore leading slash in class name in non-autoload mode

2 participants