Skip to content

DynamicFunctionReturnTypeExtensions for PostgreSQL - #6074

Merged
VincentLanglet merged 3 commits into
phpstan:2.2.xfrom
vrana:pg_last_notice
Sep 23, 2026
Merged

VincentLanglet merged 3 commits into
phpstan:2.2.xfrom
vrana:pg_last_notice

Conversation

@vrana

@vrana vrana commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Comment thread src/Type/Php/PgDmlDynamicReturnTypeExtension.php

@VincentLanglet VincentLanglet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test are failing on php 7.4 and 8.0

@vrana
vrana force-pushed the pg_last_notice branch 2 times, most recently from aa25cf5 to 7d0e4ad Compare September 21, 2026 15:15
Comment thread src/Type/Php/PgDmlDynamicReturnTypeExtension.php Outdated

@VincentLanglet VincentLanglet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are still failing on PHP 7.4 & 8.0

https://github.com/phpstan/phpstan-src/actions/runs/35617721406/job/106392627849?pr=6074

Seems like

  • The function are considered as returning mixed
  • And we need two different nsrt files for assertions.

Look at functionMap, you could improve signature of return type of pg_insert and others.

Then for the test, you'll need two files.
One with // lint >= 8.1 and one with // lint < 8.1.

You can find multiple examples

@VincentLanglet VincentLanglet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cf previous comment

@staabm

staabm commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

nsrt/pg-result-status.php still errors on PHP 7.4.

you can make this test be skipped on 7.4 by adding <?php // lint >= 8.0 in the first line
(this works only within nsrt/ folder like that)

@staabm

staabm commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

(and please rebase)

vrana and others added 3 commits September 23, 2026 11:02
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lete() and pg_select()

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vrana

vrana commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

I'm sorry, it passes now. It's hard to find the real failures in the unrelated errors of CI.

@VincentLanglet
VincentLanglet merged commit d88544a into phpstan:2.2.x Sep 23, 2026
877 of 892 checks passed
@VincentLanglet

Copy link
Copy Markdown
Contributor

Thanks

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.

3 participants