Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80274 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40218 invoked from network); 8 Jan 2015 11:51:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2015 11:51:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-la0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:49560] helo=mail-la0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/13-21915-63F6EA45 for ; Thu, 08 Jan 2015 06:51:19 -0500 Received: by mail-la0-f42.google.com with SMTP id gd6so8748078lab.1 for ; Thu, 08 Jan 2015 03:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=psKlnV5qk40Vbv0zZ3qBJuTKpmMfZdNBHUWMryjjE2A=; b=CYdiXiwWyq6LOIBQntN3haA/Xf2NbgW2PRs5VAX0hlDy+Ga1jZEIAwKkVyf8/fpqYN d0G3dk7Q27K4oScGSorZg+MN3p+6P7eDrp1X0Dj7fxq498ZSOVJzF9s9ff5Frv+devkw Nwl7WOFQtlGV5huBmdO1jSm5Uh0ZsX5fvv9zLjsaGNQ15FnHVrn0WJsXnHmUin++VPU2 rGQcmRZk8+BgqpHUqJtVksLf9aC2adwS6lX5aZBnTw+rGyPWvQjp3ufEKtOHxTAZUETc rY0PxFggnbKqSe0kAVhx6AkXSsRdMzEpJPi0j4HLx2TLi09ZT0hBlPDYyoWimTfKGsUF iyCA== MIME-Version: 1.0 X-Received: by 10.112.150.194 with SMTP id uk2mr12830403lbb.84.1420717873933; Thu, 08 Jan 2015 03:51:13 -0800 (PST) Received: by 10.112.154.133 with HTTP; Thu, 8 Jan 2015 03:51:13 -0800 (PST) In-Reply-To: References: <54AAF98B.4020709@gmail.com> <001b01d029bb$fa687fc0$ef397f40$@tekwire.net> <00a201d02ac7$406a4830$c13ed890$@tekwire.net> Date: Thu, 8 Jan 2015 03:51:13 -0800 Message-ID: To: Derick Rethans Cc: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , PHP internals , Sara Golemon , Stanislav Malyshev , Benjamin Eberlei Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: pierre.php@gmail.com (Pierre Joye) On Thu, Jan 8, 2015 at 3:43 AM, Derick Rethans wrote: > On Wed, 7 Jan 2015, Pierre Joye wrote: > >> On Wed, Jan 7, 2015 at 2:14 PM, Fran=C3=A7ois Laupretre wrote: >> >> De : Pierre Joye [mailto:pierre.php@gmail.com] >> >> >> >> ... here, it is proposed to bundle scripts that will be executed at >> >> runtime like any other script, except that nothing can be done with >> >> them, not even disable them if not required (like using its own >> >> glue codes). >> > >> > I agree. Bundling scripts in extensions to execute them at each >> > RINIT is, IMO, not a good idea (mostly for performance reasons and >> > lack of control, as you note), but I keep thinking that a mechanism >> > to embed PHP scripts in extensions and make them available via a >> > common stream wrapper can be useful. What I don't like is the fact >> > to execute them automatically at every RINIT. I prefer to let the >> > extension free to load its PHP code when its logic decides it is >> > needed. >> >> Or let the extension defines a script to prepend, preload, whatever we >> end to do. >> >> It is however important, as you mentioned, to leave the engine and the >> user the ability not to load it, at all. > > No no, *not* loading the code is exactly what I want to prevent people > from doing! The PHP library code is an *integral* part of the extension. > Without it, its APIs and functionality would be useless. Sorry but yes. It is PHP code, and I, for one, want to be able to do not use it if I do not like it or do not need it. > pickle, two packages, or any of that other mallargy are not going to fix > this. It needs to be one package for this to work well, *without* the > possibility of users messing things up. Users are not stupid. It is possible to have one package only already. Take= #24. Now I will come back with the patch to provide a solution that users cannot mess up, as you nicely said and examples. Keeping in mind that it is already possible to do but not as easy and userfriendly as it should be (like manual include or the like). Cheers, --=20 Pierre @pierrejoye | http://www.libgd.org