Fixes and improvements for class synopsis generation#10098
Merged
kocsismate merged 4 commits intophp:PHP-8.2from Dec 16, 2022
Merged
Fixes and improvements for class synopsis generation#10098kocsismate merged 4 commits intophp:PHP-8.2from
kocsismate merged 4 commits intophp:PHP-8.2from
Conversation
Girgias
reviewed
Dec 15, 2022
Comment on lines
+2771
to
+2774
| $includeElement = $this->createIncludeElement( | ||
| $doc, | ||
| "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])" | ||
| ); |
Member
There was a problem hiding this comment.
Does this create a fallback element that doesn't warn if it doesn't exist?
Girgias
approved these changes
Dec 15, 2022
Member
Girgias
left a comment
There was a problem hiding this comment.
Other than the comment question LGTM
cmb69
approved these changes
Dec 15, 2022
Comment on lines
+2771
to
+2774
| $includeElement = $this->createIncludeElement( | ||
| $doc, | ||
| "xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])" | ||
| ); |
Member
Author
|
Just before merging, I realized that the recent role attribute related changes have not been available in PHP 8.2, so I included the backport into this PR. |
kocsismate
added a commit
to kocsismate/php-src
that referenced
this pull request
Dec 18, 2022
Until php#10098 default constructors were sometimes documented, sometimes omitted. The above PR made adding documentation for constructor of all non-abstract classes required. However, this is not desired when such a class inherits a constructor from its parent. The current PR fixes the behavior the following way: - documents inherited constructors (along with destructors) - makes it possible to generate/replace the methodsynopsis of implicit default constructors which doesn't have a stub
kocsismate
added a commit
to kocsismate/php-src
that referenced
this pull request
Dec 18, 2022
Until php#10098 default constructors were sometimes documented, sometimes omitted. The above PR made adding documentation for constructor of all non-abstract classes required. However, this is not desired when such a class inherits a constructor from its parent. The current PR fixes the behavior the following way: - documents inherited constructors (along with destructors) - makes it possible to generate/replace the methodsynopsis of implicit default constructors which don't have a stub counterpart
kocsismate
added a commit
to kocsismate/php-src
that referenced
this pull request
Dec 18, 2022
Until php#10098 default constructors were sometimes documented, sometimes omitted. The above PR made adding documentation for constructor of all non-abstract classes required. However, this is not desired when such a class inherits a constructor from its parent. The current PR fixes the behavior the following way: - documents inherited constructors (along with destructors) - makes it possible to generate/replace the methodsynopsis of implicit default constructors which don't have a stub counterpart
kocsismate
added a commit
that referenced
this pull request
Jan 1, 2023
Until #10098 default constructors were sometimes documented, sometimes omitted. The above PR made adding documentation for constructor of all non-abstract classes required. However, this is not desired when such a class inherits a constructor from its parent. The current PR fixes the behavior the following way: - documents inherited constructors (along with destructors) - makes it possible to generate/replace the methodsynopsis of implicit default constructors which don't have a stub counterpart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
reference/spl/outofrangeexception.xml), so another replacement rule is added to the listAllowDynamicProperties::__construct()is not currently documented, but it has a stub. Conversely,SplStack::__construct()is documented, but it doesn't have a stub). Therefore, the only sensible way to have deterministic rules is to always document default constructors.