Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

[#7396] Functionality only works in PHP >= 5.6 #7483

Closed

Conversation

weierophinney
Copy link
Member

PR #7396 introduced code that only works in 5.6; this patch does the following:

  • Raises a RuntimeException when the new setType() method is invoked in
    versions less than 5.6.
  • Skips unit tests of that method when the PHP version is less than 5.6.

This patch also fixes several long lines, flagged by phpcs when I was editing.

Raise a RuntimeException when the method is invoked in versions less
than 5.6, and skip unit tests in those situations as well.

Also fixes several long lines.
@@ -86,9 +86,14 @@ public function testGetConnectionStringEncodeSpecialSymbol()
*/
public function testSetConnectionTypeException()
{
if (version_compare(PHP_VERSION, '5.6', 'lt')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are if (PHP_VERSION_ID) check used instead of version_compare in other source, for example : https://github.com/zendframework/zf2/blob/master/library/Zend/Stdlib/JsonSerializable.php#L12.

what we will be using for consistencies ?

@Maks3w Maks3w added this to the 2.4.1 milestone May 5, 2015
@Maks3w
Copy link
Member

Maks3w commented May 5, 2015

#7482 provides a fix too but from a "feature exists" approach

@Maks3w
Copy link
Member

Maks3w commented May 5, 2015

Merged #7482 instead

@Maks3w Maks3w closed this May 5, 2015
@Maks3w Maks3w added the Db label May 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants