Releases: symfony/maker-bundle
v1.62.1 : Revert PHP-CS-Fixer change
v1.62.0 contained a change that added php-cs-fixer as a required dependency. This caused a lot of problems downstream. We've reverted this change.
What's Changed
- fix: PHP 8.4 deprecations by @Chris53897 in #1650
- ci: fix github action deprecations by @Chris53897 in #1647
- Custom root namespace make:twig-component by @marcriemer in #1642
- Revert #1575 (Use a PHP-CS-Fixer shim rather than an external PHAR) by @kbond in #1654
New Contributors
- @marcriemer made their first contribution in #1642
Full Changelog: v1.62.0...v1.62.1
v1.62.0 : Final Controllers, Validators, & PHP-CS-Fixer as a Composer dependency
What's Changed
- [make:validator] drop annotation support in constraint by @jrushlow in #1590
- [docs] ignore composer lock file by @jrushlow in #1593
- [make:validator] generate final classes by @jrushlow in #1589
- [ci] temp. skip API Platform tests - recipe conflict by @jrushlow in #1598
- [make:*] Use a PHP-CS-Fixer shim rather than an external PHAR by @theofidry in #1575
- [tests] allow dev's to view test process output locally by @jrushlow in #1601
- [make:controller] add tests for command argument names by @jrushlow in #1602
- [make:controller] generate final controller class by @jrushlow in #1588
- [make:controller] add ability to create controller with tests by @jrushlow in #1603
- [make:controller] maker housekeeping by @jrushlow in #1604
- [tests] Fix double slashes in tmp PHPUnit path by @symfonyaml in #1596
- [make:crud] name repository variable with entity prefix when generating tests by @dr-matt-smith in #1597
- replace Bundle with the new AbstractBundle class by @jrushlow in #1514
- move templates to root template dir by @jrushlow in #1606
- Move help files into new directory structure by @jrushlow in #1605
- minor: run cs-fixer/phpstan with lowest supported PHP by @kbond in #1620
- [doc] make:entity requires Doctrine by @alexislefebvre in #1611
- [make:entity] Issue with detected mixed type set to be nullable by @sadikoff in #1619
- [make-entity]Keep the 'is' prefixes for booleans properties setters by @octoseth in #1621
- minor: cs fix by @kbond in #1623
- [doc]remove prepended doubleslash in exceptionmessage by @Butterd in #1622
New Contributors
- @symfonyaml made their first contribution in #1596
- @alexislefebvre made their first contribution in #1611
- @octoseth made their first contribution in #1621
- @Butterd made their first contribution in #1622
Full Changelog: v1.61.0...v1.62.0
Out with the bugs - In with the features...
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 withPasswordAuthenticatedUserInterface
- @seb-jean
New Contributors
- @shadowc made their first contribution in #1571
- @mvhirsch made their first contribution in #1581
- @theofidry made their first contribution in #1576
Full Changelog: v1.60.0...v1.61.0
Types, Enums, & Bugs...
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 thetools/
dependencies.composer tools:run
- Runphp-cs-fixer
,phpstan
, &twigcs
against the code base.tools:run:php-cs-fixer
- Run justphp-cs-fixer
. Works withphpstan
&twigcs
as well.
Enjoy!
v1.60.0
June 10th, 2024
Feature
- #1534 [make:entity] add enum support - @loicsapone
- #1543 [dx] make it easier to use tooling for devs - @jrushlow
- #1544 [make:webhook] phpstan types and single quotes - @seb-jean
- #1546 [make:message] phpstan types - @seb-jean
- #1545 1545 [make:crud] use getString() instead of get() for csrf token - @seb-jean
- #1568 [make:schedule] Add transport name for attribute - @NicolasJourdan
- #1574 [make:validator] phpstan types - @seb-jean
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
- @nfragnet made their first contribution in #1535
- @loicsapone made their first contribution in #1534
- @NicolasJourdan made their first contribution in #1568
Diff: v1.59.1...v1.60.0
Yes, we know make:auth is deprecated, stop yelling...
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
New Contributors
Diff: v1.59.0...v1.59.1
So long `make:auth`, Hello better security with tests...
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
- @jeromegxj made their first contribution in #1511
Diff: v1.58.0...v1.59.0
Make Webhooks & Schedules
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.
- https://symfony.com/doc/current/webhook.html
- https://symfony.com/doc/current/scheduler.html
- https://symfonycasts.com/screencast/symfony7-upgrade/scheduler
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
New Contributors
- @ClemRiviere made their first contribution in #1493
- @b1rdex made their first contribution in #1219
Diff: v1.57.0...v1.58.0
getPayload() with Uid's, better messages, & VerifyEmail improvements
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 ofget()
- @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 accessingrequest
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
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
- #1472 [make:migration] --configuration is available in all versions - @jrushlow
- #1469 - [make:form] fix generated field options_code indentation - @IndraGunawan
- #1468 - [make:crud] fixed issues with make CRUD test Controller generation - @dr-matt-smith
- #1461 - [make:auth] Fix 'always-remember-me' param always set to true - @maelanleborgne
Diff: v1.55.1...v1.56.0
Enjoy!
Hot Fix for make:entity
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
Diff: v1.55.0...v1.55.1
Enjoy!