Skip to content

Conversation

@xPaw
Copy link
Contributor

@xPaw xPaw commented Aug 6, 2025

Fixes #765

I am unable to get tests working locally, so I can't really add one.

@staabm
Copy link
Owner

staabm commented Aug 7, 2025

without a test we cannot merge the PR. how do the problems locally manifest?

@xPaw
Copy link
Contributor Author

xPaw commented Aug 7, 2025

For some reason running composer test tries to install some packages, including adding sqlftw/sqlftw to composer, and then just quits because it can't find phpstan-dba\tests\default\config/../../..\.env

@staabm
Copy link
Owner

staabm commented Aug 7, 2025

you need to copy .env.dist into a new file .env and adjust the credential in it for your local needs (in the phpstan-dba git repo root)

@xPaw
Copy link
Contributor Author

xPaw commented Aug 7, 2025

EDIT: Okay I had to manually import schema.sql... would be nice if this happened automatically, or at least was documented in a contributing guide or something.

@staabm
Copy link
Owner

staabm commented Aug 7, 2025

or at least was documented in a contributing guide or something.

added some rough description in a5cee18

@xPaw
Copy link
Contributor Author

xPaw commented Aug 7, 2025

So there's skipped tests that use getenv() checks, for some reason the .env loaded variables are only available in $_ENV.

@xPaw
Copy link
Contributor Author

xPaw commented Aug 7, 2025

Well I tried changing it to fully qualified name, and now it doesn't seem to actually match them. Is the rules code not actually checking for these correctly because all tests don't use fully qualified classes?

@staabm
Copy link
Owner

staabm commented Aug 7, 2025

let me have a look

@xPaw
Copy link
Contributor Author

xPaw commented Aug 7, 2025

composer.json changes every time I run composer test by the way.

@staabm staabm changed the title Add support for StaticCall Add support for StaticCall Aug 7, 2025
@staabm
Copy link
Owner

staabm commented Aug 7, 2025

composer.json changes every time I run composer test by the way.

yeah.. thats a sideffect of running the tests. its not expected to be committed.
when tests are running successfull these changes will be automatically reverted

@staabm staabm merged commit b4a6084 into staabm:main Aug 7, 2025
28 checks passed
@staabm
Copy link
Owner

staabm commented Aug 7, 2025

thank you. released in 0.4.2

@xPaw xPaw deleted the staticcall branch August 7, 2025 09:34
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 this pull request may close these issues.

Support for static method calls for queries

2 participants