More cleanup, update changelog
This commit is contained in:
parent
8c5547d69d
commit
608251452f
@ -3,6 +3,7 @@
|
||||
## Version 5.1
|
||||
* Added session check, so when coming back to a page, if the session is expired, the page will refresh.
|
||||
* Updated logging config so that much fewer, much smaller files are generated.
|
||||
* Updated Kitsu integration to use GraphQL API, reducing a lot of internal complexity.
|
||||
|
||||
## Version 5
|
||||
* Updated PHP requirement to 7.4
|
||||
|
@ -57,7 +57,7 @@ trait CacheTrait {
|
||||
*
|
||||
* @param string $key
|
||||
* @param callable $primer
|
||||
* @param array $primeArgs
|
||||
* @param array|null $primeArgs
|
||||
* @return mixed|null
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@ -78,22 +78,4 @@ trait CacheTrait {
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a hash as a cache key from the current method call
|
||||
*
|
||||
* @param mixed $object
|
||||
* @param string $method
|
||||
* @param array $args
|
||||
* @return string
|
||||
*/
|
||||
public function getHashForMethodCall($object, string $method, array $args = []): string
|
||||
{
|
||||
$keyObj = [
|
||||
'class' => get_class($object),
|
||||
'method' => $method,
|
||||
'args' => $args,
|
||||
];
|
||||
return sha1(json_encode($keyObj));
|
||||
}
|
||||
}
|
@ -33,7 +33,6 @@ final class Kitsu {
|
||||
public const MANGA_HISTORY_LIST_CACHE_KEY = 'kitsu-manga-history-list';
|
||||
|
||||
public const GRAPHQL_ENDPOINT = 'https://kitsu.io/api/graphql';
|
||||
public const JSON_API_ENDPOINT = 'https://kitsu.io/api/edge/';
|
||||
|
||||
public const SECONDS_IN_MINUTE = 60;
|
||||
public const MINUTES_IN_HOUR = 60;
|
||||
|
@ -36,10 +36,4 @@ class CacheTraitTest extends AnimeClientTestCase {
|
||||
$this->testClass->setCache($cachePool);
|
||||
$this->assertEquals($cachePool, $this->testClass->getCache());
|
||||
}
|
||||
|
||||
public function testGetHashForMethodCall()
|
||||
{
|
||||
$hash = $this->testClass->getHashForMethodCall($this, __METHOD__, []);
|
||||
$this->assertEquals('684ba0a5c29ffec452c5f6a07d2eee6932575490', $hash);
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ class RequirementsTest extends AnimeClientTestCase {
|
||||
|
||||
public function testPHPVersion(): void
|
||||
{
|
||||
$this->assertTrue(version_compare(PHP_VERSION, "5.4", "ge"));
|
||||
$this->assertTrue(version_compare(PHP_VERSION, "7.4", "ge"));
|
||||
}
|
||||
|
||||
public function testHasPDO(): void
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user