Skip to content
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

Support for nesting attributes with PHP 8.1 #9240

Closed
beberlei opened this issue Dec 12, 2021 · 0 comments · Fixed by #9241
Closed

Support for nesting attributes with PHP 8.1 #9240

beberlei opened this issue Dec 12, 2021 · 0 comments · Fixed by #9241
Milestone

Comments

@beberlei
Copy link
Member

beberlei commented Dec 12, 2021

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

With PHP 8.1 attributes can now be nested. This allows to add some of the missing functionality that we have missed on the Attribute Driver support for PHP 8.0:

  • #[AttributeOverrides([new AttributeOverride(name: "foo", column: new Column(type: "string"))]) and the same for #[AssociationOverride].
  • #[JoinTable(joinColumns: [new JoinColumn], inverseJoinColumns: [new JoinColumn])
  • #[Table(indexes: [new Index()], uniqueConstraints: [new UniqueConstraint()])]

Follow up to #8266

This ticket replaces #8772 and #9174

beberlei added a commit to beberlei/doctrine2 that referenced this issue Dec 12, 2021
…edConstructorArguments with AnnotationDriver.
beberlei added a commit to beberlei/doctrine2 that referenced this issue Dec 12, 2021
Supported/new attributes are #[AttributeOverrides], #[AssociationOverrides], #[JoinTable] with nested joinColumns, inverseJoinColumns.
beberlei added a commit to beberlei/doctrine2 that referenced this issue Dec 12, 2021
beberlei added a commit to beberlei/doctrine2 that referenced this issue Dec 12, 2021
…edConstructorArguments with AnnotationDriver.
beberlei added a commit to beberlei/doctrine2 that referenced this issue Dec 12, 2021
Supported/new attributes are #[AttributeOverrides], #[AssociationOverrides], #[JoinTable] with nested joinColumns, inverseJoinColumns.
beberlei added a commit to beberlei/doctrine2 that referenced this issue Dec 12, 2021
beberlei added a commit to beberlei/doctrine2 that referenced this issue Dec 12, 2021
Supported/new attributes are #[AttributeOverrides], #[AssociationOverrides], #[JoinTable] with nested joinColumns, inverseJoinColumns.
beberlei added a commit to beberlei/doctrine2 that referenced this issue Dec 12, 2021
@beberlei beberlei added this to the 2.11.0 milestone Dec 12, 2021
beberlei added a commit that referenced this issue Dec 18, 2021
* [GH-9240] Refactor Association/AttributeOverrides to use @NamedConstructorArguments with AnnotationDriver.

* [GH-9240] Add support for PHP 8.1 nested attributes.

Supported/new attributes are #[AttributeOverrides], #[AssociationOverrides], #[JoinTable] with nested joinColumns, inverseJoinColumns.

* [GH-9240] Add support for nesting Index, UniqueCosntraint into #[Table] on PHP 8.1

* Apply review comments by gregooire.

* Add documentation for new attributes.

* Add docs for new nested #[JoinTable] support of join columns

* Add docs for new nested #[Table] support of index, uniqueConstraints

* Rename "Required/Optional atttributes" to "Required/Optional parameters"

* Remove nesting for JoinTable#joinColumns and Table#indexes/uniqueConstraints again.

* Hosuekeeping: phpcs/psalm

* housekeeping

* Remove unused function imports.
@beberlei beberlei linked a pull request Dec 18, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant