Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80277 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45907 invoked from network); 8 Jan 2015 12:38:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2015 12:38:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 74.125.82.51 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.51 mail-wg0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:59793] helo=mail-wg0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BB/14-21915-03A7EA45 for ; Thu, 08 Jan 2015 07:38:10 -0500 Received: by mail-wg0-f51.google.com with SMTP id x12so2353672wgg.10 for ; Thu, 08 Jan 2015 04:38:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=yHhfm6DopmRbwjHzOTqwfynvDWnRNSQPDYM2ppwdP8c=; b=XDh0SW9dbVeqKEB1qa5+mLAJG7rsCLxtMEnt7GxQTSDVDxRntHVco2BtlXns3dlmSr MGbBOXp9EseYaV6odKl5ag7CD7NQCX4pXdlFLIRgZTZHj6X/GuIaQBP1kdnjxLvWshci 2uC5Vlf/DyL6C6HgL6eKG+hcg0+SPrFv85Ec4GurlZbQ7t0I23VFu60QnnB+OSZ2I3OL +N6xJOTsdqyUio3SSdivu5daboaDHGUwCWYOqI6rsAWackLpP6uYTGSi3rmmFD012DX0 yqMHth0eXA+AtkGtSjVRNn810NCuPNYNB2/uyd9IelxS2JoEdAGz9cx4g7XC9KuWkKfa ZNtA== X-Gm-Message-State: ALoCoQlbgKKjoLGQ47MYOmf+AHLAExFLXS5Dr9cCncbJ+nyKKxkRSSbFIt5QfP9FMc2WM5cIL0QM MIME-Version: 1.0 X-Received: by 10.194.62.76 with SMTP id w12mr18948008wjr.5.1420720685098; Thu, 08 Jan 2015 04:38:05 -0800 (PST) Received: by 10.194.57.73 with HTTP; Thu, 8 Jan 2015 04:38:04 -0800 (PST) X-Originating-IP: [77.180.19.30] In-Reply-To: <54AE7340.6080708@fedoraproject.org> References: <54AE7340.6080708@fedoraproject.org> Date: Thu, 8 Jan 2015 13:38:04 +0100 Message-ID: To: Remi Collet Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7ba977a4c2bfc0050c234f37 Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: kontakt@beberlei.de (Benjamin Eberlei) --047d7ba977a4c2bfc0050c234f37 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Jan 8, 2015 at 1:08 PM, Remi Collet wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Le 04/01/2015 12:52, Benjamin Eberlei a =C3=A9crit : > > > https://wiki.php.net/rfc/extension_prepend_files > > Sorry but definitively seems a bad idea. > > > If you want a pure-php library, provide as one. > > If this library need an extension, just describe this in the metadata > (pecl, composer, ...) > > Ex: > - - twig extension (of the C extension is optional in this case) > - - xhprof (or its fork) > > Having a "huge" piece of code included in "each" request will be a > nightmare. > This argument is irrelevant to the RFCs goal in my opinion. 1. This RFC is about making it possible "somehow" to bundle PHP code with extensions that is *required* to make the extension work in a sane way for the end-user. 2. The size of that code or the performance impact is irrelevant imho. Users of extensions with this functionality can decide how this affects their server performance and if they are ok with that. 3. Code that is *optional* can still be a Composer/PEAR/anything library. 4. Everything CAN be misused. You can already write an extension that includes LOTS of code in RINIT. This RFC is only about defining a sane process for allowing this, instead of a hack that it is now. Examples of good use-cases for this feature: 1. Low-Level MongoDB connection code in C, userland OOP API in PHP. 2. Low-Level Crypto code, simplified PHP functions (think ext/hash + ext/password) 3. Database Vendor Extensions in C + common DB abstraction in PHP (PDO2). 4. Low-Level Date handling, high level PHP code This RFC tries to solve the current approach to extensions: 1. Writing everything in C, which is difficult to maintain and more prone to nasty bugs (segfaults, memory leaks). 2. Requiring a PHP library to be installed, which is makes installation complicated as its not supported by PHPs extension tooling in a straightforward way right now. I should rewrite the RFC and remove the implementation details, because essentially the solution could also be tooling based (vs code based). > Yes, PHP library can be managed per host/dir/app/whatever > While extension are enable for all the SAPI. > > Seems you are trying to solve a "downstream" issue, not a PHP one. > > > > Remi. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iEYEARECAAYFAlSuc0AACgkQYUppBSnxahiKxQCgpTnfu8Jpjz3nauIRCZGZHvi9 > asAAniYb0b8m7Sn9I5MVooxssD5a2oS1 > =3DdkkN > -----END PGP SIGNATURE----- > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --047d7ba977a4c2bfc0050c234f37--