Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126560 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 C95121A00BC for ; Tue, 4 Mar 2025 18:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741111097; bh=+jx9X2JHNRvk0IMBA/yVY0mqEIj5vIc98d9lGQJQCQA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iW8VGuWA/xXYtoIm5vSdK8rZ/OiPUXiOmTD1EGDW/x/7euQ4BbgntKPfR8fbpPePz a+iJP3T9hAB3Esv7OdK8rG2B3X0xmxdFewF3KYC9YmwEY6NT/JSC5mFO1nnp8qR+Rx BNGFCGk1aziziQ48GpHGINJ8yrK2LEWQ7jEEDcewhkccoPMwI7IpTzAkxxAXKP3c88 5JR3K7uwL1+yaTXRnRKRV1gok9OF01Asaa0H9CMueFE8KOJ3ZAceYxLstUnwhkWHIw 3wm20Tq88/q6+EvZS83vHxln5M9vCX0PixILWlfZWTYDME4xJQ4NV0sqh+kmDf/zpY W1gpeJkKeBlAQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9A031180080 for ; Tue, 4 Mar 2025 17:58:16 +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.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.49]) (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 ; Tue, 4 Mar 2025 17:58:16 +0000 (UTC) Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-5fc6cd89f85so2404102eaf.1 for ; Tue, 04 Mar 2025 10:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741111252; x=1741716052; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+jx9X2JHNRvk0IMBA/yVY0mqEIj5vIc98d9lGQJQCQA=; b=PuLG/pnEIiK0gW0cUP9lNO6yHafROm7k30eUlQmpIdl1XH0ToqhUEQ/Z9AMEXq1Ga1 Qfg/jJr6U6+FkYlWG2/IYb0OoV5DISJYbvr/Q5+iTE9gzH7+kF2o8BQTyt5K+sVjK+YF esDwglM5g5F700qoMj3ixEOW4xOjtNjTRcyK30Y86euK8kk/cHaz49U2hkQjwW6D1QOg 1xME67y2UjU2sqCXVNS6cKz14pJmjqXt+v6t4gW1/gwM+o2OrRW/fb6WKxm5zI07d2bT BaFixx9MGiiy1T5D1+8QRhze5xFdcpQR+xAy36i2sU/Bse+GQuRv520/yYjtue1/R9Il 61Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741111252; x=1741716052; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+jx9X2JHNRvk0IMBA/yVY0mqEIj5vIc98d9lGQJQCQA=; b=rRvTt9CVbdjs+NjRjV002PQFnsYuNNLc1v01YaiVRoiPO+rxDjTZVcR2f8IimEipCV /kgNxO3rI9Zkme+WCRTwjP+Cqg0U0ExiYEFANuZYaS/4rj0ZbZeIqh5Znwl9KTzImwJg /x+vBvuh9VbcMveMT2frQQn13nrqGZsumuORUyyDKvk5d5xPExsIc+0pGj1sZ1clS9Rb 58FBfcBig08n4eslS/jOr1ET0r1oM2EUnSibUthtNnQWv9VXyfIP9R9T3DdlY33H/DHx mmE1/Mke2TpBYy/tW+S+oxj/Ok6hFqyROwrLbz9rBc+q8aq9NoO9HECaX2Hzvnae01Qr JTuA== X-Gm-Message-State: AOJu0YxHFYkUcAKe2juADUKzppjxCeGcgx+ek49+2cN99grZzW6GZrjd ADhoX5DUUMR1kBTUd2IvETNZlLGSGKdFPJaWJqmiHMWSXan6MzxfTf84dzXLNEdXOHhf+PnHtuB pFIPtDIFXwprqzminZu7azle/o1Jujw== X-Gm-Gg: ASbGncuTwZJGyJskAKJH4eDVYYw4H1HATMgFCXrxuJmRnSFnp9j7LdMeHlUKjBCALck 0fDoEAXEGGnNkA2g9dYvDiHS6g+xndMgJkAHUmAaroRh9ktxdHUwcT05YLFzXDNbaheiwkzHqmI 9QZqVfWSfGkCa8QmqHE6g6EjNS X-Google-Smtp-Source: AGHT+IGpd3vaA2Cplua8NrZegQ3TERTe/m8yTAKRk3zNPACIdIosnsY/obUEPbDzFN4B6K7ahcGG0lkCuS6eIx5kUCg= X-Received: by 2002:a05:6820:188a:b0:600:22bc:c1fa with SMTP id 006d021491bc7-60022bcc61amr3486469eaf.7.1741111251829; Tue, 04 Mar 2025 10:00:51 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 4 Mar 2025 18:00:40 +0000 X-Gm-Features: AQ5f1JrPV9SE56qPZCqbpTBjSj9gYAlpehQo-44QAhfywpP8RXOgQ0PenFbAJIY Message-ID: Subject: Re: [PHP-DEV] PHP socket ethernet support - step 2 To: Jakub Zelenka Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000ae0acc062f880d60" From: devnexen@gmail.com (David CARLIER) --000000000000ae0acc062f880d60 Content-Type: text/plain; charset="UTF-8" On Mon, 3 Mar 2025 at 21:21, Jakub Zelenka wrote: > Hi, > > >> I am working on the second pass of this feature and write here because of >> the legitimate concern regarding new classes to add. >> >> PR here >> > > For those that want to quickly see the actually classes, here is a stub > link: > https://github.com/php/php-src/pull/17926/files#diff-190e64a9475f39f2b575e6032d6539b504b33fe534965e5bb3512fe430fe1846 > > > >> I agree also on adding a namespace on top (Sockets ?) and changing the >> class names. >> > > I think it would be good to note that there are already two classes > defined in socket extension: > > final class Socket > { > } > > final class AddressInfo > { > } > > So it might look a bit strange if those two are not namespaced and the new > ones are. The AddressInfo is a bit unfortunate name though. The namespace > seems cleaner but not sure if prefix would be more consistent. Although > having SocketPacket is not exactly nice so probably Socket\Packet is > better. But I don't really mind. I would just really prefer to not > introduce those classes without namespace or prefix. > ACK Sure fair point ; in practice prefixing seems the least disruptive change. > > Regards > > Jakub > --000000000000ae0acc062f880d60 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, 3 Mar 2025 a= t 21:21, Jakub Zelenka <bukka@php.net> wrote:
Hi,
<= div>=C2=A0
I am working on the second pass of this feature an= d write here because of the legitimate concern regarding new classes to add= .


=
For those that want to quickly see the actually classes, here is a stu= b link:=C2=A0https://github.com/php/php-src/pull/17926/files#diff-190e64a947= 5f39f2b575e6032d6539b504b33fe534965e5bb3512fe430fe1846=C2=A0
= =C2=A0
I agree also on adding a namespace on top (Sockets ?) and changing= the class names.

I think it wo= uld be good to note that there are already two classes defined in socket ex= tension:

final class Socket
{
}

final clas= s AddressInfo
{
}=C2=A0

So it might loo= k a bit strange if those two are not namespaced and the new ones are. The A= ddressInfo is a bit unfortunate name though. The namespace seems cleaner bu= t not sure if prefix would be more consistent. Although having SocketPacket= is not exactly nice so probably Socket\Packet is better. But I don't r= eally mind. I would just really prefer to not introduce those classes witho= ut namespace or prefix.

A= CK Sure fair point ; in practice prefixing seems the least disruptive chang= e.
=

Regards

=
Jakub
--000000000000ae0acc062f880d60--