Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107197 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21881 invoked from network); 18 Sep 2019 00:35:24 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 18 Sep 2019 00:35:24 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 449BD2D1FD8 for ; Tue, 17 Sep 2019 15:12:38 -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,URIBL_BLOCKED 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-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 ; Tue, 17 Sep 2019 15:12:37 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id x134so5815240qkb.0 for ; Tue, 17 Sep 2019 15:12:37 -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=ufEGZmVFyIYSezUEt7vRmE4UJeDJQxrHNadvZZ4Fu28=; b=COW3LJSo2hdTyMXPC75KGcf5GS5exqolLHz1V+GthoxF6oo6hJkVOGewHDKaGaN5sw U0pBeBObTtbxItW/IZ/3mKrQW5CXezgf/D89XzdK41ge3joz3E1pqSmcBd1B30B8OuqN MAopOr/mrByVuNv+YevLdRtxjNFkh52/mMCs5R0DkjNYiPA14MbCoOuL3HUEaVbjWpWm mu+Tue8pMkbZ/DJApSHcDWvalT3WUwAFfxoyNgsaXnV46C8ec7Y8jyzxwlPxqIsiy/yI kWleTQKb+2loUiFvSLGcXEMA7jUBsWWz4Z0XcHmugYUCaQHHuWkZYdpL3aiCscZpi3rs 9QFg== 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=ufEGZmVFyIYSezUEt7vRmE4UJeDJQxrHNadvZZ4Fu28=; b=Y8UArRjMnvo0BjG01Kuo1hy7oiOWkCXF1N2lf5xUHKPQM3jClEdWlQAjacIbkkCbWA Sb1rp3Dy4TnASTF0NWB/SQpRAMMbvlMS0Zx36F3vspAoq61B0UC2q01VI9bHRYl+q+li HKpdi7ylbIySaTXIRqjuywQV5Sxa/mEMwrwQSWducPY1ZxWXzzUbCDA+ax5KngduPY9W mp/h94ulsbRxMfS444xfzgbpFQHsODMELU5HOTBqwSC0RtqnVQP8bQZmrnsH+gsad/ag 0BYS+Hgcu65cypaCSCOeD92IF0mqKa+iQRVXzqd0TWaUQoN7K7PnxswR2uS5TqfqTmVE PWHg== X-Gm-Message-State: APjAAAVygv6Ij2W5tzYnlWkOFd2/Rhwn+gHZkDfkbN4zMeZ/87sUEOAl wDmmuMH8vXZLuE/x9KKOsl+5eV5dPs/aKqbcsyy7EQ== X-Google-Smtp-Source: APXvYqwtZSTXnT3oLBSFzRZlHF1+0NOOtIa8VoYNuroApH8cbAJ1uSj6/wsKZ42eG5uK7dwn9bHUoXthnfAhYSSpH9E= X-Received: by 2002:a37:9ec5:: with SMTP id h188mr845935qke.93.1568758356902; Tue, 17 Sep 2019 15:12:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 18 Sep 2019 00:12:25 +0200 Message-ID: To: Peter Bowyer Cc: PHP Internals , Thomas Weinert Content-Type: multipart/alternative; boundary="0000000000009a1cef0592c704c5" X-Envelope-From: Subject: Re: [PHP-DEV] Re: [RFC] DOM Living Standard API From: kontakt@beberlei.de (Benjamin Eberlei) --0000000000009a1cef0592c704c5 Content-Type: text/plain; charset="UTF-8" On Mon, Sep 16, 2019 at 10:01 AM Peter Bowyer wrote: > Hi Benjamin, > > I like the proposal. > > On Mon, 16 Sep 2019 at 01:40, Benjamin Eberlei > wrote: > >> 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? >> > > I don't have feedback, other than to ask what choices other languages have > made when bringing in the DOM Living Standard API? > good question! the only other non javascript languages that have ext/dom equivalents (i found) are java and python and both haven't changed their APIs to the new living standard yet. > > >> 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? >> > > If I understand correctly, the issue is the behaviour of a method has > changed significantly. > No, actually it behaves mostly the same. It only added a new use case that previously lead to an exception, when you appendChild a node from a different document. Since this is not really a line of code that happens dynamically, this code will not be in the wild, instead you will find the workaround $element->appendChild($element->ownerDocument->importNode($otherNode)); which will not be affected by the new behvavior at all. > > If not implemented in PHP 8, where BC breaks are expected, when would be a > better time? > This is no BC break in my opinion. Changing an exception that essentially says "don't do this, you connected the wrong things" into the behavior that people would expect anyways is not a BC break in my opinion and therefore could be done at any time. > > Would deviating and implementing the new behaviour with a different method > name e.g. appendAndAdoptChild(); or guarded by a version flag (so users > choose whether they want the 'Living' behaviour or the 'Level 2' behaviour > in this method) be options? > > Peter > --0000000000009a1cef0592c704c5--