-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Using a Filesystem cache storage adapter results in an exception #10
Labels
Comments
the following works for me: try installing zend-serializer and this configuration (i use a global config file for i18n in order to have language files inside a return [
//...
'translator' => [
//..
'cache' => [
'adapter' => [
'name' => 'filesystem',
'options' => [
'cache_dir' => getcwd() . '/data/cache',
'ttl' => 3600,
],
],
'plugins' => [
'serializer',
'exception_handler' => [
'throw_exceptions' => false,
],
],
],
]; kind regards, Originally posted by @pine3ree at zendframework/zend-i18n#44 (comment) |
froschdesign
added a commit
to froschdesign/laminas-i18n
that referenced
this issue
May 18, 2024
Fixes laminas#10 Signed-off-by: Frank Brückner <[email protected]>
froschdesign
added a commit
to froschdesign/laminas-i18n
that referenced
this issue
May 18, 2024
Fixes laminas#10 Signed-off-by: Frank Brückner <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Switching to another adapter (like
memory
) works fine, looks like this happens becauseFilesystem
doesn’t do any serialization, just:I’m not sure if
Translator
should serialize theTextDomain
object before storing it, or if this is more a bug in the cache adapter. Perhaps we should check whether the cache can indeed store objects by using$cache->getCapabilities()
, and serialize it if not?Originally posted by @kinglozzer at zendframework/zend-i18n#44
The text was updated successfully, but these errors were encountered: