Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122329 Return-Path: <6562680@gmail.com> Delivered-To: mailing list internals@lists.php.net Received: (qmail 75242 invoked from network); 7 Feb 2024 15:06:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Feb 2024 15:06:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1707318466; bh=rjS5e0EWtdUiCwzB9qyKeQ2bfTahV47ztVaYUQv0sEo=; h=References:In-Reply-To:From:Date:Subject:To:From; b=Ho6Vs5rCtYohuoxuuw54HnwaOWkHPqIgYrXw26dTDi2rN4Pyffqb+XQuc3EqtZ9E8 7LERkzaEz8fkp3S916u8933EsinA50kAeBuj87vd4PIxIWug41ENYZNn5Aj92DEP4S zQSmea13oqCR+mspk4hVT5GAroJMXdsYLQ8so+I472EEoUL5Y9uB1joLf49lvHQI9a xNt+i2GyvvPC9Ya6kWxMwf4gluvX0vFgMW5IF1+algxlLr9LM+8p/kte3h9b4Ylr9p TfU1YbkdJF2OEbB3b1/DtsNTYQ/hsNleFyMoTQNMoTU9kMI+3KXgnLIGZwJoGvpQGP b3be7xgkFQxRQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 48340180064 for ; Wed, 7 Feb 2024 07:07:46 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,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: <6562680@gmail.com> Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) (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 ; Wed, 7 Feb 2024 07:07:45 -0800 (PST) Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-59a29a93f38so255984eaf.0 for ; Wed, 07 Feb 2024 07:06:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707318411; x=1707923211; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=rjS5e0EWtdUiCwzB9qyKeQ2bfTahV47ztVaYUQv0sEo=; b=BESfvpkF9lrhEQxe8FGCZpc05DcW7hz9VcbTYczOuXMdLAzrDMRo+xAcWI8RRfG0nU CyN6Lj53pr4wxH5I3mgl157ag8XNlajVy3rNp7AB0A3CaigthCcBXLVSuX7mwLH8LoD+ IYW0EqiitxmRxnkJ22DhVYnABKExlac9EoBBECXA6EPCiZc8QM1VKz/h4j74Ww318vD2 TdGsUvXPjqYbhgROLamrHr0Krg9i81N9jMBkRrIu9bcvaN4t/07U1r4kY9c+JC5bE0kr JBXkF8dGI9wcuzCf6adO0uKpH2KjeqIeaYmsgyovW//lmQx9XiVXgjJvgMZ+IzX0VgTR N5XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707318411; x=1707923211; h=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=rjS5e0EWtdUiCwzB9qyKeQ2bfTahV47ztVaYUQv0sEo=; b=t2M8opjHHl4oz6qdbPZ3U4iW5rgcePkfMoZBid3FBzT9rlsyY5RFRkxBgOayqco5YL +iWlqFhx106fxdo4PFpv+IpoShVah400i6px1pDwZjouowFkXkJ+Io5cUqXzU43WjGNt 6ga6RounVdQljICD5Fi8+hyoVaPS+wgGhQoHgtTdcRq6FAcrWm2ql1qIy3sImBVlBJ55 mrVXHoxzMpStIE91ZSuSXlfCya05facoHtP4iKkN55NogJVk3pFynCnhnNlbTjbANwAM 5ArUcPRLfEcCmmSzY+LMTcuhq3EAU4MrFmJgeqFCHSZB9a2PjHUE4qcveNqQ5wiER3wy PKdw== X-Gm-Message-State: AOJu0YySDvhQMBpJxQQQFwJl2Uyg+mUlDPkKW24JJ357xveVvpzUWz3y WPyCQPhRLPRK1OVB5iUaRvVnhlD5pbXqwt0O6dMqUniSvfr1Gygz01d0WDgscQSjUvZxWfviHCB 25h23dFlDyiDJ64PgoyS+Qb1v7IQ= X-Google-Smtp-Source: AGHT+IHTedHhghGRhGL3eH21dQ80OO8m3YcQkG1BNWDnJDQVQXJ6ez958m+rdFn10h6Ex/f2PROrjV+fiPhSDAd/rn8= X-Received: by 2002:a4a:6510:0:b0:59c:a7d9:cb2b with SMTP id y16-20020a4a6510000000b0059ca7d9cb2bmr6688084ooc.0.1707318411554; Wed, 07 Feb 2024 07:06:51 -0800 (PST) MIME-Version: 1.0 References: <742f202d-7990-4f51-b903-7a15e3fd33c2@app.fastmail.com> <3db4fbe0-22f4-44e2-a1a6-6cd85287df56@app.fastmail.com> <4fa06ed3-855a-4952-a1fe-c97c5249b814@app.fastmail.com> In-Reply-To: <4fa06ed3-855a-4952-a1fe-c97c5249b814@app.fastmail.com> =?UTF-8?B?Yg==?= <6562680@gmail.com> Date: Wed, 7 Feb 2024 18:06:15 +0300 Message-ID: To: Larry Garfield , internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000707cbb0610cc0bcb" Subject: Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301 From: 6562680@gmail.com (=?UTF-8?B?0JPRgNC40LPQvtGA0LjQuSBTZW5pb3IgUEhQIC8g0KDQsNC30YDQsNCx0L7RgtGH0LjQuiBXZQ==?==?UTF-8?B?Yg==?=) --000000000000707cbb0610cc0bcb Content-Type: text/plain; charset="UTF-8" Analyzing the problem on a single level operation is incorrect. New code and simple operations are fully covered with exception/try/catch flow. The main point i tried to attract your attention is that if you working in batches/queues/pipelines you still need errors collection, and if you made error flow with exceptions - you have to extract validations to separate classes/dto-s, made return types as objects, try/catching as fast as possible, and then you will still met errors from remote systems, network errors, and invalid response parsing that need to be logged as much close to task registration place. So correct analysis - providing an example with at least foreaches/yields instead of simply calling native functions. In small functions IF statements are overkill, and even try-catch could be skipped, because the whole script will fall and that's correct behavior. Case is in that the script should continue working while working with chaining/nesting, and should be able to easily refactor any step to skip one or more bulk-data rows of each step on any nesting level. --000000000000707cbb0610cc0bcb--