azine / emailupdateconfirmation-bundle
Symfony bundle to require the user to confirm her update email address by clicking on a link sent to the new address. This should be part of the FriendsOfSymfony/UserBundle, but was not accepted as new feature by a maintainer.
Installs: 3 489
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.6.0
- friendsofsymfony/user-bundle: ^2.0
- monolog/monolog: ^1.6,>=1.6.0
- symfony/event-dispatcher: ^2.7|^3.0|^4.0
- symfony/http-foundation: ^2.7|^3.0|^4.0
- symfony/routing: ^2.7|^3.0|^4.0
- symfony/translation: ^2.7|^3.0|^4.0
- symfony/validator: ^2.7|^3.0|^4.0
- symfony/yaml: ^2.7|^3.0|^4.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.2
- phpunit/phpunit: ^5.7.27|^6.0|^7.0
This package is auto-updated.
Last update: 2024-12-05 00:36:11 UTC
README
Symfony bundle which allows to use functionality of email change confirmation based on FOSUserBundle.
Installation
To install AzineEmailUpdateConfirmationBundle with Composer just add the following to your composer.json
file:
// composer.json
{
// ...
require: {
// ...
"azine/emailupdateconfirmation-bundle": "dev-master"
}
}
Then, you can install the new dependencies by running Composer’s update command from
the directory where your composer.json
file is located:
php composer.phar require azine/emailupdateconfirmation-bundle
Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:
<?php // in AppKernel::registerBundles() $bundles = array( // ... new Azine\EmailUpdateConfirmationBundle\AzineEmailUpdateConfirmationBundle(), // ... );
Register the routes of the AzineEmailUpdateConfirmationBundle:
// in app/config/routing.yml azine_email_update_confirmation_bundle: resource: "@AzineEmailUpdateConfirmationBundle/Resources/config/routing.yml"
Configuration options
This is the complete list of configuration options with their defaults.
// app/config/config.yml azine_email_update_confirmation: # enables email update confirmation functionality enabled: true # determines the encryption mode for encryption of email value. openssl_get_cipher_methods(false) is default value. cypher_method: null # mailer service mailer: azine.email_update.mailer # email template file email_template: @AzineEmailUpdateConfirmation/Email/email_update_confirmation.txt.twig # route to redirect after email confirmation redirect_route: fos_user_profile_show # "from" email address for the confirmation email. The default is the same email as configured for the password-reset emails sent by the FOSUserBundle from_email: %fos_user.resetting.email.from_email%
Contribute
Contributions are very welcome. Please fork the repository and issue your pull-request against the master branch.
The PR should:
- contain a description what the PR solves or adds to the bundle (reference existing issues if applicable)
- contain clean code with some iniline documentation and phpdocs, no "pure whitespace" changes.
- respect the Symfony best practices and coding style
- have phpunit tests covering the new feature or fix
- result in a 'green' build for your branch on travis-ci.org before you issue the PR
Code style
You can check the code style with the php-cs-fixer
. Optionally you can set up a pre-commit hook which contains the php-cs-fixer
check. Also see https://github.com/FriendsOfPHP/PHP-CS-Fixer
All you have to do is to move pre-commit.sample
file from commit-hooks/
to .git/hooks/
folder and rename it to pre-commit
.
php-cs-fixer
will check the style of your new added code each time you commit and apply fixes to the commit.
To run php-cs-fixer
manually, install dependencies (composer install
) and execute php vendor/friendsofphp/php-cs-fixer/php-cs-fixer --diff --dry-run -v fix --config=.php_cs.dist .