Skip to content

unregister_tick_function: First-class callable syntax fails to unregister on PHP 8.5 #22118

@solverat

Description

@solverat

Description

When using rector on one of our application, a closure registration changed from:

register_tick_function([$this, 'kick'])
unregister_tick_function([$this, 'kick']);

to

register_tick_function($this->kick(...));
unregister_tick_function($this->kick(...));
  • Works on: PHP 8.4
  • Fails on: PHP 8.5

Reproducable via this one: https://onlinephp.io/c/e6e79

The only internal change I found touching tick functions in 8.5 was php-src#18033, but that only moved the timing of php_deactivate_ticks() during shutdown and seems unrelated to this issue.

If this is intentional, it should be documented in the UPGRADING file.

PHP Version

PHP 8.5.6

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions