Download the PHP package wavevision/di-service-annotation without Composer
On this page you can find all versions of the php package wavevision/di-service-annotation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download wavevision/di-service-annotation
More information about wavevision/di-service-annotation
Files in wavevision/di-service-annotation
Download wavevision/di-service-annotation
More information about wavevision/di-service-annotation
Files in wavevision/di-service-annotation
Vendor wavevision
Package di-service-annotation
Short Description Register DI services using annotation for Nette Framework.
License MIT
Package di-service-annotation
Short Description Register DI services using annotation for Nette Framework.
License MIT
Please rate this library. Is it a good library?
Informations about the package di-service-annotation
DIService Annotation
Helper for registering Nette DI services via Doctrine Annotations, factory generator and inject generator.
Install
Note: Install phpstan-nette if you need support for strict return types.
Usage
Annotate your service
Create runner script
For example bin/extract-services.php
Running this script with php bin/extract-services.php
will generate from class following:
- factory
- inject
- neon config
Annotation options
enableInject: bool
– will addinject: on
to generated service config (defaulttrue
)generateComponent: bool
– will generate<className>Component
trait, with factory andcreateComponent<ClassName>
implementedgenerateFactory: bool
– will generate<ClassName>Factory
interface withcreate
functiongenerateInject: bool
– will generateInject<ClassName>
trait with property$<className>
andinject<ClassName>
function implementedparams: string[]
– list of DI parameters to be passed to service constructortags: string[]
– list of tags to be used with the service in generated config
For configuration options see Configuration properties.
Configuration option
Required
sourceDirectory: string
– location of servicesoutputFile: string
– output file for registered services
Optional
setMask: string
– mask for file locator - default*.php
-
setFileMapping: array
– map for splitting configs by namespace setInjectGenerator: Inject
– set custom generator for injectssetFactoryGenerator: Factory
– set custom generator for factoriessetComponentFactory: Component
– set custom generator for componentssetRegenerate: bool
– regenerate all generated code each run - defaultfalse
enableFileValidation
– check each file for fatal errors before reading annotation, skip file on errorautoloadFile: string
– file for class autoloading, e.g.vendor/autoload.php
tempDir: string
– enable cache, directory for cache file, only changed files are validated
All versions of di-service-annotation with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.4
doctrine/annotations Version ^1.8
nette/finder Version ^2.5
wavevision/utils Version ^2.13
doctrine/annotations Version ^1.8
nette/finder Version ^2.5
wavevision/utils Version ^2.13
The package wavevision/di-service-annotation contains the following files
Loading the files please wait ....