mindlahus / symfony-assets
A list of PHP classes that will help you develop fast & easy various APIs.
Requires
- php: ^7.1
- auth0/jwt-auth-bundle: ^3.0
- avramcosmin/forceutf8: ^2.0
- doctrine/doctrine-bundle: ^1.7
- doctrine/doctrine-cache-bundle: ^1.3
- doctrine/orm: ^2.5
- erusev/parsedown-extra: ^0.7
- friendsofsymfony/rest-bundle: ^2.2
- gedmo/doctrine-extensions: ^2.4
- jms/serializer-bundle: ^2.2
- phpseclib/phpseclib: ^2.0
- stof/doctrine-extensions-bundle: ^1.2
- symfony/monolog-bundle: ^3.1
- symfony/symfony: ^3.3
Requires (Dev)
- mockery/mockery: ^1.0
- sensio/generator-bundle: ^3.1
- symfony/phpunit-bridge: ^3.3
- dev-master
- 3.2.5
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.28
- 3.0.27
- 3.0.26
- 3.0.25
- 3.0.24
- 3.0.23
- 3.0.22
- 3.0.21
- 3.0.20
- 3.0.18
- 3.0.17
- 3.0.16
- 3.0.15
- 3.0.14
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.1
- 2.0.0
- 1.1.28
- 1.1.27
- 1.1.26
- 1.1.25
- 1.1.24
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.45
- 1.0.44
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2019-11-29 19:48:22 UTC
README
A list of PHP classes that will help you develop fast & easy various API's.
You are strongly encouraged to install nelmio/cors-bundle
.
composer require nelmio/cors-bundle
Symfony services
Simfony Assets
provides multiple services. Here is the list of all available services:
- Download Service.
- Database Export Service.
- Exception Listener.
Just add the following lines inside app/config/services.yml
:
mindlahus.v4.download_service: class: Mindlahus\SymfonyAssets\Service\DownloadService arguments: ["@service_container"] mindlahus.v4.database_export_service: class: Mindlahus\SymfonyAssets\Service\DatabaseExportService arguments: ["@service_container"] mindlahus.v4.exception_listener: class: Mindlahus\SymfonyAssets\EventListener\ExceptionListener tags: - { name: kernel.event_listener, event: kernel.exception, method: onKernelException } auth0.v4.jwt_auth_bundle: class: Mindlahus\SymfonyAssets\Security\A0UserProvider arguments: ["@jwt_auth.auth0_service", '%jwt_auth.domain%']
Integrating gedmo/doctrine-extensions
The easiest way of connecting this to your app is by simple copy/paste. See src/Resources/config/doctrine_extensions.yml
.
gedmo.listener.timestampable: class: Gedmo\Timestampable\TimestampableListener tags: - { name: doctrine.event_subscriber, connection: default } calls: - [ setAnnotationReader, [ "@annotation_reader" ] ] gedmo.listener.blameable: class: Gedmo\Blameable\BlameableListener tags: - { name: doctrine.event_subscriber, connection: default } calls: - [ setAnnotationReader, [ "@annotation_reader" ] ]
In case you use Auth0
and still want to make use of blameable
a solution is to using the DoctrineExtensionListener
.
This will help you connect your local User
to the user profile
made available by Auth0
after login.
To connect the listener to your app, just copy/paste
the following snippet.
mindlahus.v4.doctrine_extension_listener: class: Mindlahus\SymfonyAssets\Listener\DoctrineExtensionListener calls: - [ setContainer, [ "@service_container" ] ] - [ setUserRepository, [ "AppBundle:User" ] ] tags: # loggable hooks user username if one is in security context - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }
Monolog configuration
monolog: channels: [onew] handlers: onew: # log all messages (since debug is the lowest level) level: debug type: stream path: '%kernel.logs_dir%/onew.log' channels: [onew]