Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add support to requireParentConstructorCall for indirect calls

Open
#222 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
devtools

Research direction

Start with the linked PHPStan reproduction and trace the implementation and tests for requireParentConstructorCall. Check how constructor calls through a trait method alias are represented, then add support for the indirect call and regression coverage showing the reported example is handled.

Written by the indexing model from the issue text.

Description

As originally reported in https://github.com/phpstan/phpstan/issues/9577, calling a constructor indirectly, e.g., via a trait method alias, is not supported by requireParentConstructorCall. I am opening this issue per @ondrejmirtes's request there.

Code snippet that reproduces the problem

https://phpstan.org/r/3d12f7cf-b4dd-4ba3-be0d-5738eba76d53

Dominant language
PHP
Stars
711
Forks
62
Avg merge
35m
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phpstan/phpstan-strict-rules

All issues in phpstan/phpstan-strict-rules

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.