Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Changelog with v0.12 info and renamed getCreatedOn to getCreation #156

Merged
merged 4 commits into from
May 12, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@

## Stash v0.12 Changelog

### 0.12.1

* Full HHVM Support

* Removed xcache expirimental driver.

* Removed PEAR Support

* Internal Improvements- DocBlock, Explicitly Defined Variables, Commenting.

* Enforcement of code standards in test suite.

* FileSystem - Improved Storage and Retrieval

* Memcache - Altered subdrivers constructors and initialization.

* SQLite - Reduced duplicate code amongst PDO subdrivers.

* Updated Test Suite to make it simple to run again custom Pool or Item objects other than the build in ones.

#### API Changes

* Added Drivers::getAllDrivers which returns an unfiltered list of registered drivers. Drivers::getDrivers still filters out by availability.

* Added "setDriver(DriverInterface $driver)" and "setKey($key, $namespace = null)" functions to the Item Interface. These functions are used by Pool to initialize the Item class.

* Added "setNamespace($namespace = null)" and "getNamespace()" functions to the Pool class for.

* Added "getCreation()" and "getExpiration()" functions to the Item class.

* Added internal function Utilities::checkFileSystemPermissions.


## Stash v0.11 Changelog

### 0.11.6

* FileSystem compatibility fix for the new OpCache system in later versions of PHP.


### 0.11.5

* Fixed a bug where OSX would be identified as Windows and path names were limited to that system's length.

* Fixed a bug in the Pool class where setItemClass would throw an exception.


### 0.11.4

* Introduced HHVM testing capabilities into the test suite.

* Removed HHVM specific fatal errors.



### 0.11.3

* Fixed potential key collision with Ephemeral driver.


### 0.11.2

* Fixed Bug which prevented some file based caches from purging or flushing on Windows based systems.
Expand Down
4 changes: 4 additions & 0 deletions src/Stash/Interfaces/ItemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ public function extend($ttl = null);
public function isDisabled();

public function setLogger($logger);

public function getCreation();

public function getExpiration();
}
4 changes: 2 additions & 2 deletions src/Stash/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,11 @@ protected function validateRecord($validation, &$record)
}

/**
* Returns the record's createdOn timestamp or null if no createdOn timestamp is set
* Returns the record's createdOn timestamp or null if no creation timestamp is set
*
* @return int timestamp
*/
public function getCreatedOn()
public function getCreation()
{
$record = $this->getRecord();
if (!isset($record['data']['createdOn'])) {
Expand Down
8 changes: 4 additions & 4 deletions tests/Stash/Test/AbstractItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,22 +263,22 @@ public function testSetWithDateTime()

}

public function testGetCreatedOn()
public function testGetCreation()
{

$expiration = new \DateTime('now');
$expiration->add(new \DateInterval('PT10S')); // expire 10 seconds after createdOn
$expirationTS = $expiration->getTimestamp();

$key = array('getCreatedOn', 'test');
$key = array('getCreation', 'test');
$stash = $this->testConstruct($key);

$this->assertNull($stash->getCreatedOn(), 'no record exists yet, return null');
$this->assertNull($stash->getCreation(), 'no record exists yet, return null');

$stash->set(array('stuff'), $expiration);

$stash = $this->testConstruct($key);
$createdOn = $stash->getCreatedOn();
$createdOn = $stash->getCreation();
$this->assertEquals($expirationTS - 10, $createdOn, 'createdOn is 10 seconds before expiration');

}
Expand Down