Skip to content

[MakerBundle] document --with-uuid & --with-ulid #19714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,16 @@ Whoa! You now have a new ``src/Entity/Product.php`` file::
// ... getter and setter methods
}

.. tip::

Starting in `MakerBundle`_: v1.57.0 - You can pass either ``--with-uuid`` or
``--with-ulid`` to ``make:entity``. Leveraging Symfony's :doc:`Uid Component </components/uid>`,
this generates an entity with the ``id`` type as :ref:`Uuid <uuid>`
or :ref:`Ulid <ulid>` instead of ``int``.

.. note::

Starting in v1.44.0 - MakerBundle only supports entities using PHP attributes.
Starting in v1.44.0 - `MakerBundle`_: only supports entities using PHP attributes.

.. note::

Expand Down Expand Up @@ -909,3 +916,4 @@ Learn more
.. _`PDO`: https://www.php.net/pdo
.. _`available Doctrine extensions`: https://github.com/doctrine-extensions/DoctrineExtensions
.. _`StofDoctrineExtensionsBundle`: https://github.com/stof/StofDoctrineExtensionsBundle
.. _`MakerBundle`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html
8 changes: 8 additions & 0 deletions doctrine/associations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ This will generate your new entity class::
// ... getters and setters
}

.. tip::

Starting in `MakerBundle`_: v1.57.0 - You can pass either ``--with-uuid`` or
``--with-ulid`` to ``make:entity``. Leveraging Symfony's :doc:`Uid Component </components/uid>`,
this generates an entity with the ``id`` type as :ref:`Uuid <uuid>`
or :ref:`Ulid <ulid>` instead of ``int``.

Mapping the ManyToOne Relationship
----------------------------------

Expand Down Expand Up @@ -700,3 +707,4 @@ Doctrine's `Association Mapping Documentation`_.
.. _`orphanRemoval`: https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/working-with-associations.html#orphan-removal
.. _`Mastering Doctrine Relations`: https://symfonycasts.com/screencast/doctrine-relations
.. _`ArrayCollection`: https://www.doctrine-project.org/projects/doctrine-collections/en/1.6/index.html
.. _`MakerBundle`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html
7 changes: 7 additions & 0 deletions security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ from the `MakerBundle`_:
}
}

.. tip::

Starting in `MakerBundle`_: v1.57.0 - You can pass either ``--with-uuid`` or
``--with-ulid`` to ``make:user``. Leveraging Symfony's :doc:`Uid Component </components/uid>`,
this generates a ``User`` entity with the ``id`` type as :ref:`Uuid <uuid>`
or :ref:`Ulid <ulid>` instead of ``int``.

.. versionadded:: 5.3

The :class:`Symfony\\Component\\Security\\Core\\User\\PasswordAuthenticatedUserInterface`
Expand Down
7 changes: 7 additions & 0 deletions security/passwords.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,13 @@ you'll see a success message and a list of any other steps you need to do.

$ php bin/console make:reset-password

.. tip::

Starting in `MakerBundle`_: v1.57.0 - You can pass either ``--with-uuid`` or
``--with-ulid`` to ``make:reset-password``. Leveraging Symfony's :doc:`Uid Component </components/uid>`,
the entities will be generated with the ``id`` type as :ref:`Uuid <uuid>`
or :ref:`Ulid <ulid>` instead of ``int``.

You can customize the reset password bundle's behavior by updating the
``reset_password.yaml`` file. For more information on the configuration,
check out the `SymfonyCastsResetPasswordBundle`_ guide.
Expand Down