Bundle for implementing Hackzilla/password-generator in Symfony.
Simple multilingual bundle to add to any project. Available languages (Pull Requests welcome):
- Bulgarian
- English
- French
- PHP >= 8.2 (Symfony 8 requires PHP >= 8.4)
- hackzilla/password-generator ^1.3.0
- Symfony ^7.0|^8.0
| Password Generator Bundle | Symfony | PHP |
|---|---|---|
| 7.x | ^7.0 | ^8.0 | >=8.2* |
| 6.x | ^6.0 | ^7.0 | >=8.0.2* |
| 5.x | ^4.0 | ^5.0 | ^6.0 | >=7.1* |
| 4.x | ^3.0 | ^4.0 | ^5.0 | >=7.1* |
| 3.x | ^3.0 | ^4.0 | >=7.1 |
| 2.x | ^2.7 | ^3.0 | >=5.5 |
| 1.x | ^2.3 | >=5.3 |
- Symfony 5.0 requires PHP v7.2+
- Symfony 6.0 requires PHP v8.0.2+
- Symfony 7.0 requires PHP v8.2+
- Symfony 8.0 requires PHP v8.4+
To use Symfony 6 or earlier, install the matching earlier bundle major from this table. The 7.x bundle continues to support Symfony 7 and 8.
Add HackzillaPasswordGeneratorBundle in your composer.json:
{
"require": {
"hackzilla/password-generator-bundle": "^7.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 require hackzilla/password-generator-bundleComposer will install the bundle into your project's vendor/hackzilla directory.
Enable the bundle in the kernel:
<?php
// app/AppKernel.php or config/bundles.php
public function registerBundles()
{
$bundles = array(
// ...
new Hackzilla\Bundle\PasswordGeneratorBundle\HackzillaPasswordGeneratorBundle(),
);
}// app/config/config.yml
parameters:
locale: en
framework:
#esi: ~
translator: { fallbacks: ["%locale%"] }Version 7 drops support for Symfony 6 and requires PHP >=8.2. Stay on bundle 6.x for Symfony 6.
Version 6 drops support for Symfony 4 and 5 and requires PHP >=8.0.2.
Version 5 release just drops support for Symfony v3.
Version 4 release is just a version bump.
Version 3 release is just a version bump.
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).
Run composer update, then make test and make analyse for the active PHP version.
With Docker running, make test-matrix checks PHP 8.2–8.6 against Symfony 7.4 and 8.2. To check one combination, run sh scripts/test-php-matrix.sh 8.5:8.2:highest (replace the PHP and Symfony versions as needed). The matrix includes the lowest installable dependencies on PHP 8.2 and Symfony 7.4. Earlier Symfony 7 and 8 releases remain allowed by the package constraint, but Composer currently blocks some of their versions because of security advisories.
I'm open to pull requests for additional languages, features and/or improvements.