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

Function xdebug_connect_to_client not found. #5735

Closed
marc-mabe opened this issue Oct 4, 2021 · 8 comments
Closed

Function xdebug_connect_to_client not found. #5735

marc-mabe opened this issue Oct 4, 2021 · 8 comments
Labels
Milestone

Comments

@marc-mabe
Copy link
Contributor

Bug report

PHPStan Version: 0.12.99
PHP Version: 8.0.10-cli-alpine

PHPStan reports Function xdebug_connect_to_client not found. even thought latest beta xdebug installed and I'm also checking if the function exists before.

Code snippet that reproduces the problem

https://phpstan.org/r/56ff2cfe-9677-49e7-98e7-6a8f1252aac2

Expected output

No Error

Did PHPStan help you today? Did it make you happy in any way?

It helps me every day catching my stupid mistakes :)

@ondrejmirtes
Copy link
Member

Please contribute the function signature to: https://github.com/phpstan/phpstan-src/blob/master/resources/functionMap.php (and also any other that was added in recent Xdebug releases), thanks.

@ondrejmirtes ondrejmirtes added this to the Easy fixes milestone Oct 4, 2021
@marc-mabe
Copy link
Contributor Author

@ondrejmirtes Sorry that I have to ask here but why doesn't it auto-detect the function via reflection?

@ondrejmirtes
Copy link
Member

@marc-mabe PHPStan disables Xdebug by default so that it runs faster, you can override that with --xdebug, but I don't recommend that unless you're debugging PHPStan.

@marc-mabe
Copy link
Contributor Author

@marc-mabe PHPStan disables Xdebug by default so that it runs faster, you can override that with --xdebug, but I don't recommend that unless you're debugging PHPStan.

Ahh good to know 😊
Opened a PR

@phpstan-bot
Copy link
Contributor

@marc-mabe After the latest commit in dev-master, PHPStan now reports different result with your code snippet:

@@ @@
-9: Function xdebug_connect_to_client not found.
+No errors

@phpstan-bot
Copy link
Contributor

@marc-mabe After the latest commit in dev-master, PHPStan now reports different result with your code snippet:

@@ @@
+PHP 8.0 (1 error)
+==========
+
+9: Function xdebug_connect_to_client not found.
+
+PHP 7.4
+==========
+
+No errors
+
+PHP 7.1 – 7.3 (1 error)
+==========
+
 9: Function xdebug_connect_to_client not found.
Full report

PHP 8.0 (1 error)

Line Error
9 Function xdebug_connect_to_client not found.

PHP 7.4

No errors

PHP 7.1 – 7.3 (1 error)

Line Error
9 Function xdebug_connect_to_client not found.

@ondrejmirtes
Copy link
Member

Fixed by phpstan/phpstan-src#699

@github-actions
Copy link

github-actions bot commented Nov 6, 2021

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 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants