Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107130 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 79530 invoked from network); 16 Sep 2019 03:03:14 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 16 Sep 2019 03:03:14 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 2F9832C0543 for ; Sun, 15 Sep 2019 17:40:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Sun, 15 Sep 2019 17:39:59 -0700 (PDT) Received: by mail-qk1-x72b.google.com with SMTP id f16so8272999qkl.9 for ; Sun, 15 Sep 2019 17:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OxOCaEFhAYqfGw0qSfh6s3p2lBx5hmn1RNlDo4P9Spo=; b=dDI2XAMRL+/DKGH/n6VkileuVs6jDbZGavBVCINzKaWablAdUYqFckFPdIUrT9nshl aWUsuS72V0zkbluY0w4GEE2x+/Sh204PqaB8SSekjnLUtfqbDxYQ/C58qcR02wQApAdN b0mh9biNxe4V3Z4im6TgcnDiOlf3aA97zssOy+LNOTLHs6ROiPqjg7VcFFTRK5Km1pRw rbf3qzkafaWuRy/RKQWmxBYKWMYsFXElCbXs3kGaJBrYzcTMWgBAT5eicL55FFpm2r6u rAns5pgR/aq6mkUDgi+Rdo8eyyoGtQ6p31qlS1A1M/FZixieBB7qgmu0s8XoT3XtaFzW NZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OxOCaEFhAYqfGw0qSfh6s3p2lBx5hmn1RNlDo4P9Spo=; b=qoJOUnUBL3d9ktEN+k8edbDoLjreYP1+w/be81YRoSfk0yEw0lMPGB/5xVEFXDgG30 qFKSmJm0y916espInN4zyJKk93JFCbLF9e4bfUr4B+ttlnDZIdz9e458bTQjOq84ACfU M3pLiY2PmPk06tq/cUjiFlfmbTcBHMH+xNjpmhOtqXF2X3fjlAG/qHl7ZvpbiZ06SjKw 8pMXJAQ3PL0UXsqIT12aPBgvtA/V6F7KGWHZ3PbfN34Meyp3ZqxDBkdlXcQAWM1Ka9me GikkJNS+9w0OBikHVIls509Zm/UsUuk1QYbLmEfOvvFMGoUnfgoNBgbs+33jwWdc7M1q NRuQ== X-Gm-Message-State: APjAAAVSHCSMDI4MMRm3PsoM1nQ7Xb6yn1gZljHKQEdoDAQIGq/dHWjw YN+A5e8PWEPHmpF9D8JdSrn6XQNuYXzVbFl2gJWnbOMS7vUk8g== X-Google-Smtp-Source: APXvYqzR4HVsMLSVxRXh1vdv/yPyfP709p3YmzrwwqGU3XiSC1NiHJI7OMNnC7qDIDFf/zqljEK9HRAnJOblluHhOP0= X-Received: by 2002:a37:6005:: with SMTP id u5mr33509841qkb.79.1568594398271; Sun, 15 Sep 2019 17:39:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 16 Sep 2019 02:39:46 +0200 Message-ID: To: PHP Internals Cc: Thomas Weinert Content-Type: multipart/alternative; boundary="000000000000e7f20b0592a0d7ad" X-Envelope-From: Subject: Re: [RFC] DOM Living Standard API From: kontakt@beberlei.de (Benjamin Eberlei) --000000000000e7f20b0592a0d7ad Content-Type: text/plain; charset="UTF-8" On Fri, Mar 22, 2019 at 9:14 PM Benjamin Eberlei wrote: > Hi Internals, > > Thomas and I are working on updating the ext/dom to add support for the > current DOM Living Standard API as standardized here: > https://dom.spec.whatwg.org/ > > https://wiki.php.net/rfc/dom_living_standard_api > > This RFC is targeting 7.4 and contains three independent changes: > > - a set of new methods and interfaces that can be implemented BC as > addition to the existing ext/dom. > - a removal of a few "dead" classes that are exposed to userland, but > neither documented nor containing implementation code. > - a compatibility layer to switch the implementation between DOM Level 1-3 > and the Living Standard in places where BC is not possible. > > A pull request includes a nearly complete implementation of the new > methods, but nothing of the cleanup/compatibility yet: > https://github.com/beberlei/php-src/pull/1 > > We are looking forward for your feedback. > > greetings > Benjamin > Hi internals, a few month have gone by and I came back to revisit this RFC and simplify to get something shipped. i have updated the RFC to only include the set of new methods and interfaces that the DOM Living Standard has implemented. https://wiki.php.net/rfc/dom_living_standard_api I am asking about feedback especially on the section "Implementation Details", that explains some key differences to "PHPify" the DOM Living Standard API to PHP and ext/dom. Do you have any comments about the reasonability of the choices? Also the section on "Not adopting Nodes for now" is new and I need some feedback on this issue: To keep the proposal slim with respect to changing existing behavior, the improved behavior of the DOM Living Standard over Level 1-2 tof automatically adopting nodes instead of throwing a WRONG DOCUMENT DOMexception is not considered for now. Do you think this is a reasonable approach to go forward with? As for the implementation, it is now in this PR https://github.com/php/php-src/pull/4709 Looking forward for further input. Benjamin List of Changes to RFC: - The RFC has been updated to include a few more details about what each new property or method does. - The new behavior of the Living Standard of automatically adopting nodes is skipped in implementation for now to keep the existing behavior of other manipulation methods to throw WRONG document. Workaround is still to importNode first. Adopting nodes can be implemented as improvement later, because it has no backwards compatibility impact. - I removed all sections on trying to achieve compatibility between old DOM level 1-3 and the living standard, especially w.r.t. to DOMHtmlDocument (uppercase nodeName, body property, ...). I think we can live with not 100% compliant, ext/dom never was fully compliant. helpful would be a new section in the docs that explains our existing differences to the spec to users. Specifically the spec itself says that users should test existance of features by checking for properties or methods. - The cleanup of dead / unimplemented classes is not RFC worthy and can be done without making the RFC more complex. --000000000000e7f20b0592a0d7ad--