From ab38bf3c40e70ef3f4e2a07992ec1d08b436e162 Mon Sep 17 00:00:00 2001 From: Jano Paetzold Date: Thu, 30 Jul 2026 16:28:42 +0200 Subject: [PATCH 1/2] Correct outdated information in README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1b32fa6..60ad605 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Implement all `src/Entity/*Interface.php` in your project. The easiest way, if y to copy the templates: mkdir src/AppBundle/Newsletter - cp vendor/webfactory/newsletter-registration-bundle/app-class-templates/* src/AppBundle/Newsletter/* + cp vendor/webfactory/newsletter-registration-bundle/Resources/app-class-templates/* src/AppBundle/Newsletter/ If you want to implement the interfaces by yourself, extend the corresponding abstract classes and add `#[ORM\Entity(repositoryClass: MyRepo::class)]` (and any desired `#[ORM\Table(...)]` constraints) on your concrete @@ -77,7 +77,7 @@ doctrine: default: mappings: NewsletterRegistrationBundle: - type: annotation + type: attribute prefix: AppBundle\Newsletter\Entity\ dir: "%kernel.root_dir%/AppBundle/Newsletter/Entity/" is_bundle: false @@ -105,8 +105,8 @@ Include the RegistrationController in your routing: newsletter: prefix: /newsletter - type: annotation - resource: '@WebfactoryNewsletterRegistrationBundle/Controller/RegistrationController.php' + type: attribute + resource: '@WebfactoryNewsletterRegistrationBundle/src/Controller.php' ``` The RegistrationController gets some Interfaces injected in its constructor. Alias these interfaces with your own From 64d23eb438ca6a6bf03d1552a4f50d2fb0e4de1f Mon Sep 17 00:00:00 2001 From: Jano Paetzold Date: Thu, 30 Jul 2026 17:00:23 +0200 Subject: [PATCH 2/2] Fix incorrect setup instructions in README.md The installation guide contained several errors that would break a fresh setup. The routing resource pointed at `@WebfactoryNewsletterRegistrationBundle/src/Controller.php`, but the bundle class lives in `src/`, so the bundle path already resolves to that directory and the reference expanded to a non-existent `src/src/Controller.php`; it now points at `@WebfactoryNewsletterRegistrationBundle/Controller.php`. The entity classes were referenced under `AppBundle\Entity\*` in the `resolve_target_entities` mapping, the service definitions and the "Adding fields" section, while the shipped templates declare them under `AppBundle\Newsletter\Entity\*`. All references now use the latter namespace consistently, and the template copy target and Doctrine mapping directory (`src/AppBundle/Newsletter/Entity/`) match it as well. Further corrections: `%kernel.root_dir%` (removed after Symfony 4) is replaced by `%kernel.project_dir%`; the `//` labels inside YAML blocks are turned into valid `#` comments; the `bundles.php` path is no longer prefixed with `src/`, which is a project-specific convention rather than a Symfony default; the `RecpientFactoryInterface` typo is corrected to `RecipientFactoryInterface`; and a couple of grammar and naming inconsistencies are cleaned up. Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 60ad605..a884d56 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ To reduce the amount of unwanted emails, the following ideas are implemented: Finally, the bundle tries to be developer friendly: -- Registration can be embedded as a page on it's own as well as a partial view +- Registration can be embedded as a page on its own as well as a partial view - Depending on the number of different newsletters, the registration and edit forms feature a newsletter selection or - no disturbing element (a checkbox for a single newsletter would be silly) + no disturbing element (a checkbox for a single newsletter would be silly) - It's highly customizable due to small interfaces, Doctrine interface mapping and service replacements @@ -33,7 +33,7 @@ Installation composer req webfactory/newsletter-registration-bundle -activate in `src/bundles.php`: +activate in `bundles.php`: ```php