atournayre/acceptance-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Acceptance bundle for Symfony 4

Maintainers

👁 atournayre

Package info

github.com/atournayre/acceptance-bundle

Type:symfony-bundle

pkg:composer/atournayre/acceptance-bundle

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2021-03-20 15:51 UTC

Requires

  • php: ^7.2.9

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

Replaces

None

MIT 62542167eea00a02f4e33bf7b671ae44c8f9507c

  • Aurélien Tournayre <aurelien.tournayre.woop@gmail.com>

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!