Skip to content

juliusstoerrle/password-generator-bundle

 
 

Repository files navigation

Password Generator Bundle

Bundle for implementing Hackzilla/password-generator in Symfony.

Simple multilingual bundle to add to any project. Available languages (Pull Requests welcome):

  • English
  • French

Build Status SensioLabsInsight

Requirements

Version Matrix

Password Generator Bundle Symfony PHP
2.x (master) ^2.7|^3.0 >=5.5
1.x ^2.3 >=5.3

Installation

Add HackzillaPasswordGeneratorBundle in your composer.json:

{
    "require": {
        "hackzilla/password-generator-bundle": "^2.0.0"
    }
}

Install Composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Now tell composer to download the library by running the command:

$ composer update hackzilla/password-generator

Composer will install the bundle into your project's vendor/hackzilla directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Hackzilla\Bundle\PasswordGeneratorBundle\HackzillaPasswordGeneratorBundle(),
    );
}

Step 3: Enable Translations

// app/config/config.yml

parameters:
    locale: en

framework:
    #esi:             ~
    translator:      { fallbacks: ["%locale%"] }

Migrating from v1

Migration should be straight forward, as much of the changes are related to Symfony v3

  • Upgrade to at least PHP 5.5
  • Reference Types by Fully Qualified Class Name (FQCN) (>= Symfony 2.8)
  • FormTypes use getBlockPrefix, rather than getName
  • OptionType is now a service
  • CamelCased services are now lowercase with separator (e.g. hackzilla.password_generator.human.maxWordLength changed to hackzilla.password_generator.human.max_word_length)
  • Removed previously deprecated service (hackzilla.password_generator).

Example Implementation

See Password generator app

Pull Requests

I'm open to pull requests for additional languages, features and/or improvements.

About

Integrates Password Generator Library with Symfony2

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 87.1%
  • HTML 12.3%
  • Makefile 0.6%