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

AsyncMysql tests have been skipped since hhvm 4.9 (removal of mysqli) #910

Closed
lexidor opened this issue Aug 28, 2020 · 4 comments · Fixed by #911
Closed

AsyncMysql tests have been skipped since hhvm 4.9 (removal of mysqli) #910

lexidor opened this issue Aug 28, 2020 · 4 comments · Fixed by #911

Comments

@lexidor
Copy link
Contributor

lexidor commented Aug 28, 2020

This statement dies with the message Fail since hhvm 4.9.0, when mysqli was removed.

api-examples/__includes/async_mysql_require_env.inc.php

if (!extension_loaded('mysql') || !function_exists('mysqli_connect')) {
  die('Skip');
}
@jjergus
Copy link
Contributor

jjergus commented Aug 28, 2020

Even worse, I recently found out we don't actually typecheck or run any examples from api-examples/... (only from guides/...). I have it on a list of things to fix after the XHP update lands (#901).

This one should have been caught by the typechecker because it calls mysqli_connect later, which doesn't exist. However, this example also depends on a running MySQL server with the exact DB+table contents, so I'm not sure if there's any good way to fix it even if we updated it to use async-mysql instead of mysqli :(

@fredemmott
Copy link
Contributor

So, these tests at least used to be runnable if you set the correct environment variables

While this is a pain, we should consider making it 'just work' in dockerized dev/test environments (including CI), with a memory-backed mysql instance

@lexidor
Copy link
Contributor Author

lexidor commented Aug 28, 2020

This one should have been caught by the typechecker because it calls mysqli_connect later, which doesn't exist.

This is top level code in a // partial file, so it isn't typechecked...

@fredemmott
Copy link
Contributor

We should consistently kill all .php files from the examples, except for a 'legacy features' example :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants