# Important incompatible changes in RequestFactory (ContentNegotiation)

**URL:** <https://discourse.laminas.dev/t/important-incompatible-changes-in-requestfactory-contentnegotiation/372>\
**Category:** Components & MVC\
**Created:** [November 16, 2017, 2:06pm UTC](https://discourse.laminas.dev/t/important-incompatible-changes-in-requestfactory-contentnegotiation/372 "2017-11-16T14:06:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![merkushin](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/merkushin/32/234_2.png) [@merkushin](https://discourse.laminas.dev/u/merkushin)\
**Post date:** [November 16, 2017, 2:06pm UTC](https://discourse.laminas.dev/t/important-incompatible-changes-in-requestfactory-contentnegotiation/372/1 "2017-11-16T14:06:54Z")

</div>

In [zf-content-negotiation 1.3.1](https://github.com/zfcampus/zf-content-negotiation/tree/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.)

---

<div class="post-metadata">

**Author:** ![ocramius](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/ocramius/32/23_2.png) [@ocramius](https://discourse.laminas.dev/u/ocramius)\
**Post date:** [November 16, 2017, 2:39pm UTC](https://discourse.laminas.dev/t/important-incompatible-changes-in-requestfactory-contentnegotiation/372/2 "2017-11-16T14:39:49Z")

</div>

Please report an issue on the repository

---

<div class="post-metadata">

**Author:** ![merkushin](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/merkushin/32/234_2.png) [@merkushin](https://discourse.laminas.dev/u/merkushin)\
**Post date:** [November 16, 2017, 3:35pm UTC](https://discourse.laminas.dev/t/important-incompatible-changes-in-requestfactory-contentnegotiation/372/3 "2017-11-16T15:35:45Z")

</div>

Thank you.  
[Dit it.](https://github.com/zfcampus/zf-content-negotiation/issues/98)

Probably it will be more useful.
