-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Can you squash those commits together so we do not have a broken one in the history? |
} | ||
], | ||
"support": { | ||
"irc": "irc://irc.freenode.net/wikidata" | ||
}, | ||
"require": { | ||
"php": ">=5.3.0" | ||
"php": ">=5.3.0", | ||
"wikimedia/assert": "0.2.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~0.2.2
|
*/ | ||
protected $validators; | ||
|
||
/** | ||
* @since 0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not correct any more.
README, version numbers and some |
This removes ValueValidators from DataType, which was unused. DataType is no a simple pair of data type name and the associated value type id. DataTypeFactory is accordingly simplified to no longer use callbacks, but instead just take an array mapping data type names to value type ids. Needed by https://gerrit.wikimedia.org/r/#/c/228848
1948efc
to
85407a9
Compare
I think it makes more sense to clean it up here first, and then move
I agree, but since I need this change for the refactoring of the boostrap code for formatters, parsers, and validators, I'd really like to have this releaded before we have figured out SWikiBaseServices. |
Done, I think. |
Why? That's 2 breaking changes instead of 1.
As I said, we do not need to figure something difficult out first. We can just make the move. If you prefer, I'll happily submit the new version of this code against Wikibase.git and submit a deletion PR here. Only takes a few minutes. |
I had a go at moving this to WB.git and found that the JS binding is causing too much complications. So let's do that separately. |
Simplify DataType and DataTypeFactory
### 0.5 (2015-08-06) | ||
|
||
* Drop support for ValueValidators in DataTypes | ||
* Simplified DataTypeFactory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is way to vague. This should at least be marked as "breaking changes".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, these are not good release notes entries, as they do not tell the users of the component what they need to know. I've updated these lines shortly after merging this PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen your edit after I wrote this. Thanks a lot!
Requires new release of the DataTypes component, see wmde/DataTypes#34 Change-Id: I23f35b0bda8f20f502bb5b981e8ad438f04516b5
public function __construct( array $typeBuilders = array() ) { | ||
//TODO: check element type | ||
$this->typeBuilders = $typeBuilders; | ||
public function __construct( array $valueTypes ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constructor parameter not being optional was a breaking change, not updated correctly everywhere. See #51.
[BREAKING] This removes ValueValidators from DataType, which was unused.
DataType is no a simple pair of data type name and the associated value type id.
DataTypeFactory is accordingly simplified to no longer use callbacks, but instead
just take an array mapping data type names to value type ids.
Needed by https://gerrit.wikimedia.org/r/#/c/228848
This is a breaking change, since it modifies the constructor signature of DataType and DataTypeFactory.