Skip to content

Add phpstan type to profiler#144

Merged
tyrsson merged 3 commits into
php-db:0.6.xfrom
tyrsson:add-phpstan-type-to-profiler
Mar 28, 2026
Merged

Add phpstan type to profiler#144
tyrsson merged 3 commits into
php-db:0.6.xfrom
tyrsson:add-phpstan-type-to-profiler

Conversation

@tyrsson

@tyrsson tyrsson commented Mar 27, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Joey Smith jsmith@webinertia.net

Q A
Documentation no
Bugfix no
BC Break no
New Feature no
RFC no
QA yes
House Keeping yes

Description

Adds a couple phpstan types and removes a dead code branch.

tyrsson added 2 commits March 27, 2026 18:29
Removes a dead elseif branch from profilerStart since the parameter type is now constrained to string|StatementContainerInterface the removed elseif could never be reached.
Signed-off-by: Joey Smith <jsmith@webinertia.net>
Signed-off-by: Joey Smith <jsmith@webinertia.net>
@tyrsson tyrsson self-assigned this Mar 27, 2026
@tyrsson tyrsson added the qa Improvements in quality assurance of the project label Mar 27, 2026
@tyrsson tyrsson added this to @phpdb Mar 27, 2026
@github-project-automation github-project-automation Bot moved this to Todo in @phpdb Mar 27, 2026
@tyrsson tyrsson added this to the 0.6.0 milestone Mar 27, 2026
@tyrsson tyrsson requested a review from simon-mundy March 27, 2026 23:56

@simon-mundy simon-mundy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All good other than my note

Comment thread src/Adapter/Profiler/Profiler.php Outdated
Signed-off-by: Joey Smith <jsmith@webinertia.net>
@tyrsson tyrsson merged commit 090f1b5 into php-db:0.6.x Mar 28, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in @phpdb Mar 28, 2026
@tyrsson tyrsson deleted the add-phpstan-type-to-profiler branch March 28, 2026 01:26
simon-mundy added a commit to simon-mundy/phpdb that referenced this pull request Jun 30, 2026
Resolve conflicts and reconcile with upstream API changes (PR php-db#144 phpstan-type
Profiler, PR php-db#145 provide-driver-defaults):

- Profiler.php: take upstream's phpstan-typed version (supersedes PR's dead-code pass)
- AdapterInterfaceDelegatorTest: union of both test sets; keep PR's #[Group]/
  #[CoversMethod] plus upstream's testDelegatorWithPluginManager
- ConnectionTest: keep upstream's testResource and the PR's real
  testConstructorWithPdoResourceSetsConnected (drop skipped placeholder)
- Remove getDatabasePlatformName from test assets (API method removed upstream)
- Rewrite TestPdoWithFeatures constructor to set properties directly
  (AbstractPdo constructor removed upstream)
- Drop obsolete testCloneWithNullParameterContainerDoesNotClone
  (Statement parameter container is now non-nullable)
- Remove invalid #[CoversMethod(...'__construct')] attributes in ConnectionTest
  and PdoTest that were marking tests risky and discarding coverage

Suite: 1444 tests pass, PHPStan clean, PHPCS clean, 99.94% line coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa Improvements in quality assurance of the project

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants