isaac / gazesymfonybundle
Symfony Bundle for Gaze
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: ~7.3.0||~7.4.0||~8.0.0
- isaac/gaze-publisher: ^0.2.0
- symfony/dependency-injection: ^4.4|^5.0
- symfony/framework-bundle: ^4.4|^5.0
- symfony/security-core: ^4.4|^5.0
Requires (Dev)
- isaac/php-code-sniffer-standard: ^21.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^0.12.88
- phpstan/phpstan-strict-rules: ^0.12.9
- phpstan/phpstan-symfony: ^0.12.35
This package is auto-updated.
Last update: 2024-05-24 05:48:07 UTC
README
This Symfony bundle can be used to integrate Gaze easily in an Symfony application.
Install
Install using composer:
composer require isaac/gazesymfonybundle
Adding configuration files
You only need to do these step if you are not using Symfony Flex.
Create the file config/routes/isaac_gaze_symfony.yaml
with the following content: (This will register the TokenController
of the bundle with the Symfony application)
isaac_gaze_symfony: resource: '@ISAACGazeSymfonyBundle/config/routing.xml' prefix: /gaze
Create the file config/packages/isaac_gaze_symfony.yaml
with the following content: (This will specify the configuration for this bundle)
isaac_gaze_symfony: publisher: gazehub_url: '%env(GAZEHUB_URL)%' private_key_content: '%env(GAZE_PRIVATE_KEY_CONTENTS)%'
Now follow the steps in 'Configure with Symfony Flex'.
Adding environment variables
In .env
add the following variable:
GAZEHUB_URL="http://localhost:3333"
(Replace http://localhost:3333
with the url to GazeHub)
To store the private key in a safe way inside Symfony use the Symfony Vault. Run the following command to set the private key in a development environment:
bin/console secrets:set GAZE_PRIVATE_KEY_CONTENTS <PATH TO KEY OR KEY CONTENT>
To use another key on production run the following command in the production environment to override the private key:
bin/console secrets:set GAZE_PRIVATE_KEY_CONTENTS <PATH TO KEY OR KEY CONTENT> -e prod bin/console secrets:decrypt-to-local --force --env=prod