Important incompatible changes in RequestFactory (ContentNegotiation)


#1

In zf-content-negotiation 1.3.1 we got change of one line.

Original:

if (Console::isConsole()) {

Changed:

if (PHP_SAPI === 'cli') {

Commit message:

Make zend-console a suggested dependency required for console requests only

Here are two problems with this change.

  1. In case of console application it will fail if you will not use \Zend\Console. And IMO it is not obvious. Strong dependency become hidden, but Console is still required.
  2. This change of minor version has incompatible changes. (From my experience: In our functional test we set $isConsole to false and expect to get HttpRequest, but get CosoleRequest.)

#2

Please report an issue on the repository


#3

Thank you.
Dit it.

Probably it will be more useful.