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

Class, interface or enum named APCuIterator does not exist #7912

Closed
ricardoboss opened this issue Apr 30, 2022 · 2 comments · Fixed by #7982
Closed

Class, interface or enum named APCuIterator does not exist #7912

ricardoboss opened this issue Apr 30, 2022 · 2 comments · Fixed by #7982

Comments

@ricardoboss
Copy link
Contributor

See: https://psalm.dev/r/8daba04c8c

Ref: https://www.php.net/manual/en/apcuiterator.construct.php

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/8daba04c8c
<?php

use APCuIterator;

$iterator = new APCuIterator(['a']);

apcu_delete($iterator);
Psalm output (using commit f960d71):

ERROR: UndefinedClass - 5:17 - Class, interface or enum named APCuIterator does not exist

INFO: MixedAssignment - 5:1 - Unable to determine the type that $iterator is being assigned to

INFO: MixedArgument - 7:13 - Argument 1 of apcu_delete cannot be mixed, expecting APCuIterator|string

@KevinVanSonsbeek
Copy link
Contributor

Mhm, having a look around, seems i can find the APCuIterator in the CallMap and CallMap_historical. Could this behavior be caused by the lack of a stub for the extension? @orklah

Seeing how adding a stub locally for the class fixes the errors.

orklah added a commit that referenced this issue May 18, 2022
…uIterator-does-not-exist

Bugfix/#7912 class APCuIterator does not exist
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.

2 participants