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 or interface GEOSGeometry does not exist #4913

Open
BenMorel opened this issue Dec 29, 2020 · 2 comments
Open

Class or interface GEOSGeometry does not exist #4913

BenMorel opened this issue Dec 29, 2020 · 2 comments
Labels

Comments

@BenMorel
Copy link
Contributor

I just tried release 4.3.2 that contains the GEOS stubs that I PR'ed earlier in #4902, but after removing my PHP stubs, Psalm reports a lot of these errors:

ERROR: UndefinedClass - src/Engine/GEOSEngine.php:430:36 - Class or interface GEOSGeometry does not exist (see https://psalm.dev/019)

Is it expected that Psalm cannot analyze a class that's not available at runtime? Or did I miss something in my PR?

Background: in brick/geo, GEOS is an optional dependency, and I usually do not have the extension installed myself locally, when I run Psalm. It's only installed in CI, where tests are run on each GIS engine, GEOS included. I would like Psalm to know the GEOSGeometry class structure even when the extension is not loaded.

@psalm-github-bot
Copy link

Hey @BenMorel, can you reproduce the issue on https://psalm.dev ?

@orklah
Copy link
Collaborator

orklah commented Oct 14, 2021

related to #5482

I think Matt plan was to not allow signatures from extensions that were not loaded. I don't see how this is done though...

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

No branches or pull requests

2 participants