Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123187 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 E55031A009C for ; Tue, 23 Apr 2024 15:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1713885256; bh=Sd4lmTURN7vbvw/7w4sS7K2XcbDuLVTmZeqNP+MQMW0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VKP6FqP2pzPxZ3i1Noi2F8xqggb2Xr6HnlT68HDGsbr62eUWqYR72960yaBEIvQXw 6JOUDTYKU7AWPirRWnWCRw/dCmryXd1bMv999i+Joq/IC9VYSA0AAv2UIUmSLRXZ3p 3JcpjDZzLVHxAjaNq31ypFMQxiYLmL4QwX6SW2MRyZmz7wuRYM2+z8g3zHHClrw9NI vT7YGqLIAQBWm0bkrPGh/b1yza5aKURqChHIXBSt40AJHcWHUv7+y/83GQLylcAXQx HEy1DEjrpJTCW1jClPNRr0VKnsp5jwmT7RXhpw0qScGCSbAuu9qCo3floSi0GN+pCf h6AwLf62Lgxhw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 107401801E7 for ; Tue, 23 Apr 2024 15:14: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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, 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: No X-Envelope-From: Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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, 23 Apr 2024 15:14:15 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5196fe87775so6499921e87.3 for ; Tue, 23 Apr 2024 08:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713885214; x=1714490014; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Sd4lmTURN7vbvw/7w4sS7K2XcbDuLVTmZeqNP+MQMW0=; b=PxZ5xYCfLArOdDdHmWFnidCY/zg6SHxW7YnhkIr9wDjWIg+EulJ3TZWoYDTidh+QOE HGKburzZNP6sBTFEQAmtRu0ju8SQSScXOLZmHQAmSj5jbg/ssrgcxnyP/ONozMlk+VUH TB5m4AizZXMogaqnj+Th6i42AYsdolUPbSFbfscJpQoGUwSzjrFWpPBcHdnmEpQjAx6Z fRwEPDE0sxWs+R9bZBAh5XuKLM2/k1TozXyVgChycm+nzZQz6sjRSBzzKvjfFeQKp10q Pv2mWTc72i6mDQUhlys5zFjt7wdO9VcVGBzzlfeHgsQUNbOjWTFIICcdGg9jMmlTDaZo ENHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713885214; x=1714490014; h=content-transfer-encoding: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=Sd4lmTURN7vbvw/7w4sS7K2XcbDuLVTmZeqNP+MQMW0=; b=lx2DzQn7k6pKd9ZEZrxvp7iTXFMCu7TYxkJCA7o7h3c2txiBWwXFGjD+QRWWALs8Qd xR83ezKyaWmA+cbdrr/sTSvJwobnapOfgcj6CSTtXelzd+JjzPfyB0oBg1C3xVlpBgZ+ 8OZ4oUMGN0gPwceSvf5mZBxCGqijXagAh9PF1OL2on1bJg24+7zhoVgvwYTs7RfGjsAm hiPL6D5uK6RMnh+AttP1936CJniuoHNOUmCvvM0n7Oi2kXv4S8GFU6SHYqlIqnuUJ5hB Q/vW3Wez9+kkaRKg+wXXCzZmDmD7yNuKIF8OY4rvkXIOHG6QNQ0pBGZdOwldosC3k55C ZFAw== X-Forwarded-Encrypted: i=1; AJvYcCXXGRBP96O5QbXtsNM1gDxzS4ORa047mHN4Cr0log22tnYoyLAV7JKukuARc5TQNwVTsUR9MbKUrakjXj8ermJBcG9kxFxltw== X-Gm-Message-State: AOJu0YzNxpknIQRBvQsHABpNoS+stkDwyJXBGOVTl/zx7pvvaojvYNTv y4+hzNPVUuX4vPtfB78oENzh+2lbIpsKQ8VugnBFuOabknejCxqeiovgi/aD0mbkAy6KYYtZqxF 6Fshp9v4S3kZLtWsJfQXDEE4LOgQ= X-Google-Smtp-Source: AGHT+IEqZ2bTNex/9jCZ/Vinf95DEtHFVqdwsqXST0Cc9TtLCcVal2TDI/L7qX3DD0cl1Vt3g8J9HiiVsvTIvvinI4o= X-Received: by 2002:a05:6512:2027:b0:51a:ffa8:4188 with SMTP id s7-20020a056512202700b0051affa84188mr5701672lfs.30.1713885213736; Tue, 23 Apr 2024 08:13:33 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <1cc7c609-0c12-4050-b792-2f4077a6ae69@scriptfusion.com> In-Reply-To: Date: Tue, 23 Apr 2024 17:13:21 +0200 Message-ID: Subject: Re: [PHP-DEV] PDO subclass names To: Stephen Reay Cc: Bilge , internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: landers.robert@gmail.com (Robert Landers) On Tue, Apr 23, 2024 at 3:22=E2=80=AFPM Stephen Reay wrote: > > > Sent from my iPhone > > > On 23 Apr 2024, at 22:35, Bilge wrote: > > =EF=BB=BFOn 23/04/2024 10:25, Stephen Reay wrote: > >> The argument that "Client" is meaningless becomes pretty moot when you= realise that you can import a *namespace* and use it relatively, if you so= wish: > >> > >> ``` > >> import MyLib\HTTP; > >> > >> $a =3D new HTTP\Client(...); > >> ``` > > > > Hi Stephen, > > > > Granted, but I also believe the user can and should have the reasonable= expectation that they can work comfortably (without conflicts or aliases) = using leaf (class) names exclusively. > > > > Kind regards, > > Bilge > > I'm sorry but I think you've missed the entire point of namespaces if you= want class names to all be universally unique without their namespace comp= onent. > > The referenced RFC gives clear examples of how a class with a prefix woul= d be converted to a namespace and class. As someone who currently works in a codebase with hundreds of *\Mapper classes, I feel your pain. However, 99% of the time, people are going to be using a single database implementation at a time per file/context. If you do find yourself in an edge case where you have multiple database implementations in the same file, aliases work for that case. Robert Landers Software Engineer Utrecht NL