> Le 21 mai 2024 à 21:00, Matthew Weier O'Phinney <[email protected]> a > écrit : >> (But again, I prefer that all those methods work on instances, as it was the >> case before PHP 8. They shouldn’t have been switched to >> static-but-broken-for-subclasses without discussion.) > > Fixing the existing ones would be a potential BC break, depending on whether > or not instance usage is completely eliminated.
Yes, of course. But there exist options that don’t make the API even more inconsistent than it already is. I hereby propose: * `XMLReader::fromUrl()` as replacement for `(new XMLReader)->open()` * `XMLReader::fromString()` as replacement for `(new XMLReader)->xml()` … which would make me happy. (The old, inconsistently-named, instance-and-semi-broken-static methods could be kept for BC and marked as soft-deprecated in the manual.) —Claude
