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

PDOException documentation update question #2803

Open
8ctopus opened this issue Sep 27, 2023 · 0 comments
Open

PDOException documentation update question #2803

8ctopus opened this issue Sep 27, 2023 · 0 comments

Comments

@8ctopus
Copy link
Contributor

8ctopus commented Sep 27, 2023

I'm trying to update the documentation for the PDOException class: https://www.php.net/PDOException

Reason being that:

  • the property $code is duplicated (once inherited as int, the other time redeclared as int|string
  • final public [Exception::getCode](https://www.php.net/manual/en/exception.getcode.php)(): int actually returns string not int.

See here for more info: php/php-src#12294

I've looked how inherited properties and methods are included using XPath, however I cannot figure out how to update the path to exclude the code variable and the getCode() method. I tried looking into other exceptoin classes, but couldn't find any similar situation.

<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='&Properties;']]))">
<xi:fallback/>
</xi:include>

<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Exception'])">
<xi:fallback/>
</xi:include>

I could also copy the original declarations in the class, but would prefer to avoid it if there is such an option.

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

No branches or pull requests

1 participant