Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111840 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 36029 invoked from network); 4 Sep 2020 14:44:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Sep 2020 14:44:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EF7701804D9 for ; Fri, 4 Sep 2020 06:49:59 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 4 Sep 2020 06:49:56 -0700 (PDT) Received: by mail-lj1-f196.google.com with SMTP id a22so1643926ljp.13 for ; Fri, 04 Sep 2020 06:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=xxpdPaiadlWfJrK1czpVI7bcq1vTSxRdPoH2dU7ecOg=; b=noCmrQnBf1bx0bcElTfMb28/agxXI7b66z6/HppY7CedFbOKpaHBPWe6UOIA+hC2gm 6saJqOqoRXJHWn6HnVx+P/D957lgUjRIK8yf6vNY8BneqDsm+MUgMgBzFzyqOZ9VMzoY XKbB7AuBjNvaMCb7v/8iC82sAGgONA+k6CmyzkjM3rBdHlVse+EvS5RN9+89SPE562o/ EWxPNrtyzXzqFXonuaBPuttn829I4APmfnEGAg4m5APYCD+hDw+e9BkKT2TlM7EF/iop GuM79u2Rar3XIVY3oSTlQtLULLdZpLtMQhzN29sE2cjkKiZb0jWklWSc/0Izf9cSAQfj 3NhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xxpdPaiadlWfJrK1czpVI7bcq1vTSxRdPoH2dU7ecOg=; b=qqU+//2M9+N1oHlm8bHGxGMz8vOi9hOGLOo6nDCnwxXFky2MWFUZqB5Itwz5vvprWB IXbSnwoqtZFFhnPZPTuaTT7AstM7grKgxInuhhcgRgZzfi8o6R7jUXtnmf6mm1okCTZ+ U7hwFRsOWQuY0KbmoYzzu9nF2zgJJsqQfLVF/AzsHMgoLnTFSEv7gg53ZXVns/veT0CJ ZgsKUkyOSHnA04p4vLc8sePHDzRswl1nau0Av3nPtWh9LOwZcXlkB+6MmgihMPX0/zDA B6tVC7MarlT0jDcdOPLWSkw+O4XcN3sabYEzha17hzOhofShss/KuRsfwnfEWcHgYEdI Zrcg== X-Gm-Message-State: AOAM533Cafdp8KHW1ecufrQaNyZZtQk19N1yQ/Ko2U+MRXiaIDrHdKRr /piw0I/1oOGXBo9s05sYKXiHpF+D/UvVTLLulawddHEm9/Dy6Q== X-Google-Smtp-Source: ABdhPJz+VUWq92QJlfDSr/I41bmxRgg6RRaZtnuymIsC9U7TMkxyZAiTc0SaiwaT5iiiypxuU7AcJ5Nh0HMFybXS7l0= X-Received: by 2002:a05:651c:106f:: with SMTP id y15mr4099778ljm.170.1599227394043; Fri, 04 Sep 2020 06:49:54 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 4 Sep 2020 15:49:43 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000bcb55805ae7d24a3" Subject: Use PSR coding guidelines in php.net docs (instead of PEAR-CS) From: t.motylewski@gmail.com (Tymoteusz Motylewski) --000000000000bcb55805ae7d24a3 Content-Type: text/plain; charset="UTF-8" Hi, Right now (as stated here: http://doc.php.net/tutorial/style.php) the code style used in PHP documentation is PEAR-CS https://pear.php.net/manual/en/coding-standards.php The problem is that: - PEAR-CS does not cover new PHP versions (e.g. namespaces are missing) - it has a very little adoption - it's not maintained - the whole PEAR is becoming obsolete I suggest that PSR-12 should become the coding standard for PHP docs. I've created a ticket https://bugs.php.net/bug.php?id=80060 and got redirected to mailing list "The PSRs are unofficial community-written guidelines for interoperability between frameworks and projects. If PHP were to follow their guidelines then that could be interpreted as an endorsement - reasoning that extends to other areas, such as why php.net does not employ a popular framework." I would understand the concern if we were talking about certain commercial product, tool or framework. Here we're talking about a standard which: - has a broad acceptance in the PHP industry - doesn't have an alternative thus became the one standard in the industry - its adopted by many tools and framework from the PHP community > "If PHP were to follow their guidelines then that could be interpreted as an endorsement " I agree, and I would love PHP to either set standards, or to endorse existing standards. Because right now you can read this argument that PHP is endorsing obsolete PEAR-CS, which I hope is not true ;) In general I would like to see more PSR being mentioned in PHP docs, e.g. PSR-4 in https://www.php.net/manual/en/language.oop5.autoload.php In comparison to other languages it's hard to learn PHP from the official docs, as no tooling or best practices are outlined e.g. I did not find any mention of composer in the docs. I would like to hear your opinion about this topic. Thanks Tymoteusz --000000000000bcb55805ae7d24a3--