Skip to content

Releases: symfony/maker-bundle

Out with the bugs - In with the features...

29 Aug 22:50
a3b7f14
Compare
Choose a tag to compare

Howdy Makers!

Aside from squashing a few bugs mentioned below, this releases adds a few improvements such as the ability to generate CRUD without needing to have a trailing / in the index path, reading twig_component.yaml to determine the appropriate namespace (directory structure) when creating Twig Components, matching event names to event classes/id's with make:listener, and improving PHP types with make:registration-form & make:reset-password.

We're also starting to roll out a config based final classes system with all of our make:* commands. In essence, you'll be able to set config values to determine if generated classes should be made final. This release adds the ability to do so with make:voter & make:crud - other makers will soon follow.

# config/packages/maker.yaml
when@dev:
    maker:
        root_namespace: 'App'
        generate_final_classes: true
        generate_final_entities: false

(See symfony/recipes#1315 for the flex recipe)

By default, MakerBundle will generate all non-entity classes with the final PHP keyword. Changing generate_final_classes to false will disable this feature. If you're app has the need to have final entities, setting generate_final_entities to true will allow make:entity to add the final keyword to new entities. For classes & entities, we're using an all or nothing approach.

Enjoy!

v1.61.0

August 29th, 2024

  • #1583 [make:crud] Remove / from from index action URL - @seb-jean
  • #1579 [make:listener] Match event name against active events class/id - @maelanleborgne
  • #1571 [make:twig-component] Improve make:twig-component by reading the configuration file - @shadowc
  • #1549 [make:registration-form] improve generated types for phpstan - @seb-jean
  • #1548 [make:reset-password] improve generated typehints for phpstan - @seb-jean
  • #1539 [make:crud|voter] generate classes with final keyword - @jrushlow

Bug

  • #1584 [make:entity] fix multiple and nullable enums - @Fan2Shrek
  • #1581 [make:reset-password] fix generated test name - @mvhirsch
  • #1573 [make:twig-component] Fix config file in error messages - @smnandre
  • #1550 [make:user] fix getPassword() return type in certain instance with PasswordAuthenticatedUserInterface - @seb-jean

New Contributors

Full Changelog: v1.60.0...v1.61.0

Types, Enums, & Bugs...

10 Jun 06:04
c305a02
Compare
Choose a tag to compare

Howdy Makers!

We've improved type support in the generated templates to help keep static analysis tools happy, make:entity now supports enums, relaxed ASCII character validation for entity names, & much more.

For MakerBundle Dev's:

  • composer tools:upgrade - Upgrade all of the tools/ dependencies.
  • composer tools:run - Run php-cs-fixer, phpstan, & twigcs against the code base.
  • tools:run:php-cs-fixer - Run just php-cs-fixer. Works with phpstan & twigcs as well.

Enjoy!

v1.60.0

June 10th, 2024

Feature

Bug

  • #1496 [make:entity] confirm to allow non-ascii char's in entity names - @Fan2Shrek
  • #1533 make:security:form-login] fix remember me label - @jrushlow
  • #1535 [make:entity] Update ux-turbo package name to have proper suggestion - @nfragnet
  • #1559 [make:entity] fix indentation in broadcast_twig_template.tpl.php - @seb-jean
  • #1569 Fix generated twig file location - @IndraGunawan

New Contributors

Diff: v1.59.1...v1.60.0

Yes, we know make:auth is deprecated, stop yelling...

06 May 04:00
b87b1b2
Compare
Choose a tag to compare

Howdy Makers!

This is a tiny release that fixes the make:auth deprecation logic - the deprecation is only fired when you actually use the make:auth command.

Sorry for the noise! 😉

Enjoy!

v1.59.1

May 5th, 2024

Bug

  • #1532 [make:auth] only fire deprecation when command is called - @eltharin

New Contributors

Diff: v1.59.0...v1.59.1

So long `make:auth`, Hello better security with tests...

27 Apr 21:15
1f02b59
Compare
Choose a tag to compare

Howdy Makers,

One of the most notable changes to this release is the deprecation of make:auth. Almost a year ago, we introduced make:security:form-login in v1.49.0 and in this release we're introducing make:security:custom to speed up making custom security authenticators. These two commands fill the gap that make:auth would leave otherwise.

Along with a handful of other features, make:entity no longer adds any of the @method annotations to the entity class and if you're adding a relation to an entity with the same name as the "parent" entity - maker will help differentiate the two classes in the CLI output.

Aside from fixing the code generated by make:serializer:encoder to match the interface signatures it uses, we've also introduced another new feature:

Experimental

We've added the ability to generate tests that should work out of the box for:

  • make:crud
  • make:registration
  • make:reset-password
  • make:security:form-login

To generate these tests, you can either answer y || yes when the maker asks you "Do you want to generate PHPUnit tests?" Or simply pass --with-tests when calling the command. Review the generated test, customize it to your needs, and finally run php bin/phpunit. More tests for more makers are soon to follow!

Enjoy!

v1.59.0

April 27th, 2024

Feature

  • #1523 [make:auth] deprecate command - @jrushlow
  • #1522 [make:security:custom] create a custom authenticator - @jrushlow
  • #1521 [make:reset-password] improve types for static analysis in userland - @jrushlow
  • #1520 [make:entity] Simplify repository PHPDoc removes method annotations - @lyrixx
  • #1519 [make:registration] use "User" type in EmailVerifier::class - @jrushlow
  • #1518 [make:registration] add bool type to User::isVerified - @jrushlow
  • #1515 [make:security:form-login] add ability to generate tests - @jrushlow
  • #1512 [make:webhook] Rephrase comments to be more explicit + minor improvement of generated code - @maelanleborgne
  • #1511 [make:entity] helper message with two classes having the same name under different namespaces - @jeromegxj
  • #1497 [make:*] add ability to generate tests - @jrushlow

Bug

  • #1525 [make:serializer:encoder] fix interface signature mismatch in template - @jrushlow
  • #1516 [common] add missing class header - @jrushlow

New Contributors

Diff: v1.58.0...v1.59.0

Make Webhooks & Schedules

06 Apr 15:08
c4f8d2c
Compare
Choose a tag to compare

Howdy Makers,

We've added not one, but two, brand spanking new makers to the bundle! make:webhook handles a bit of the grunt work needed to get your app responding to external events using Symfony's Webhook Component. But what about generating that report every Monday at 3am? Don't worry, MakerBundle can handle that too, turn off your alarm clock and type make:schedule to generate a new schedule for Symfony's Scheduler Component .

Both of these components are fairly new - we look forward to hearing your feedback on how we can make either of these maker's better. In the meantime, checkout the docs below for each component.

In other news, make:entity can now handle is'ers and has'ers a bit better. If your entity has a property, say $isPizzaGood, maker will generate public function isPizzaGood() instead of isIsPizzaGood(). And, if your entity happens to have a collection of pizza's - it adds the appropriate DocBlock annotation to the property to aid in static analysis & code completion. E.g.

/** @var Collection<int, Pizza> */
#[ORM\MandToOne(....)
private Collection $pizza;

Enjoy!

v1.58.0

April 6th, 2024

Feature

  • #1502 [make:*] additional type improvements - @jrushlow
  • #1499 [make:*] add docBlock return types for non-internal makers - @jrushlow
  • #1493 [make:entity] managing keyword prefixes (is, has) for boolean properties getters - @ClemRiviere
  • #1491 [make:webhook] Add new command for Symfony's Webhook Component - @maelanleborgne
  • #1487 [make:schedule] a new command for creating recurring Symfony Schedules - @jrushlow
  • #1219 [make:entity] Add PHPDoc var type for Collections - @b1rdex

Bug

  • #1476 [ysm] handle linebreak followed by an immediate root-level comment - @jrushlow

New Contributors

Diff: v1.57.0...v1.58.0

getPayload() with Uid's, better messages, & VerifyEmail improvements

22 Mar 12:00
2c90181
Compare
Choose a tag to compare

Howdy Makers,

Instead of calling $request->request->get(), we're using the new getPayload() method in controller templates, you can generate entities with UUID's || ULID's instead of an int as the id, and we've fixed up a few exception messages to make things a bit more clear. SymfonyCast's VerifyEmailBundle released v1.17.0 recently that introduces a few deprecation's & make:registration was updated to take handle those new features.

Check out the PR's below for more details on the new features. Anywho, back PR Squashing...

v1.57.0

March 22nd, 2024

Feature

  • #1488 [make:*] allow the option to use ULID's for entity id's - @jrushlow
  • #1484 [make:auth] use getString() instead of get() - @seb-jean
  • #1477 [make:message] Modernize Messenger\Message class, use PHP8 features - @lyrixx
  • #1475 [make:user] better exception msg for non-attribute mapping entities - @jrushlow
  • #1474 [make:entity] Prevent entity name from having an accent - @Fan2Shrek
  • #1473 [make:*] use getPayload() instead of accessing request on Request objects - @Fan2Shrek
  • #1464 [make:registration-form] use validateEmailConfirmationFromRequest() when verifying emails - @jrushlow
  • #1329 Add support for generating UUID id fields in entities - @Coffee2CodeNL

Bug

  • #1490 [make:entity] Fix a small typo in a make:entity error message - @maelanleborgne
  • #1486 [make:entity] Fix exception message if mercure bundle not found with --broadcast - @cavasinf

Diff: v1.56.0...v1.57.0

Enjoy!

Prettier Migrations with a plethora of additions

04 Mar 13:37
bbb7949
Compare
Choose a tag to compare

Howdy Makers,

We've added a host of new features focusing around bringing MakerBundle up to snuff with it's peers. In make:user, we're shifting towards using the preferred UniqueConstraint instead of Column(unique: true), make:reset-password ensures the password is not compromised and packs some strength, and you can have your make:migrations nice and tidy by passing --formatted. Check out the changelog for all of the features and fixes that our community has contributed to this release!

v1.56.0

March 4th, 2024

Feature

  • #1465 [make:twig-component] default to "no" when asking if is live component - @jrushlow
  • #1463 [make:serializer:normalizer] stop using CacheableSupportsMethodInterface - @jrushlow
  • #1460 [make:user] handle ORM\Column.unique deprecation - use ORM\UniqueConstrain - @maelanleborgne
  • #1413 [DoctrineHelper] handle property type for custom doctrine type - @IndraGunawan
  • #1405 [make:reset-password] increase password strength & check for comprimised password - @Spomky
  • #1402 [make:entity] remove PasswordUpgraderInterface annotation in phpdoc - @AurelienPillevesse
  • #1393 [make:*] add single_text widget for all date types - @tacman
  • #1345 [make:migration] Format the generated migration sql by passing --formatted to the command - @StevenRenaux
  • #1243 [make:registration] drop guard authentication support - @jrushlow
  • #516 [make:migration] add ability to specify a configuration file - @LeJeanbono

Bug

Diff: v1.55.1...v1.56.0

Enjoy!

Hot Fix for make:entity

21 Feb 13:43
11a9d31
Compare
Choose a tag to compare

Howdy Makers,

A tiny release that moves a conditional in make:entity to it's proper place. Otherwise, an exception was thrown to install Mercure before asking if you wanted to broadcast entity updates. Thanks to @fabgg for bringing this to our attention.

v1.55.1

February 21st, 2024

Bug

  • #1458 - [make:entity] fix require mercure before asking to broadcast entity updates - @jrushlow

Diff: v1.55.0...v1.55.1

Enjoy!

Smashed bugs with a splash of DX

21 Feb 03:38
d344744
Compare
Choose a tag to compare

Howdy Makers!

This release squashes a few long standing bugs that were floating around out there. Notably, make:entity uses ux-turbo instead of the archived ux-turbo-mercure package. The "types wizard" in make:entity will only show the doctrine types that are available instead of a static list of possibly unavailable types. For the features, we've upgraded the bundled php-cs-fixer to v3.49.0, added a few docblocks to help with static analysis tools, and I supposed it was about time we stopped calling createView() on form objects in make:registration-form && make:reset-password

Big thanks to the community for creating issues and submitting PR's!

v1.55.0

February 20th, 2024

Feature

  • #1455 - [make:registration-form] Removal of the createView() method, as it is no longer required to render the form - @mdoutreluingne
  • #1452 - [make:entity] remove PhpCompatUtil constructor argument - @jrushlow
  • #1444 - [make:command] deprecate passing PhpCompatUtil to the constructor - @jrushlow
  • #1443 - [make:controller] deprecate passing PhpCompatUtil to the constructor - @jrushlow
  • #1429 - [make:*] upgrade bundled PHP-CS-Fixer to v3.49.0 - @jrushlow
  • #1411 - [make:user] Add phpdocs in class generated by make:user for PHPStan - @maelanleborgne
  • #1273 - [make:serializer:normalizer] Inject a NormalizerInterface instead of an ObjectNormalize - @mtarld

Bug

  • #1449 - [tests] fix broken assignment operator - addExtraDependencies() - @jrushlow
  • #1448 - [make:entity] only show supported types in cli wizard - @jrushlow
  • #1445 - [make:entity] use ux-turbo instead of ux-turbo-mercure - @jrushlow
  • #1422 - Generator verifies if class exists before altering class name - @Antarian
  • #1283 - don't install development files when adding maker-bundle to a project - @dmitryuk

Generated by Git Released

Diff: v1.54.0...v1.55.0

Enjoy!

Support DBAL 4.0 & ORM 3.0, So Long Symfony 6.3, & Bug Smashing...

06 Feb 21:25
a8523cf
Compare
Choose a tag to compare

Howdy Makers!

We're saying goodbye to Symfony 6.3 :( But are welcoming in support for doctrine/dbal 4.0 and doctrine/orm 3.0! For the Windows folks out there, we discovered that the bundled php-cs-fixer wasn't working as expected. Naturally, our bug smashing hammer was put to good use and generated PHP files are nice and tidy. Along with a handful of DX improvements, we've bumped the doctrine/orm and doctrine/doctrine-bundle composer requirements to 2.15 & 2.10 respectively.

Speaking of DX, we've completed a bit of housekeeping on the testing front. Windows tests are running on GitHub Actions instead of AppVeyor, and while adding a few development env's to phpunit.xml.dist, we cleaned things up a bit to play nicely with PHPUnit 9.6.

v1.54.0

February 6th, 2024

Feature

  • #1439 - [make:*] improve support for ORM 3.x / DBAL 4.x - @jrushlow
  • #1438 - Remove mentions of undefined Doctrine constants Types::ARRAY and Types::OBJECT - @njutn95
  • #1432 - [make:controller] use promoted parameter - @tacman
  • #1428 - [make:*] use Routing\Attribute* instead of Routing\Annotation* - @jrushlow
  • #1425 - [dx] require >= PHPUnit 9.6, update phpunit schema, deprecate skipOnSymfony7() - @jrushlow
  • #1421 - [make:*] drop Symfony 6.3 support - @jrushlow
  • #1418 - Determine events map dynamically - @HypeMC

Bug

Generated by Git Released

Diff: v1.53.0...v1.54.0

Enjoy!