Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122343 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 39959 invoked from network); 8 Feb 2024 10:12:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Feb 2024 10:12:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1707387205; bh=rdU6hS5PliCcAmfj51NzB+Uwtt82jMnzsb4T704FUTA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WbjcEjAxxdU1NhUYwwtsF/QjkWudSK+YvdJXEo9W3DD/s7dcGCNMBwI1xLYW4/OMc 5VlLuKH4SdDf86phGAl2U5YU6xNkdwz4wJylRqP9BwWz1LOZH1hOPR1UGfVALc6Ur0 KaRpNblMfhcsiTrY5H2NHBaYBVkWk6MYA+zJHfX3xkYlMrz2ZgomhOWigDv2tqq+Ko fqLvaxBUS113fT5njVsnzaalu0X9huGIrGtSC6h68E2JtVbDP+Z2ph6MUx+OpNDb1g uHOA2agjZ9ThphuMEtfXGmPxYjmJOJElrO8CPnCda5u0dacQpA59PMvf7KFIg/GV2d jKGOPL/5+STJg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4B56C180042 for ; Thu, 8 Feb 2024 02:13:23 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) (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 ; Thu, 8 Feb 2024 02:13:22 -0800 (PST) Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-6047a616bfeso15636807b3.3 for ; Thu, 08 Feb 2024 02:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interi-co.20230601.gappssmtp.com; s=20230601; t=1707387149; x=1707991949; 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=rdU6hS5PliCcAmfj51NzB+Uwtt82jMnzsb4T704FUTA=; b=PaBh5GKzL+3C7OwqjBYzt4LWaIGgPChkQsk+18CddaM1rr7w0iSROP+u3ZgPF4jb8h bcqxBNthavhG8NlFZkTnPvk7Z8GxQ71chv/WMWuYSGoRQdiwwhIlKSf4H/20ySlh2bfc ioZACD9F6B0KIBDFTF6RyBlgkehKRckhfh6+82uwzFllhR1GW11jLapypU3WYc226v15 qI2oCm70oIx5hxfBjD9g9Mmggb9jrHA+yXFAc/U70siANN+ES6P+08nym33DaB0nymXY iWvTGRvIQV3kDbqSHRAzN7mhB1ZKgb+cZkIcTM1jBTrn+BWgCsGdHMPF0yjrKITzxKNz dwJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707387149; x=1707991949; 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=rdU6hS5PliCcAmfj51NzB+Uwtt82jMnzsb4T704FUTA=; b=ZlYY33aar8utuSWh7v+/i6oxwFxsSbcDf8NTEiDqXZynddSx6QNzWyImWE9QVbxqsG 7dNJbRdSqUKQluPdFSTmXQa1ARlYqC3TMnjUO6qDCQEqi2kdLgWWKyOuPaFxELmg0PmT uDYpOUHZquvzvuyC5Sg18KNDFOaOFPBKvh7QTeuEm0vfIMjGlJ+Pk5StwMwl16z4ygwi XGTB2/y70HZ8jqLF6r9gtK0k69wUiZ8bkvCfI0IWy5B4AZ8YomHD4LECPsi8zin74bHU KhavIVJah+PncHNkzcEYZfFoqxJ2A75B5EHie35DLJGRylKQ6//2XYbbYTB6cynD0XpH XfMA== X-Gm-Message-State: AOJu0Yxxcp3IP1qam4NQ5PE++9N5ioCsX4RpNqG6YuiP7ofli+QzBgnJ sP1dGUjD7x/yrJ4b6a5Pna1Yp7PyLLe0QvlgJrJWhPCYaOhkNkP0iDzQr0LN4Q+rp9xBdTr/Epl Px6OexJVV97yIrZwjSHustTMlcHx+p+8Ls5W2pA== X-Google-Smtp-Source: AGHT+IFEO1o66al1RWEjXs8YD78zQodJ7zQWQdnrqqFVHTza+ATYr49Zm4SHvSGunrxNsseexNkj3X3OrjS3wSXsih0= X-Received: by 2002:a0d:cd07:0:b0:5fb:da77:af07 with SMTP id p7-20020a0dcd07000000b005fbda77af07mr7606610ywd.32.1707387148913; Thu, 08 Feb 2024 02:12:28 -0800 (PST) MIME-Version: 1.0 References: <742f202d-7990-4f51-b903-7a15e3fd33c2@app.fastmail.com> <1cd8fa7b-ab62-4563-bf13-bb7801f1ce8d@app.fastmail.com> In-Reply-To: Date: Thu, 8 Feb 2024 19:12:18 +0900 Message-ID: To: =?UTF-8?B?0JPRgNC40LPQvtGA0LjQuSBTZW5pb3IgUEhQIC8g0KDQsNC30YDQsNCx0L7RgtGH0LjQuiBXZWI=?= <6562680@gmail.com> Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301 From: alex.pravdin@interi.co (Alexander Pravdin) On Thu, Feb 8, 2024 at 6:25=E2=80=AFPM =D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80= =D0=B8=D0=B9 Senior PHP / =D0=A0=D0=B0=D0=B7=D1=80=D0=B0=D0=B1=D0=BE=D1=82= =D1=87=D0=B8=D0=BA Web <6562680@gmail.com> wrote: > > PHPStan is out the case. > May I know why is it out? I'm actively using it in my projects and it helps me a lot to not relax and write safe code. It also helps a lot in cleaning up legacy code. Sometimes I find places in the legacy code where the logic is too hard to understand in a reasonable amount of time, but they're rare. These places can be enveloped with additional logging with no problem. I'm referring to your initial use case about collecting errors and I'm suggesting a good tool to solve it. You may start from lower assertion levels in PHPStan and gradually increase the level to be not ruined by tons of errors at a time. Of course, I don't know your situation. But what I do in such cases - is explain to the business the problem and what steps are required to improve the situation. So the business is aware of it, the business should not have false impressions about the code and false expectations from me. Just prefer to be open and tell the truth. Not prefer to be a yes-man and promise speedy magic solutions. I'm a professional developer and if I'm asked to do some crappy coding regularly, I would prefer to leave such a job. My selling point is to produce high-quality well-architected code.