Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124054 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 6B6EC1A009C for ; Sat, 29 Jun 2024 17:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719682639; bh=vFxN0rSgMZGKaVHeeftgYFiqfDi2hCeh1MaFuYbOpb4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=EDiaF05oNCYH697w7OLkb932X9se05UcmPdhlvsyI8XfyL26USsTgMnINKbIvtwXP aJD9ijpkzGcxym7MT8sfCvSChb+XHLP7ldoe5E6AM7Tf52kTvzDQHmlm+j5do9Xbsc hnT8yc12NxZI99MI0uXOR4OiFAtX3gR+Jr8SQDX/C2wb8VpQQ9ON4o085axD6RIlNA ZAktPlscSmXNKKcj/dQjSbOTx/PsiF01usMhyfyf5g9jjvf7sPxfbcdwhZn2KC4EdL EOmM2ZJVrszbg9YB3bRecyl9ZReb8QAyP9jYNZUUdeZ8y+pRpYqZl74RtzZs38K8A3 +WnyGZTQwPOOQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D6D051819F4 for ; Sat, 29 Jun 2024 17:37:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 29 Jun 2024 17:37:17 +0000 (UTC) Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-63036fa87dbso11051667b3.1 for ; Sat, 29 Jun 2024 10:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey.com; s=google; t=1719682557; x=1720287357; darn=lists.php.net; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vFxN0rSgMZGKaVHeeftgYFiqfDi2hCeh1MaFuYbOpb4=; b=J4AQ+gnqTJrnTHf8qmdSjaWEjcIEMs57Ca9dfcbngdRfeCn+Q0LM+yVD7QHZAmvGsg EarzQ9iUW1+8luSaYJ8BB+dJ0Sbz1lBO7pKow832VFDQQjGqJPgxhvRqXAgtBIHHZMSb 2vN8VQakOoErpgAGgKmpF6Aq6JSIWgvQCrl6DyDc5q2uqA6QS6qZQ9oN054QkwcKCIdB 7z0o4ZPHWGl4JMamy5HrLQmF+zWs0WWOy2wBm9fD4nOwEDrIWkAtrkqScImfs6QSVzD0 4nx2Fc0N+d7VaBjKkm3zSXMuCtO8aFipf3lQeb7uTMaFP5r1tvCHbuYQ14kGuBGQzXDv ujug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719682557; x=1720287357; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vFxN0rSgMZGKaVHeeftgYFiqfDi2hCeh1MaFuYbOpb4=; b=e3IDqw8k63GSafU075Es9VJNngId6Pql1t3KsiKVwG8EAx/5uaAvWPqX6KfRqCuZYm lXmEMJNho/XJ+uDPyM1RWTmMaK175cQGlQCz9xsgnnz1uZRH9+VCv3fZo2No8bp230cM Snhm+TLJQswNj7EAl08QdtQJulVSJYKs0UrKwOkTKv/XyOGPjiaUcwh251GE1OsCrc9c Px7Tx55nGWM/9u2U5ccX18ZYy8c5I7mUMn8JeIp1tDpl4gKNKTiKLcTtbfm4gBB0c06x aoLJYWCAUQ+inikI+zeIBANHOd6449Zul/hCC4rAPJhs6z4cqCE/IUao6CjSgpodear2 CEZA== X-Gm-Message-State: AOJu0YxO1pfUHTUW245aA1ot11ddzYzWe1GGj1/Shu425o4A4YNIxE65 qDEbZrNQYXXRRKwA77m3gHCUNP7qjPd3QtQAPEqa00LQt29sdWp1veVDONfVSg== X-Google-Smtp-Source: AGHT+IHI91X/Rzbht/To8O63OmaNatdxrbyNm/Jn/zig9ThbZh08PF503fXulu4DfTZgWWWPXnPkaw== X-Received: by 2002:a05:690c:6bc6:b0:61b:153:8d98 with SMTP id 00721157ae682-64af55326c8mr32721957b3.21.1719682557136; Sat, 29 Jun 2024 10:35:57 -0700 (PDT) Received: from smtpclient.apple (h96-61-170-179.lvrgtn.broadband.dynamic.tds.net. [96.61.170.179]) by smtp.gmail.com with ESMTPSA id 00721157ae682-64a9ba5a2d1sm7400027b3.99.2024.06.29.10.35.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jun 2024 10:35:56 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API In-Reply-To: <45d5a1cc-cb14-4e88-a202-a81554f06979@gmail.com> Date: Sat, 29 Jun 2024 12:35:46 -0500 Cc: PHP internals , =?utf-8?B?TcOhdMOpIEtvY3Npcw==?= Content-Transfer-Encoding: quoted-printable Message-ID: References: <45d5a1cc-cb14-4e88-a202-a81554f06979@gmail.com> To: nyamsprod@gmail.com X-Mailer: Apple Mail (2.3774.600.62) From: ben@benramsey.com (Ben Ramsey) > On Jun 29, 2024, at 03:20, nyamsprod the funky webmaster = wrote: >=20 > Therefore, I would rather suggest we ALSO include support for RFC3986 = and RFC3987 specification properly and give both specs a go (at the same = time!) and a clear way to instantiate your `Url` with one or the other = spec. > In clear, my ideal situation would be to add to the parser at least 2 = named constructors `UrlParser::fromRFC3986` and `UrlParser::fromWHATWG` > or something similar (name can be changed or improved). >=20 > While this is an old article by Daniel Stenberg = (https://daniel.haxx.se/blog/2017/01/30/one-url-standard-please/), it = conveys with more in depth analysis my issues with the WHATWG spec and = its usage in PHP if it were to be use as the ONLY available parser in = PHP core for URL. I agree that I would love to see a more general IRI parser, with maybe a = URI parser being a subtype of an IRI parser. Cheers, Ben