Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backslash removed from FQCN in tests #8118

Closed
szepeviktor opened this issue Oct 6, 2022 · 4 comments
Closed

Backslash removed from FQCN in tests #8118

szepeviktor opened this issue Oct 6, 2022 · 4 comments

Comments

@szepeviktor
Copy link
Contributor

szepeviktor commented Oct 6, 2022

Bug report

I'm sorry, I cannot write code in phpstan.org/try

phpstan-wordress tests do not pass with latest PHPStan:

--- Expected

+++ Actual

@@ @@

-'\WP_List_Table|false'

+'WP_List_Table|false'

from https://app.travis-ci.com/github/szepeviktor/phpstan-wordpress/jobs/584859030

extension: https://github.com/szepeviktor/phpstan-wordpress/blob/d44b5abcaa529698e138b2d21bc2a7cf9834039c/src/GetListTableDynamicFunctionReturnTypeExtension.php#L40-L47
test code: https://github.com/szepeviktor/phpstan-wordpress/blob/e644df734e1bbe95810e0f617d17df091048a94e/tests/data/_get_list_table.php#L13-L14
function definition in WordPress (no namespace):

     * @param string $class_name The type of the list table, which is the class name.
     * @param array  $args       Optional. Arguments to pass to the class. Accepts 'screen'.
     * @return WP_List_Table|false List table object on success, false if the class does not exist.
     */
    function _get_list_table($class_name, $args = array()

Please help. I'm not able to debug PHPStan.
Thank you.

@mergeable
Copy link

mergeable bot commented Oct 6, 2022

This bug report is missing a link to reproduction at phpstan.org/try.

It will most likely be closed after manual review.

@ondrejmirtes
Copy link
Member

Likely an expected side effect of this change phpstan/phpstan-src#1758

@szepeviktor
Copy link
Contributor Author

Thank you.

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants