Skip to content

Session entity specific flushes #13

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

Open
wants to merge 4 commits into
base: 1.4.x
Choose a base branch
from
Open
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
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@
"require": {
"php": ">=5.3",
"doctrine/orm": "2.*",
"zendframework/zendframework1" : ">=1.11.11"
"zendframework/zendframework1" : "*"
},

"autoload": {
"psr-0": {
"doctrine/doctrine2" : "lib/",
"zendframework/zendframework1" : "library/",
"Pike_" : "lib/"
}
},
Expand Down
29 changes: 0 additions & 29 deletions composer.lock

This file was deleted.

8 changes: 4 additions & 4 deletions lib/Pike/Session/SaveHandler/Doctrine.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function read($id)
$return = $entity->getData();
} else {
self::$em->remove($entity);
self::$em->flush();
self::$em->flush($entity);
}
}

Expand All @@ -186,7 +186,7 @@ public function write($id, $data)
$entity->setModified(new DateTime('now'));

self::$em->persist($entity);
self::$em->flush();
self::$em->flush($entity);

return true;
}
Expand All @@ -203,7 +203,7 @@ public function destroy($id)

if ($entity instanceof Pike_Session_Entity_Interface) {
self::$em->remove($entity);
self::$em->flush();
self::$em->flush($entity);

return true;
}
Expand Down Expand Up @@ -232,4 +232,4 @@ public function gc($maxlifetime)

return true;
}
}
}