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

Doesn't document the right inherited method #3706

Closed
smaddock opened this issue Apr 24, 2024 · 1 comment · Fixed by #3713
Closed

Doesn't document the right inherited method #3706

smaddock opened this issue Apr 24, 2024 · 1 comment · Fixed by #3713

Comments

@smaddock
Copy link
Contributor

Follow-up to #3633. Commit 635e8d3 broke inheritance in a new way.

Expected behavior

Child class methods should override parent class methods that they inherit in the documentation.

Actual behavior

Documentation is inconsistent in which class method is documented.

Steps to reproduce the problem

Follow the same steps in #3633:

  • BaseClass is documented correctly
  • InterClass is documented correctly
  • FinalClass should show InterClass documentation, but shows BaseClass

Now follow the same steps in #3633, but run phpDocumentor/bin/phpdoc from commit 635e8d3.

  • BaseClass is documented correctly
  • InterClass should show its own documentation, but shows BaseClass
  • FinalClass is documented correctly

Modify FinalClass.php to be:

<?php
final class FinalClass extends InterClass {
    public function __construct($a, $b, $c)
    {
    }
}

Using release v3.4.3:

  • BaseClass is documented correctly
  • InterClass is documented correctly
  • FinalClass is documented correctly

Using commit 635e8d3:

  • BaseClass is documented correctly
  • InterClass should show its own documentation, but shows BaseClass
  • FinalClass should show its own documentation, but shows InterClass

Your environment

  • macOS Sonoma 14.4.1 (23E224)
  • PHP 8.3.6 (cli) (built: Apr 10 2024 14:21:20) (NTS)
  • phpDocumentor master+635e8d3
@phpdoc-bot phpdoc-bot added this to Needs triage in phpDoc issue triage board Apr 24, 2024
@jaapio jaapio linked a pull request May 7, 2024 that will close this issue
phpDoc issue triage board automation moved this from Needs triage to Closed May 7, 2024
@jaapio
Copy link
Member

jaapio commented May 7, 2024

Thanks for this report, it was really helpful when debugging this issue.

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

Successfully merging a pull request may close this issue.

2 participants