On Thu, Jan 8, 2015 at 1:08 PM, Remi Collet <r...@fedoraproject.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Le 04/01/2015 12:52, Benjamin Eberlei a écrit : > > > 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 > =dkkN > -----END PGP SIGNATURE----- > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >