atournayre / acceptance-bundle
Acceptance bundle for Symfony 4
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.2.9
Conflicts
This package is auto-updated.
Last update: 2023-11-28 22:05:54 UTC
README
The acceptance bundle helps managing software acceptance.
What this bundle for ?
Use this bundle to activate environment for a given period.
Sometimes, you want your customer to have acces to acceptance environment only for 3 or 7 days.
Getting Started
$ composer require atournayre/acceptance-bundle
Configuring
Enable the bundle
# config/bundles.php return [ // ... Atournayre\AcceptanceBundle\AtournayreAcceptanceBundle::class => ['all' => true], // ... ];
Using parameters.yml ?
# app/config/parameters.yml parameters: atournayre_acceptance.is_enabled: true # true to enable / false to disable atournayre_acceptance.start_date_time: "2021-01-01 00:00:00" # 2021-01-01 is also valid atournayre_acceptance.end_date_time: "2021-01-02 00:00:00" # 2021-01-02 is also valid
Using .env ?
# .env / .env.local.php return array ( // ... // ACCEPTANCE_IS_ENABLED : true / false 'ACCEPTANCE_IS_ENABLED' => true, // ACCEPTANCE_START_DATETIME : "2021-03-25 00:00:00" / "2021-03-25" 'ACCEPTANCE_START_DATETIME' => "2021-03-25 00:00:00", // ACCEPTANCE_END_DATETIME : "2021-03-25 00:00:00" / "2021-03-25" 'ACCEPTANCE_END_DATETIME' => "2021-02-29 23:59:59", // ... );
# config/services.yaml parameters: atournayre_acceptance.is_enabled: '%env(ACCEPTANCE_IS_ENABLED)%' atournayre_acceptance.start_date_time: '%env(ACCEPTANCE_START_DATETIME)%' atournayre_acceptance.end_date_time: '%env(ACCEPTANCE_END_DATETIME)%'
Production
In production, simply disable the bundle.
Using parameters.yml ?
# app/config/parameters.yml parameters: atournayre_acceptance.is_enabled: false
Using .env ?
# .env / .env.local.php return array ( // ... 'ACCEPTANCE_IS_ENABLED' => false, // ... );
# config/services.yaml parameters: atournayre_acceptance.is_enabled: '%env(ACCEPTANCE_IS_ENABLED)%'
Overriding templates
Using Symfony 4.4.* ?
$ mkdir -p templates/bundles/AtournayreAcceptanceBundle
$ cp -r vendor/atournayre/acceptance-bundle/Resources/views/. templates/bundles/AtournayreAcceptanceBundle
Templates are now ready for customization!