This repository has been archived by the owner on May 8, 2024. It is now read-only.
forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zendframework#3684] Do polyfill for Session component as well
- SessionArrayStorage and Container were both doing version-specific conditional declarations; moved these into a compat layer as was done in Stdlib, and updated the composer.json for each of the component and framework. - Currently, the SessionConfigTest suite is not running for me, but appears to be a random autoloading error from running in isolated processes; will see how the Travis-CI run looks.
- Loading branch information
1 parent
834d631
commit 352a040
Showing
7 changed files
with
113 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\Session; | ||
|
||
/** | ||
* Session storage container for PHP 5.3.3 and less | ||
*/ | ||
class Container extends AbstractContainer | ||
{ | ||
/** | ||
* Exchange the current array with another array or object. | ||
* | ||
* @param array|object $input | ||
* @return array Returns the old array | ||
* @see ArrayObject::exchangeArray() | ||
*/ | ||
public function exchangeArray($input) | ||
{ | ||
return parent::exchangeArrayCompat($input); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
library/Zend/Session/compatibility/Storage/SessionArrayStorage.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\Session\Storage; | ||
|
||
/** | ||
* PHP 5.3.3 variant of SessionArrayStorage | ||
*/ | ||
class SessionArrayStorage extends AbstractSessionArrayStorage | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
if (version_compare(PHP_VERSION, '5.3.3', 'le')) { | ||
require_once __DIR__ . '/Container.php'; | ||
require_once __DIR__ . '/Storage/SessionArrayStorage.php'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters