|
I believe this one is for marc-mabe...
I'm still compiling Di definitions as part of my build process and when I pulled lastest ZF2, the compilation broke for Zend\Cache. This is because the new ApcIterator class has an APCIterator (from the PECL extension: http://php.net/manual/en/class.apciterator.php) as a constructor parameter. My local dev machine is Zend Server so I don't have APC installed. Is it valid to NOT strongly type the parameter and instead ensure the passed in object is an APCIterator in the function body? Would it be worth it (and is it possible) to add Di compilation of all components to the Travis build process? I don't believe the Travis VMs have APC installed so this would have been caught. Thanks, -Nick (@SocalNick) |
|
Hi nick!
I cannot help with the issue (while you probably can fix it by mocking that class and defining it in your global namespace), but would you be able to share your current build process? As you know I'm working on a Di Compiler, and it would benefit greatly from compiling also definitions :) Thank you! Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 25 June 2012 20:34, Nicholas Calugar <[hidden email]> wrote: I believe this one is for marc-mabe... |
|
In reply to this post by SocalNick
Another response-but-not-an-answer: 2012/6/25 Nicholas Calugar <[hidden email]> I don't believe the Travis VMs have APC installed so this would have been caught. I know Travis-CI is able to download, compile, install and configure additional dependencies. A quick search gave me this script to load apc in the test process: https://github.com/dshafik/frapi/blob/45c9f85f8da745648415b525fbc1c9cfe1ede5d8/src/frapi/tests/travis-ci/install-apc.sh
Just put it as a "before_script:" task to execute. -- Jurian Sluiman |
|
Marco,
I'm pretty sure I got the "gist" of the create definitions script from either MWOP, Ralph, Evan, or Ben...can't remember where I saw it but it was way back at ZendCon I think. We've slightly customized for our use case. Here is our script to create definitions: https://gist.github.com/2996783 And here is the configuration to load the compiled Di: https://gist.github.com/2996822 Jurian, My point was that we should be able to compile Di w/o extra extensions. Does anyone have an opinion on whether ZF2 classes should have to be "compilable for Di" w/o any PECL extensions? Thanks, -Nick (@SocalNick) On Tue, Jun 26, 2012 at 1:43 AM, Jurian Sluiman <[hidden email]> wrote:
|
|
Per MWOPs request, I have added a flag to the Di definition compiler that will allow it to proceed when a ReflectionException occurs. This will get us by as long as the undefined class is a parameter...a fatal still occurs if the undefined class is a parent or interface.
-Nick (@SocalNick) On Tue, Jun 26, 2012 at 9:29 AM, Nicholas Calugar <[hidden email]> wrote: Marco, |
|
Administrator
|
-- Nicholas Calugar <[hidden email]> wrote
(on Wednesday, 27 June 2012, 05:41 PM -0700): > Per MWOPs request, I have added a flag to the Di definition compiler that will > allow it to proceed when a ReflectionException occurs. This will get us by as > long as the undefined class is a parameter...a fatal still occurs if the > undefined class is a parent or interface. This seems reasonable, and it's likely an edge case for many as it is, so having the flag, and documenting how and when to toggle the flag, should be sufficient. Thanks for doing this, Nick! > On Tue, Jun 26, 2012 at 9:29 AM, Nicholas Calugar <[hidden email]> wrote: > > Marco, > > I'm pretty sure I got the "gist" of the create definitions script from > either MWOP, Ralph, Evan, or Ben...can't remember where I saw it but it was > way back at ZendCon I think. We've slightly customized for our use case. > > Here is our script to create definitions: https://gist.github.com/2996783 > And here is the configuration to load the compiled Di: https:// > gist.github.com/2996822 > > Jurian, > > My point was that we should be able to compile Di w/o extra extensions. > Does anyone have an opinion on whether ZF2 classes should have to be > "compilable for Di" w/o any PECL extensions? > > > Thanks, > > -Nick (@SocalNick) > > > > On Tue, Jun 26, 2012 at 1:43 AM, Jurian Sluiman <[hidden email]> > wrote: > > Another response-but-not-an-answer: > > 2012/6/25 Nicholas Calugar <[hidden email]> > > I don't believe the Travis VMs have APC installed so this would > have been caught. > > > I know Travis-CI is able to download, compile, install and configure > additional dependencies. A quick search gave me this script to load apc > in the test process: https://github.com/dshafik/frapi/blob/ > 45c9f85f8da745648415b525fbc1c9cfe1ede5d8/src/frapi/tests/travis-ci/ > install-apc.sh > > Just put it as a "before_script:" task to execute. > -- > Jurian Sluiman > > > > -- Matthew Weier O'Phinney Project Lead | [hidden email] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc |
| Powered by Nabble | Edit this page |
