[PR #820] [MERGED] Added support for field options to FieldBuilder #8750

Closed
opened 2026-01-22 16:01:33 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/820
Author: @apancutt
Created: 10/15/2013
Status: Merged
Merged: 1/3/2014
Merged by: @beberlei

Base: masterHead: master


📝 Commits (4)

  • 25342b7 Added support for field options to FieldBuilder
  • db52741 Code style fix
  • 553086a Removed check for instantiated options array
  • 352f539 Removed FieldBuilder::unsigned() method as it is only supported by MySQL

📊 Changes

2 files changed (+21 additions, -0 deletions)

View changed files

📝 lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php (+14 -0)
📝 tests/Doctrine/Tests/ORM/Mapping/ClassMetadataBuilderTest.php (+7 -0)

📄 Description

Currently, there is no way of cleanly adding options to mapped fields using the FieldBuilder. This makes it impossible to provide the "unsigned" option using the fluid API.

The current solution is to provide options directly to ClassMetadataInfo::mapField() but, for consistency in my project, I'd like to use the FieldBuilder.

This patch adds two new methods allowing arbitrary options to be mapped to a field, and a shorthand method for enabling the "unsigned" option.

Unit test included.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/820 **Author:** [@apancutt](https://github.com/apancutt) **Created:** 10/15/2013 **Status:** ✅ Merged **Merged:** 1/3/2014 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (4) - [`25342b7`](https://github.com/doctrine/orm/commit/25342b706dbfbf8dfe9535706942c66b70d03a4e) Added support for field options to FieldBuilder - [`db52741`](https://github.com/doctrine/orm/commit/db5274113ac10773e286a6ec6ae73f2ba555926e) Code style fix - [`553086a`](https://github.com/doctrine/orm/commit/553086ae3dd755098215b7ca01373bd41553290c) Removed check for instantiated options array - [`352f539`](https://github.com/doctrine/orm/commit/352f5394e5b55e4359b118594dde21fe2693eeab) Removed FieldBuilder::unsigned() method as it is only supported by MySQL ### 📊 Changes **2 files changed** (+21 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php` (+14 -0) 📝 `tests/Doctrine/Tests/ORM/Mapping/ClassMetadataBuilderTest.php` (+7 -0) </details> ### 📄 Description Currently, there is no way of cleanly adding options to mapped fields using the FieldBuilder. This makes it impossible to provide the "unsigned" option using the fluid API. The current solution is to provide options directly to ClassMetadataInfo::mapField() but, for consistency in my project, I'd like to use the FieldBuilder. This patch adds two new methods allowing arbitrary options to be mapped to a field, and a shorthand method for enabling the "unsigned" option. Unit test included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:01:33 +01:00
admin closed this issue 2026-01-22 16:01:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8750