Mentioned in https://github.com/php/php-src/pull/5965#discussion_r467621123
This PR proposes 3 lines of context so the impact can be seen in tests.
Other `diff` programs show around 3 lines of context.
(This helps indicate exactly which position a test should be updated
to add a new expected line at)
Use the mapping for choosing order to display diffs
Properly include context in cases where the expected output had more lines than
the actual output, e.g.
```
--FILE--
A
A1
A
C
NEARBY
--EXPECTF--
A
B
A1
B
A
B
A
B
NEARBY
```
Closes GH-5968
We have to ensure that the attempted connection to the MySQL server
fails, and do that by passing an unknown host instead of falling back
to localhost.
The current signature is incorrect, because the $ctor_args parameter
is not required to be an array (it can at least also be null, and
isn't enforced by an exception anyway).
I'm going for the variadic signature here, because we already use
the same variadic signature in PDO::query() and
PDOStatement::setFetchMode(), all of them accepting essentially the
same arguments.
There is an edge case in constructor behavior where we can end up
with mysql->mysql being NULL (rather than mysql itself already being
NULL). I think that ultimately that's a bug in the constructor code,
and we should probably be destroying the outer structure on
construction failure as well. However it's pretty hard to unravel
with when considering all the construction permutations.
Instead of false. This is consistent with how other methods like
SplFileInfo::getPath() behave. It's also a requirement before
SplFileInfo::__toString() calls SplFileInfo::getPathname() and
needs to return a string.
Refactor the zend_is_callable implementation to check callability
at a particular frame (this is an implementation detail for now,
but could be exposed in the API if useful). Pick the first parent
user frame as the one to check.
The Apache MIME type map is not actively maintained anymore, so
this switches to jshttp/mime-db, which seems to be the de-facto
standard in this area now. This avoid the need to patch in our
own MIME types over time.
The preference algorithm is based on:
47b62ac45e/index.js (L154)
Closes GH-5764.
* Remove usage of strftime() in favor of date() in cases where
we are not specifically testing strftime(). We implement
date() ourselves, and as such are insulated from implementation-
defined behavior.
* Add skipif for broken strftime() %Z support. We have decided
not to work around the issue for musl using manual expansion,
as people should not be using this function anyway, and it is
slated for future deprecation.
* Don't test strftime() with invalid format specifier. The
behavior is implementation-dependent.