check24 / apitk-common-bundle
Contains classes, interfaces and traits that are shared between check24/apitk-* bundles
Installs: 6 540
Dependents: 4
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 5
Type:symfony-bundle
Requires
- php: ^8.0
- nelmio/api-doc-bundle: ^v4.8
- sensio/framework-extra-bundle: ^6.0
- symfony/config: ^5.3 || ^6.0
- symfony/dependency-injection: ^5.3 || ^6.0
- symfony/framework-bundle: ^5.3 || ^6.0
Requires (Dev)
- captainhook/captainhook: ^5.10.6
- doctrine/doctrine-bundle: >=2.3 <3.0
- doctrine/orm: ^2.6 || ^3.0
- friendsofphp/php-cs-fixer: ^3.4.0
- phpmd/phpmd: ^2.11.1
- phpspec/prophecy-phpunit: ^2.0.1
- phpstan/phpstan: ^1.3.3
- phpstan/phpstan-deprecation-rules: ^1.0
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2024-12-05 01:59:37 UTC
README
Contains classes, interfaces and traits that are shared between apitk-* bundles, mainly:
Installation
Install the package via composer:
composer require check24/apitk-common-bundle
You usually don't have to install it by yourself, because it is only for other apitk-bundles.
Components
Annotation/ParamConverter
Useful traits for your ParamConverter Annotation:
- EntityAwareAnnotationTrait
Addsentity
,entityManager
andmethodName
options - RequestParamAwareAnnotationTrait
AddsrequestParam
option
Describer/AbstractDescriber
Common logic for changing Swagger/OpenAPI annotations via PHP.
ParamConverter
Useful traits for your ParamConverter logic:
ContextAwareParamConverterTrait.php EntityAwareParamConverterTrait.php
- ContextAwareParamConverterTrait
Provides$this->getOption('name', 'default')
convenience methods to access annotation options easily. - EntityAwareParamConverterTrait
AddsgetEntity()
,getEntityManager()
andcallRepositoryMethod()
convenience to access an entity, its appropriate entity manager and repository for the given Annotation options. - RequestParamAwareParamConverterTrait
AddsgetRequestParam()
andgetRequestParamValue()
methods to access a request param given by Annotation options easily. It's also possible to define defaults here.