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

Fix/ttl mode on windows #535

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

zagovorichev
Copy link
Contributor

@zagovorichev zagovorichev commented Oct 1, 2018

The issue on the Windows, when $entry is null and $entry[static::ENTRY_EXPIRATION] is not set.

@codeclimate
Copy link

codeclimate bot commented Oct 1, 2018

Code Climate has analyzed commit d4d7e26 and detected 0 issues on this pull request.

View more on Code Climate.

if ($entry != false && $this->isTtlMode()) {
$entry = (is_null($entry[static::ENTRY_EXPIRATION]) || $entry[static::ENTRY_EXPIRATION] > $this->getTime())

if ($entry !== false && $this->isTtlMode()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
if ($entry !== false && $this->isTtlMode()) {
if ($entry !== false && $this->isTtlMode()) {

@jbout Please, confirm that I can change this behavior: before it worked like this: when file has return null - driver return null as a result, but now in such situation it returns 'false'

Copy link
Contributor

Choose a reason for hiding this comment

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

if ttlMode is true, no file should ever return "null", it should still always return an array with the expiry and the value

@zagovorichev
Copy link
Contributor Author

@jbout I've added unit tests, check this, please

@jbout
Copy link
Contributor

jbout commented Oct 22, 2018

Can you please link the ticket, or describe the issue it is fixing?

* @author Alexander Zagovorichev <zagovorichev@1pt.com>
*/

class PhpFileDriverTest extends PHPUnit_Framework_TestCase
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a namespace to prevent collisions, and this test should work even if tao is not installed, could you consider it a unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I can consider it is a unit test and this test will work even if tao is not installed. You don't like that I read real files?

@zagovorichev
Copy link
Contributor Author

@jbout Could you check this PR, please?

@zagovorichev zagovorichev requested a review from jbout March 11, 2019 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants