Download the PHP package simplikocz/di-service-annotation without Composer
On this page you can find all versions of the php package simplikocz/di-service-annotation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download simplikocz/di-service-annotation
More information about simplikocz/di-service-annotation
Files in simplikocz/di-service-annotation
Download simplikocz/di-service-annotation
More information about simplikocz/di-service-annotation
Files in simplikocz/di-service-annotation
Vendor simplikocz
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: onto generated service config (defaulttrue)generateComponent: bool– will generate<className>Componenttrait, with factory andcreateComponent<ClassName>implementedgenerateFactory: bool– will generate<ClassName>Factoryinterface withcreatefunctiongenerateInject: 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 - defaultfalseenableFileValidation– check each file for fatal errors before reading annotation, skip file on errorautoloadFile: string– file for class autoloading, e.g.vendor/autoload.phptempDir: 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
^8.4
doctrine/annotations Version ^2.0
nette/finder Version ^3.0
wavevision/utils Version ^3.0
doctrine/annotations Version ^2.0
nette/finder Version ^3.0
wavevision/utils Version ^3.0
The package simplikocz/di-service-annotation contains the following files
Loading the files please wait ...
