You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor test directory structure and enhance key generation command
- Renamed test directory from `Tests` to `tests` for consistency.
- Updated references in `.php-cs-fixer.dist.php`, `composer.json`, and `phpunit.xml.dist` to reflect the new directory name.
- Enhanced `doctrine:encrypt:generate-secret-key` command to support generating keys for all configs or a specific config with confirmation for overwriting existing keys.
- Updated documentation in `COMMANDS.md` to clarify command usage and behavior.
- Added new functional tests for encryption behavior and key generation scenarios.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ Key files: one per config, e.g. `.Halite.personal_data.key`, `.Defuse.financial_
88
88
.Defuse.*.key
89
89
```
90
90
91
-
Generate the default key: `php bin/console doctrine:encrypt:generate-secret-key`(Halite only). See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) and [docs/COMMANDS.md](docs/COMMANDS.md).
91
+
Generate keys: `php bin/console doctrine:encrypt:generate-secret-key`(creates missing Halite/Defuse keys for all configs, or pass a config alias). See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) and [docs/COMMANDS.md](docs/COMMANDS.md).
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
21
22
22
---
23
23
24
+
## [2.0.5] - 2026-02-20
25
+
26
+
### Added
27
+
28
+
-**doctrine:encrypt:generate-secret-key:** Optional argument `config` to generate the key for a single config; when the key file already exists, the command asks for confirmation before overwriting. Without argument, the command now checks all configs (all `secret_directory_path` entries) and creates a missing key file for each Halite or Defuse config; configs that already have a key are skipped with a message.
29
+
-**Makefile:** Targets `validate` (runs `composer validate --strict`) and `update` (runs `composer update`); `make qa` now runs `validate` before cs-check and test.
30
+
31
+
### Changed
32
+
33
+
-**Test directory:** The test directory has been renamed from `Tests` to `tests` (lowercase). PHP namespaces remain `Nowo\DoctrineEncryptBundle\Tests\`; only the folder and references in `phpunit.xml.dist`, `composer.json` (autoload-dev), and `.php-cs-fixer.dist.php` changed.
34
+
-**symfony/var-exporter:** Kept in `require` (not only in require-dev) so that Doctrine ORM 3.x LazyGhost is available in all environments (CI and production when using lazy loading). This fixes functional test failures on PHP 8.4/8.5 with Symfony 8.0 ("Symfony LazyGhost is not available").
35
+
-**CI:** Install step pins `symfony/var-exporter:^7.4` so Doctrine ORM accepts the installed version for LazyGhost; coverage job also requires `symfony/var-exporter`.
36
+
-**Documentation:**[COMMANDS.md](docs/COMMANDS.md) updated: encrypt/decrypt database commands use argument `config` (config alias); generate-secret-key documents the new behaviour (all configs vs single config with confirmation).
37
+
38
+
No upgrade steps required from 2.0.4. See [UPGRADING.md](UPGRADING.md#upgrading-to-205).
Generate a new secret key file for the configured encryptor:
73
+
Generates encryption key files for Halite and Defuse configs.
74
+
75
+
**Without argument:** Checks all configs; creates a key file in each `secret_directory_path` when missing (Halite and Defuse only). Skips configs that already have a key file.
Run this before first use if no key file exists, or when rotating keys.
81
+
**With config argument:** Creates or overwrites the key for that config only. If the key file already exists, the command asks for confirmation before overwriting.
Run this before first use if no key file exists, or when rotating keys. Configs using a custom encryptor class are skipped (only Halite and Defuse keys are generated).
79
89
80
90
For a full **key rotation** procedure (backup → decrypt → change keys → re-encrypt), see [Key rotation](KEY_ROTATION.md).
Copy file name to clipboardExpand all lines: docs/RELEASE.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,13 @@
32
32
33
33
---
34
34
35
+
## v2.0.5 (2026-02-20)
36
+
37
+
-**Scope:** (1) GenerateSecretKeyCommand: support all configs (create missing Halite/Defuse keys); optional `config` argument with overwrite confirmation. (2) Rename test directory `Tests` → `tests`; update phpunit, composer autoload-dev, php-cs-fixer. (3) Keep symfony/var-exporter in require for LazyGhost; CI pin var-exporter ^7.4. (4) Makefile: validate and update targets; qa runs validate. (5) Docs: COMMANDS.md correct args (config) and generate-secret-key behaviour.
38
+
-**Checklist:** CHANGELOG and UPGRADING updated; tag `v2.0.5` created and pushed.
39
+
40
+
---
41
+
35
42
## v2.0.4 (2026-02-19)
36
43
37
44
-**Scope:** (1) Fix PHPUnit unit tests (EncryptUtil, DecryptExtension) so they no longer mock the final class `EncryptorRegistry`; use real registry with mocked `EncryptorInterface` instead. Fixes test-coverage errors with PHPUnit 10/11. (2) Make `doctrine:encrypt:database` and `doctrine:decrypt:database` command `configure()` idempotent so arguments are only added when not already present; avoids "An argument with name config already exists" with Symfony Console 7/8.
Copy file name to clipboardExpand all lines: docs/UPGRADING.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,19 @@ This guide explains how to upgrade the Doctrine Encrypt Bundle between versions.
29
29
30
30
---
31
31
32
+
## Upgrading to 2.0.5
33
+
34
+
No breaking changes. Update as usual:
35
+
36
+
```bash
37
+
composer update nowo-tech/doctrine-encrypt-bundle
38
+
php bin/console cache:clear
39
+
```
40
+
41
+
If you run the test suite from the bundle source, ensure your autoload and PHPUnit config use the `tests/` directory (lowercase); the package already ships with this layout.
0 commit comments