doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

DOMImplementation::getFeature() is undocumented

Open WinterSilence opened this issue 3 years ago • 5 comments

From manual page: https://php.net/class.domimplementation


ReflectionClass detect method getFeature() missed in manual:

Method [  public method getFeature ] {
  - Parameters [2] {
    Parameter #0 [  $feature ]
    Parameter #1 [  $version ]
  }
}

ReflectionMethod not detect hasFeature() parameters:

Method [  public method hasFeature ] {
  - Parameters [0] {
  }
}

but in manual: public hasFeature(string $feature, string $version): bool

WinterSilence avatar Jul 26 '21 06:07 WinterSilence

The ::getFeature() documentatation is indeed missing, but the signature of ::hasFeature() is correct (reflection is wrong for PHP 7.4, what has been fixed for PHP 8).

cmb69 avatar Jul 26 '21 08:07 cmb69

@cmb69 I use PHP 7.3, why not fix it in 7.x too?

WinterSilence avatar Jul 26 '21 09:07 WinterSilence

PHP 7.3 is no longer actively supported, so won't receive bug fixes; fixing this for PHP 7.4 would constitute a BC break.

cmb69 avatar Jul 26 '21 11:07 cmb69

@cmb69 doesn't fix in PHP 8 break BC? I think any bugfix can't be BC.

WinterSilence avatar Jul 26 '21 11:07 WinterSilence

doesn't fix in PHP 8 break BC?

Yes, but some BC breaks are allowed in a major version.

cmb69 avatar Jul 26 '21 11:07 cmb69

The documentation for this method is missing because it was never implemented. i.e. it always threw a "not implemented yet" dom exception, since the very beginning. I placed this on the proposed deprecation list for 8.4, so I don't think we should actually document this?

nielsdos avatar Aug 02 '23 18:08 nielsdos

ACK, just cross-mentioning this for #2163

Girgias avatar Aug 04 '23 16:08 Girgias