Re: [PHP-DEV] Easy method of overriding built-in php functions.

2017-08-16 Thread David Lundgren
class is the following > line to get the expected JSON string: There is the php-mock library, which appears to have integration for PHPUnit, Mockery, and Prophecy. I can't vouch for it as I've not used it yet. https://github.com/php-mock/php-mock Dave -- David Lundgren dlundg...@syb

Re: [PHP-DEV] bugsnet cleanup

2017-01-17 Thread David Lundgren
an help to make the tracker a little more visible? Dave -- David Lundgren dlundg...@syberisle.net GPG: 0x26F54D7F signature.asc Description: OpenPGP digital signature

Re: [PHP-DEV] PHP 5.6.27 and 5.6.28 both fail tests with Fatal error in the same place

2016-11-12 Thread David Lundgren
enssl/tests/streams_crypto_method.phpt Good hunting, David -- David Lundgren dlundg...@syberisle.net GPG: 0x26F54D7F signature.asc Description: OpenPGP digital signature

Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions

2016-11-03 Thread David Lundgren
e contexts: Yii CMarkdownParser: https://git.io/vXCiy ZF2 stdlib FastPriorityQueue: https://git.io/vXCiH Drupal DI Container: https://git.io/vXCPB Symfony MO file loader: https://git.io/vXCPK Symfony HttpFoundation Request: https://git.io/vXCXW Dave -- David Lundgren dlundg...@syberisle.net G

Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions

2016-11-03 Thread David Lundgren
of overhead. Again, thanks for the feedback! Dave On 10/26/16 8:42 AM, David Lundgren wrote: > Greetings, > > As suggested by several reviewers of a PR[1] I recently submitted, I'd > like to get feedback on letting custom Iterators be used in the current, > next, reset, and key

Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions

2016-10-31 Thread David Lundgren
now at index:1 current => 2 $ary->key(); // 1 // I'll bikeshed the Array type now $ary->search(2); // 1 $ary->in(2);// true $ary->keys();// [0,1,2] // threw these in here for good measure, part of \Iterator interface? $ary->first(); // 1 $ary->last();

Re: [PHP-DEV] Re: Allow Iterator to be used with current, next, reset, key functions

2016-10-31 Thread David Lundgren
able in some other contexts. I'll also admit that I don't normally read the docs until I have problems. The behavior with passing objects to those functions is only documented by a user comment. Dave -- David Lundgren dlundg...@syberisle.net GPG: 0x26F54D7F -- PHP Internals - P

[PHP-DEV] Allow Iterator to be used with current, next, reset, key functions

2016-10-26 Thread David Lundgren
maintained for classes that do not implement Iterator. [1] https://github.com/php/php-src/pull/2176 [2] https://bugs.php.net/bug.php?id=49369 Thanks, Dave -- David Lundgren dlundg...@syberisle.net 808.639.0365 GPG: 0x26F54D7F -- PHP Internals - PHP Runtime Development Mailing List To unsubscr

Re: [PHP-DEV] Adding weekdays to DateTime resets the time

2015-05-04 Thread David Lundgren
There is actually already a bug for about this: https://bugs.php.net/bug.php?id=54909 I ran into this several months ago when I upgraded a project from 5.3.2 to 5.5 and found that in 5.3.6 the behavior had changed. I ended up working around it in my code. It was definitely annoying but had we upgr