mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #820] [MERGED] Added support for field options to FieldBuilder #8750
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:master📝 Commits (4)
25342b7Added support for field options to FieldBuilderdb52741Code style fix553086aRemoved check for instantiated options array352f539Removed 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.