-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Backport of the StorageAdapterFactory
to v2
#86
Backport of the StorageAdapterFactory
to v2
#86
Conversation
7bcedf7
to
b6ad68b
Compare
This interface can be used to create storage plugins from either an configuration array (`StoragePluginFactoryInterface::createFromArrayConfiguration`) or directly ( `StoragePluginFactoryInterface::create`). Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This interface can be used to create storage adapters from either an configuration array (`StorageAdapterFactoryInterface::createFromArrayConfiguration`) or directly ( `StorageAdapterFactoryInterface::create`). Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
b6ad68b
to
0cf2e14
Compare
…ctoryInterface` implementations Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
e72099c
to
68770fb
Compare
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…and `StoragePluginFactoryInterface` Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
de9bad7
to
2977430
Compare
'adapter' => 'apc', | ||
]); | ||
/** @var ContainerInterface $container */ | ||
$container = null; // can be any configured PSR-11 container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@froschdesign Should I refer to the Standalone
section to provide a way how the container
could be "retrieved"?
Maybe by adding something like:
> ### Unsure How to Retrieve a Container Instance?
>
> Check out the [installation page](https://docs.laminas.dev/laminas-cache/installation/)
In most scenarios I am working with the laminas-cache
, I have to retrieve a storage from within a factory which already passes the ContainerInterface
.
But for those who are not working in a MVC or Mezzio project, that must not be the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I refer to the
Standalone
section to provide a way how thecontainer
could be "retrieved"?
Stand-alone is correct because the component can be used outside of laminas-mvc or Mezzio based application. The basic usage and all other examples should follow this fact.
The integration in a laminas-mvc, Mezzio or other application must be described under the section "Application Integration". (laminas-mvc controller plugins and similar packages are clear exceptions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I still dont really know how to provide proper examples for the "config-driven" creations of the storage adapters.
Starting with v3.0+, the config-driven approach wont work without having a PSR-11 container with the new StorageAdapterFactoryInterface
configured, e.g. Manual instantiation will ofc still work.
How could I address that properly? I also don't get how an "Application Integration" section might look like.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@froschdesign I'll go for this now and if we can improve documentation, I think we can do this in an additional PR/Release. In v3, we have to adjust the |
StorageAdapterFactory
to v2
Description
This is a backport of #49 to provide forward compatibility to the 3.0 release of
laminas-cache