Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102692 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76864 invoked from network); 10 Jul 2018 10:12:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2018 10:12:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.54 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.54 mail-it0-f54.google.com Received: from [209.85.214.54] ([209.85.214.54:50359] helo=mail-it0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/60-49043-2A6844B5 for ; Tue, 10 Jul 2018 06:12:51 -0400 Received: by mail-it0-f54.google.com with SMTP id w16-v6so8317700ita.0 for ; Tue, 10 Jul 2018 03:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Sjs1l7wKjQpd5+kXywCeUrLo8WSDhBayEW7ReSpqce4=; b=W8pVsJB9FeMIbF9fhX0sl2xwa91RImRR2KY/XXb4ZjctqFv8t4O0uamNotIpzRXCwj xrSmXs5GBUSQ6kFxHj50C+Q+LRn9gbbZzV1bdXlUkvF3rWYY27fEInohmG34QiUJoxr/ EaWsC0xkXIWcP1G21XtudDvm0tzLw/DpL8YEeQjkESkGe6bSvIPDBD+Zsmi6u2a6nkYK AH/mAnjF5XjC/8Cx8NNp2kUdzetPVYpOpYXNXcOs1JcSkCPbXklsRGWDIODis4GT+EVz h+7SjsbHgXIBGzUhERoYDwJmO1OjD6wcANNr9jZogBV1ONSJTy1JIO9FFdJW7QyPradw CyEw== 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:cc; bh=Sjs1l7wKjQpd5+kXywCeUrLo8WSDhBayEW7ReSpqce4=; b=awqNXP44hnmtfyIO9Po98UQ2o7NodEz7/T4CcYdEU5QoYbakzLEr3CrsM+SbEgeSwX cGzLSeYxa+CbysxB/GRbz4+lvInWtmyslVjZNFV29u5Csg0RIPOt6gHV5MeklQD/xZYx 0mdTUbN1QPQanLRl2Q2b6JLGsk+2SV2nzcZK4csQ3m0Yva60S0HEqrfoKyVwYFqNJ3uq nR+0Lp7QIYQrTcfj+pjojpo/52cUCwSlDM39ZwPUy0kmLicW127dACb0HCG34yksAbTL sBLxtU56vElrr9yKSrEM01Z6AnrfpLC4N0PHW16NCdKjimYfNwzf5PmuwTRlJpmn6b2F e4hg== X-Gm-Message-State: APt69E1n5C5D4Nc1vczxPOvb6k/WLjMd1FWjALPEWpzyvSnO66JtmhmC RE55sfDLy6CZoCS/iT6kfYBXj92FfHi8CUIbG7UJng== X-Google-Smtp-Source: AAOMgpfU42ga5+RYJOL6PFlQUG/iBHo3+6iX7959pX4Xp4wQU/kgV/Fc7ooukQ4yc0dQqHCsXczXGgsYCvAJaRtdnWU= X-Received: by 2002:a24:4ad2:: with SMTP id k201-v6mr20197180itb.6.1531217567844; Tue, 10 Jul 2018 03:12:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:148a:0:0:0:0:0 with HTTP; Tue, 10 Jul 2018 03:12:47 -0700 (PDT) In-Reply-To: <8jq8kdlrqnaiego6no06osfq2ciao11tdm@4ax.com> References: <8jq8kdlrqnaiego6no06osfq2ciao11tdm@4ax.com> Date: Tue, 10 Jul 2018 12:12:47 +0200 Message-ID: To: Jan Ehrhardt Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000348d840570a25f8e" Subject: Re: [PHP-DEV] libmbfl API changes in PHP 7.3 From: nikita.ppv@gmail.com (Nikita Popov) --000000000000348d840570a25f8e Content-Type: text/plain; charset="UTF-8" On Tue, Jul 10, 2018 at 10:30 AM, Jan Ehrhardt wrote: > While trying to make the mailparse extension fit for PHP 7.3 I ran into > changes in the libmbfl API. I cannot find any documentation on this > change. > > The change was introduced in this commit by nikic: > https://github.com/php/php-src/commit/b3c1d9d1118438a3dae3544447db2b > 39ca5cfa25 > > To be specific: > https://github.com/php/php-src/commit/b3c1d9d1118438a3dae3544447db2b > 39ca5cfa25#diff-929fd74a8732776fa8776939a9b907d4L71 > > It broke the code of the mailparse extension at this line: > https://github.com/php/pecl-mail-mailparse/blob/master/ > php_mailparse_mime.c#L910 > > Shouldn't the be documented? And/or is there an easy fix? > Thanks for pointing this out, this should be added to UPGRADING.INTERNALS. mbstring and libmbfl underwent some larger refactorings in PHP 7.3, to make its performance less abysmally bad. The change you are running into is that many APIs have changed from working with enum mbfl_no_encoding to const mbfl_encoding *. You will have to mirror these changes: For example, instead of passing mbfl_no_encoding_8bit to a function, you use &mbfl_encoding_8bit. Instead of calling mbfl_name2no_encoding(part->content_transfer_encoding) you instead use mbfl_name2encoding(part->content_transfer_encoding) and so on. Nikita --000000000000348d840570a25f8e--