Comments (7)
This is only currently possible by running through the instantiation of all services once, in a warmup script.
Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment)
from laminas-servicemanager.
So I need to write this script or it exists somewhere?
Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment)
from laminas-servicemanager.
You'll need to write a script, yup.
I think its contents would be something like array_walk([$serviceManager, 'get'], $serviceManager->getDefinedServices())
or similar
On Thu, 14 Feb 2019, 09:55 Witold Wasiczko <[email protected] wrote:
So I need to write this script or it exists somewhere?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
zendframework/zend-servicemanager#278 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakJdt0x1GZA58nvHJgPTLHbTvdJoWks5vNSSSgaJpZM4a7FkL
.
Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment)
from laminas-servicemanager.
Or:
public function warmup(): void
{
foreach ($this->services as $service) {
$this->container->get($service);
}
}
where services
is lazy_services.class_map
keys.
Anyway ready script in package will be nice addon
Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment)
from laminas-servicemanager.
Don't think we should expand the API for an edge case, and adding a script
also requires knowing which instance of the ServiceManager you are
referring to.
In a zendframework/zend-mvc context, that may be any of the plugin
containers, for example.
On Thu, 14 Feb 2019, 10:06 Witold Wasiczko <[email protected] wrote:
Or:
public function warmup(): void { foreach ($this->services as $service) { $this->container->get($service); } }
where services' is lazy_services.class_map` keys.
Anyway ready script in package will be nice addon
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
zendframework/zend-servicemanager#278 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakCtLHTLTFvUbctEJEk7djF75cLz_ks5vNSb7gaJpZM4a7FkL
.
Originally posted by @Ocramius at zendframework/zend-servicemanager#278 (comment)
from laminas-servicemanager.
Or zf module ;)
Originally posted by @snapshotpl at zendframework/zend-servicemanager#278 (comment)
from laminas-servicemanager.
Closing, I feel this was solved in the original issue.
from laminas-servicemanager.
Related Issues (20)
- DI-like PHP Attributes (Autowiring feature) HOT 3
- Feature: ServiceManager configuration validation HOT 12
- Plugin manager does not allow callable as extended template parameter HOT 4
- psr/container v2 breaks other components HOT 6
- This is not working with ext-psr HOT 1
- Allow PHPStan to understand conditional return types with generics HOT 5
- Check that aliases work for every ServiceManager feature HOT 3
- Second param of `ServiceManager::setFactory` doesn't accept a `class-string` of a callable class HOT 7
- Regression in type inference of `@psalm-type ServiceManagerConfiguration` on `ServiceManager`? HOT 4
- [RFC]: Delegator factories for alias and service name HOT 8
- AOT factory creation CLI command for `ReflectionBasedAbstractFactory` mapped factories HOT 4
- Convert commands to laminas-cli symfony commands HOT 1
- Mark `ServiceManager` as `final` and change `AbstractPluginManager` to use composition over inheritance HOT 2
- Document new CLI commands and remove old documentation HOT 1
- Create migration guide for version 4 HOT 2
- Remove `AbstractPluginManager#validate` HOT 17
- Extract proxy functionality to dedicated servicemanager satellite
- Changes to AbstractFactoryInterface are breaking other components HOT 4
- Release blocker 3.21.1 HOT 1
- Release blocker 3.22.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laminas-servicemanager.