Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Shardj/zf1-future
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: remarkety/zf1-future-7.4
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 3 commits
  • 11 files changed
  • 2 contributors

Commits on Dec 31, 2021

  1. Update composer.json

    guy-remarkety authored Dec 31, 2021
    Copy the full SHA
    4722d5d View commit details

Commits on Mar 23, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e656526 View commit details

Commits on May 29, 2022

  1. Fixed small bugs - 7.4 php

    kostya-r committed May 29, 2022
    Copy the full SHA
    8388ac9 View commit details
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "shardj/zf1-future",
"name": "remarkety/zf1-future",
"description": "Zend Framework 1. The aim is to keep ZF1 working with the latest PHP versions",
"type": "library",
"keywords": [
18 changes: 10 additions & 8 deletions library/Zend/Cache/Backend/Memcached.php
Original file line number Diff line number Diff line change
@@ -119,8 +119,8 @@ class Zend_Cache_Backend_Memcached extends Zend_Cache_Backend implements Zend_Ca
*/
public function __construct(array $options = [])
{
if (!extension_loaded('memcache')) {
Zend_Cache::throwException('The memcache extension must be loaded for using this backend !');
if (!extension_loaded('memcached')) {
Zend_Cache::throwException('The memcached extension must be loaded for using this backend !');
}
parent::__construct($options);
if (isset($this->_options['servers'])) {
@@ -131,7 +131,7 @@ public function __construct(array $options = [])
}
$this->setOption('servers', $value);
}
$this->_memcache = new Memcache;
$this->_memcache = new Memcached;
foreach ($this->_options['servers'] as $server) {
if (!array_key_exists('port', $server)) {
$server['port'] = self::DEFAULT_PORT;
@@ -160,10 +160,12 @@ public function __construct(array $options = [])
$server['weight'], $server['timeout'],
$server['retry_interval']);
} else {
$this->_memcache->addServer($server['host'], $server['port'], $server['persistent'],
$server['weight'], $server['timeout'],
$server['retry_interval'],
$server['status'], $server['failure_callback']);
// $this->_memcache->addServer($server['host'], $server['port'], $server['persistent'],
// $server['weight'], $server['timeout'],
// $server['retry_interval'],
// $server['status'], $server['failure_callback']);

$this->_memcache->addServer($server['host'], $server['port'], $server['persistent']);
}
}
}
@@ -221,7 +223,7 @@ public function save($data, $id, $tags = [], $specificLifetime = false)
}

// ZF-8856: using set because add needs a second request if item already exists
$result = @$this->_memcache->set($id, [$data, time(), $lifetime], $flag, $lifetime);
$result = @$this->_memcache->set($id, [$data, time(), $lifetime], $flag);

if (count($tags) > 0) {
$this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_MEMCACHED_BACKEND);
2 changes: 1 addition & 1 deletion library/Zend/Config.php
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ class Zend_Config implements Countable, Iterator
* @param boolean $allowModifications
* @return void
*/
public function __construct(array $array, $allowModifications = false)
public function __construct($array, $allowModifications = false)
{
$this->_allowModifications = (boolean) $allowModifications;
$this->_loadedSection = null;
4 changes: 2 additions & 2 deletions library/Zend/Session.php
Original file line number Diff line number Diff line change
@@ -222,7 +222,7 @@ public static function setOptions(array $userOptions = [])

// set the ini based values
if (array_key_exists($userOptionName, self::$_defaultOptions)) {
if(!self::$_sessionStarted) {
if(!self::$_sessionStarted && !self::$_unitTestEnabled) {
ini_set("session.$userOptionName", $userOptionValue);
}
}
@@ -922,4 +922,4 @@ public static function isReadable()
return parent::$_readable;
}

}
}
4 changes: 2 additions & 2 deletions library/Zend/Test/PHPUnit/Constraint/Exception.php
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@
* @package Zend_Test
* @subpackage PHPUnit
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @license http://framework.zend.com/license/new-bsd New BSD License PHPUnit_Framework_ExpectationFailedException
*/
class Zend_Test_PHPUnit_Constraint_Exception extends PHPUnit_Framework_ExpectationFailedException
class Zend_Test_PHPUnit_Constraint_Exception extends \PHPUnit\Framework\ExpectationFailedException
{
}
4 changes: 2 additions & 2 deletions library/Zend/Test/PHPUnit/Constraint/Redirect.php
Original file line number Diff line number Diff line change
@@ -20,12 +20,12 @@
* @version $Id$
*/

if (version_compare(PHPUnit_Runner_Version::id(), '4.1', '>=')) {
if (version_compare(\PHPUnit\Runner\Version::id(), '4.1', '>=')) {
include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Redirect41.php');

class Zend_Test_PHPUnit_Constraint_Redirect extends Zend_Test_PHPUnit_Constraint_Redirect41
{}
} elseif (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) {
} elseif (version_compare(\PHPUnit\Runner\Version::id(), '3.5', '>=')) {
include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Redirect37.php');

class Zend_Test_PHPUnit_Constraint_Redirect extends Zend_Test_PHPUnit_Constraint_Redirect37
6 changes: 3 additions & 3 deletions library/Zend/Test/PHPUnit/Constraint/Redirect41.php
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Test_PHPUnit_Constraint_Redirect41 extends PHPUnit_Framework_Constraint
class Zend_Test_PHPUnit_Constraint_Redirect41 extends PHPUnit\Framework\Constraint\Constraint
{
/**#@+
* Assertion type constants
@@ -178,7 +178,7 @@ public function evaluate($other, $assertType = null, $variable = FALSE)
* NOTE 2:
* Interface changed again in PHPUnit 4.1.0 because of refactoring to SebastianBergmann\Comparator
*/
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = NULL)
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = NULL) :void
{
require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';
switch ($this->_assertType) {
@@ -226,7 +226,7 @@ public function fail($other, $description, \SebastianBergmann\Comparator\Compari
*
* @return string
*/
public function toString()
public function toString(): string
{
return '';
}
4 changes: 2 additions & 2 deletions library/Zend/Test/PHPUnit/Constraint/ResponseHeader.php
Original file line number Diff line number Diff line change
@@ -20,12 +20,12 @@
* @version $Id$
*/

if (version_compare(PHPUnit_Runner_Version::id(), '4.1', '>=')) {
if (version_compare(\PHPUnit\Runner\Version::id(), '4.1', '>=')) {
include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ResponseHeader41.php');

class Zend_Test_PHPUnit_Constraint_ResponseHeader extends Zend_Test_PHPUnit_Constraint_ResponseHeader41
{}
} elseif (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) {
} elseif (version_compare(\PHPUnit\Runner\Version::id(), '3.5', '>=')) {
include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ResponseHeader37.php');

class Zend_Test_PHPUnit_Constraint_ResponseHeader extends Zend_Test_PHPUnit_Constraint_ResponseHeader37
29 changes: 13 additions & 16 deletions library/Zend/Test/PHPUnit/Constraint/ResponseHeader41.php
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@
* @version $Id$
*/

use SebastianBergmann\Comparator\ComparisonFailure;

/**
* Response header PHPUnit Constraint
*
@@ -30,7 +32,7 @@
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Test_PHPUnit_Constraint_ResponseHeader41 extends PHPUnit_Framework_Constraint
class Zend_Test_PHPUnit_Constraint_ResponseHeader41 extends PHPUnit\Framework\Constraint\Constraint
{
/**#@+
* Assertion type constants
@@ -186,25 +188,20 @@ public function evaluate($response, $assertType = '', $variable = FALSE)
}
}

public function toFail($other, $description, ComparisonFailure $cannot_be_used = null): void
{
$this->fail($other, $description, $cannot_be_used);
}
/**
* Report Failure
*
* @see PHPUnit_Framework_Constraint for implementation details
* @param mixed CSS selector path
* @param string Failure description
* @param object Cannot be used, null
* @param $other
* @param $description
* @param ComparisonFailure|null $cannot_be_used
* @return void
* @throws PHPUnit_Framework_ExpectationFailedException
* NOTE:
* Drastic changes up to PHPUnit 3.5.15 this was:
* public function fail($other, $description, $not = false)
* In PHPUnit 3.6.0 they changed the interface into this:
* protected function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
* We use the new interface for PHP-strict checking
* NOTE 2:
* Interface changed again in PHPUnit 4.1.0 because of refactoring to SebastianBergmann\Comparator
* @see PHPUnit_Framework_Constraint for implementation details
*/
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = NULL)
protected function fail($other, $description, ComparisonFailure $cannot_be_used = NULL) :void
{
require_once 'Zend/Test/PHPUnit/Constraint/Exception.php';
switch ($this->_assertType) {
@@ -255,7 +252,7 @@ public function fail($other, $description, \SebastianBergmann\Comparator\Compari
*
* @return string
*/
public function toString()
public function toString(): string
{
return '';
}
Loading