Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
* cache tweaks
* docs
* fix(mastodon): type bug
|
|
|
|
serialize() can return output with null bytes and other
non-text data. The prior behavior truncated data
which later results in unserialize() errors.
This happens when e.g. caching an object with a private field
or when caching e.g. a JPEG file (starts with 0xFFD8FFE1)
Fixes errors such as e.g.:
unserialize(): Error at offset 20 of 24 bytes at caches/SQLiteCache.php line 51
|
|
* refactor(cache): extract and encapsulate cache expiration logic
* fix: logic bug in getSimpleHTMLDOMCached
* fix: silly me, index should of course be on the key column
* silly me again, PRIMARY keys get index by default lol
* comment out the delete portion in loadData
* remove a few log statements
* tweak twitter cache timeout
|
|
fixes:
rssbridge.WARNING Trying to access array offset on value of type bool at caches/SQLiteCache.php line 72
|
|
|
|
* refactor(SqliteCache)
* perf(SqliteCache): add index to updated
|
|
* refactor: sqlite cache
* refactor
* feat: add config options to sqlite cache
* refactor
|
|
* fix: proper typehint on setScope
* refactor: type hint setKey()
* typehint
|
|
* fix(CacheInterface): logic bug in getTime
* test
|
|
* refactor
* fix: case-sensitive config from env, fix #2935
* lowercase all config section and keys
* test: add test for case-insensitivity
|
|
* refactor
* fix: bug in previous refactor
* chore: exclude phpcompat sniff due to bug in phpcompat
* fix: do not leak absolute paths
* refactor/fix: batch extensions checking, fix DOS issue
|
|
This fixes a future problem when code is placed under a namespace because `get_class($bridge)` will then return e.g. `RssBridge\Bridge\TwitterBridge` instead of the the current value `TwitterBridge`.
Also a bit refactoring of `Configuration.php`.
|
|
|
|
Reformat code base to PSR12
Co-authored-by: rssbridge <noreply@github.com>
|
|
|
|
The configuration files are currently hard-coded in the configuration
classes and error messages. However, the implementation should not
rely on specific details like the file name. Instead, the files should
be part of the global definition.
This commit introduces two global constants for the configuration files
- FILE_CONFIG => 'config.ini.php'
- FILE_CONFIG_DEFAULT => 'config.default.ini.php'
|
|
- For consistency, functions should always return null on non-existing data.
- WordPressPluginUpdateBridge appears to have used its own cache instance in the past. Obviously not used anymore.
- Since $key can be anything, the cache implementation must ensure to assign the related data reliably; most commonly by serializing and hashing the key in an appropriate way.
- Even though the default path for storage is perfectly fine, some people may want to use a different location. This is an example how a cache implementation is responsible for its requirements.
|
|
Checks if the sqlite3 extension is loaded and throws an error
if it's missing.
|
|
|