On Tue, Jan 6, 2015 at 3:24 AM, Derick Rethans <der...@php.net> wrote:
> On Mon, 5 Jan 2015, Stanislav Malyshev wrote:
>
>> > 2) Embedded text sections.  It's possible to place the raw PHP code
>> > into the compiled .so/.dylib/.dll file and fetch it out for
>> > compilation at runtime.  This enables easy bundling of the loaded
>>
>> I guess it is possible, but why - what's wrong with plain old files and
>> phars?
>
> Deployment and installation. Right now, "pecl install extension" doesn't
> really allow you to also install **and** load a PHP script on every
> request. Such a PHP script could define extra classes, that are written
> in PHP - because maintainting them as a C implementation would be way
> more work. Having users install another set of PHP files for every
> project is error prone, and frankly, bad for user experience. I can
> definitely see the use case here, and it's probably something we'd want
> to use for the new MongoDB driver.


The more I read the replies here the more I think we have two issues
two solves. That does not mean this proposal (how it will be done
seems to be very open at this point) is a bad idea.

1. Current internals APIs are not good enough for easy to implement
and maintain exposed classes (declaration, implementation, etc.)
2. We have no easy way to actually release and deploy adhoc scripts,
used by a given extension

For 1., as stated earlier, we really need to work on that. The sooner
the better.

For 2., it is one of the thing I can imagine implementing in pickle.
Or even better add it a s part of the build scripts and macros. Either
will work, even for binary install on windows f.e.. I would really
like to define a clear location relative to the extension directory.
This location will be used by this new feature, if implemented. I also
think that it should be either part of the current prepend setting, by
default and system only, or another setting. What I really consider as
a bad practice is any kind of bundling scripts in the extensions, that
will be a real pain to maintain and it opens some unknown can of
worms. Distros may also prefer to have that script outside the
extension, easier for cherry picks update when necessary (f.e.
security fixes).

Please take it as a brainstorming, thoughts?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to