Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102150 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40741 invoked from network); 28 May 2018 16:56:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2018 16:56:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.192.177 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.192.177 mail-pf0-f177.google.com Received: from [209.85.192.177] ([209.85.192.177:43080] helo=mail-pf0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/77-01681-6B43C0B5 for ; Mon, 28 May 2018 12:56:24 -0400 Received: by mail-pf0-f177.google.com with SMTP id j20-v6so6065214pff.10 for ; Mon, 28 May 2018 09:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=yBYOvYNcI5ThoBHpC+3jl3p+5MS3X/AZ7uKgka7QUkQ=; b=RQPXRIbhWukHSeJ/RPAJCPCl770/LxjzlxadPDBebrf8raNmmsCbBsf1cqtUj5SkeM Ka4G9kwggfxMlJbZzyiKSiV8QKFqsMFGE2uC17FwaudStAG4curMJUpPKZmWm9YMFiTA FlSIFUIOIco+qJCQcw/7Hzb64XhITRpLiKoxQTUKTIft8PgKhvEE5UuyWyez6eenLhxL 95/VOrFLj7weZUr1aYO3FRIQaKcMfaGjuDy3T+ohCaGR9rYbClnGYUBE2xIyqbKFgpYJ 168jSakUL4GrDZLg2FFaB+u4GcJzD/pD6tpLpAvxeQKgYaAMEmvvU29ceBlDRpJW1W2W cvYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=yBYOvYNcI5ThoBHpC+3jl3p+5MS3X/AZ7uKgka7QUkQ=; b=fpwZrW0Js7lA//IoZAu0czccOq8otRVv4cDnNFs2ho1A/hdA5EAVahTowAciyvM/ow W1sRsVAwahkBWeDTkz/Glq+Be/VM8IU1P8QPHOB9zLuWnuufbUt/D8SKQ1hPn0mTZIAW 6PnGDH9h6gE+DCBiR1Zt8jLD/JHe2C/OKCurh1glljTWCxXsOI7UuwWHGr4Iv7mh+1nI Gk6tNP9kh2If2WnvUl0TX7a9hi+0vHEV3oSEWOvh9nC92Ro1KvhfqzSRjkqWqx5LVfa8 GWVTUxpO1G0OOYoBLUxdfOs7sEm2TzC1RAgIkteiyR9BvM8omoTsluWPGSIJaQS/dz6Y 6dEA== X-Gm-Message-State: ALKqPwesBA9irshBk7JtQKi1HlGhsK/k1SMeA4Uf457sKEo3o9+5TVhy 45pSEVDrd0IsiZo5YybLO6s/Jaba4KPdxrrabk3PJJBlMCg= X-Google-Smtp-Source: ADUXVKJ/8UwnZnZInVB5j1IbedrBOeaLJXf/sJ97cuC/MKQXXV4hap8+bOpZOoVWEF/svaYmRFm/YIUwECx2mx7+6V8= X-Received: by 2002:a62:ff1d:: with SMTP id b29-v6mr1644918pfn.181.1527526578756; Mon, 28 May 2018 09:56:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:3944:0:0:0:0 with HTTP; Mon, 28 May 2018 09:56:18 -0700 (PDT) In-Reply-To: <4e605b02-fe9e-1128-4c98-e274b2ab375d@php.net> References: <29dffbd0-b356-08eb-2232-cd02821a0056@php.net> <4e605b02-fe9e-1128-4c98-e274b2ab375d@php.net> Date: Mon, 28 May 2018 18:56:18 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Parse error: Invalid body indentation level From: rasmus@mindplay.dk (Rasmus Schultz) > > Yes, this is an expected result under the flexible heredoc RFC. To avoid > > issues, please use a heredoc label that does not occur within the string. > > Hmkay, so code that worked fine with PHP 7.1 and PHP 7.2 breaks with PHP > 7.3. This breaking change should at least be prominently documented. As of > right now, I do not see such documentation in UPGRADING. Wow, I can't believe I didn't think of this when I reviewed that RFC. This is potentially a pretty serious BC break, really - at least in two cases: 1. Markdown, where indentation can be irregular as well as meaningful. 2. Failing tests! The latter could prove rather difficult - getting your tests to pass under 7.2 and 7.3+ might be far from simple, and at the very least would require test-helpers that conditionally treat whitespace differently for 7.3+ and earlier versions. Even inline HTML could potentially suffer, if you have
 blocks.

And on top of these unexpected results and test-failures, of course
there may be parse errors for inline content with meaningful
whitespace that was (or wasn't) indented correctly.

Honestly, are there any cases where existing code *benefits* from
changing the existing syntax/feature?

Some people indent inline blocks so that the output ends up with the
desired indentation, rather than the source-code looking pretty - in
those cases, whitespace will now be silently removed and the output no
longer as desired?

Are we positive it wouldn't be safer to just introduce a slight syntax
variation for blocks that treat indentation differently?

(am I blowing this out of proportion?)