Skip to content

Commit 91a66de

Browse files
committed
SQLiteJournal, SQLiteStorage: path parameter in constructor is required (BC break)
1 parent 04d2b7b commit 91a66de

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

src/Caching/Storages/SQLiteJournal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SQLiteJournal extends Nette\Object implements IJournal
2323
/**
2424
* @param string
2525
*/
26-
public function __construct($path = ':memory:')
26+
public function __construct($path)
2727
{
2828
if (!extension_loaded('pdo_sqlite')) {
2929
throw new Nette\NotSupportedException('SQLiteJournal requires PHP extension pdo_sqlite which is not loaded.');

src/Caching/Storages/SQLiteStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SQLiteStorage extends Nette\Object implements Nette\Caching\IStorage
2020
private $pdo;
2121

2222

23-
public function __construct($path = ':memory:')
23+
public function __construct($path)
2424
{
2525
$this->pdo = new \PDO('sqlite:' . $path);
2626
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);

tests/Caching/SQLiteStorage.basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (!extension_loaded('pdo_sqlite')) {
2121
$key = [1, TRUE];
2222
$value = range("\x00", "\xFF");
2323

24-
$cache = new Cache(new SQLiteStorage);
24+
$cache = new Cache(new SQLiteStorage(':memory:'));
2525

2626
Assert::null($cache->load($key));
2727

tests/Caching/SQLiteStorage.expiration.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (!extension_loaded('pdo_sqlite')) {
2020
$key = 'nette';
2121
$value = 'rulez';
2222

23-
$cache = new Cache(new SQLiteStorage);
23+
$cache = new Cache(new SQLiteStorage(':memory:'));
2424

2525

2626
// Writing cache...

tests/Caching/SQLiteStorage.sliding.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (!extension_loaded('pdo_sqlite')) {
2020
$key = 'nette';
2121
$value = 'rulez';
2222

23-
$cache = new Cache(new SQLiteStorage);
23+
$cache = new Cache(new SQLiteStorage(':memory:'));
2424

2525

2626
// Writing cache...

tests/Caching/SQLiteStorage.tags.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (!extension_loaded('pdo_sqlite')) {
1717
}
1818

1919

20-
$cache = new Cache(new SQLiteStorage);
20+
$cache = new Cache(new SQLiteStorage(':memory:'));
2121

2222

2323
// Writing cache...

tests/Caching/bugs/SQLiteJournal.tooManyVariables.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (!extension_loaded('pdo_sqlite')) {
1717
}
1818

1919

20-
$journal = new SQLiteJournal;
20+
$journal = new SQLiteJournal(':memory:');
2121

2222
// Writing cache...
2323
$keys = [];

0 commit comments

Comments
 (0)