Skip to content

Commit

Permalink
Merge pull request #67 from DataValues/mwEntryPointRelease
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
JeroenDeDauw committed Sep 28, 2017
2 parents fcc0b1e + b81e785 commit e0182d6
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 54 deletions.
18 changes: 0 additions & 18 deletions Common.php

This file was deleted.

14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ The recommended way to use this library is via [Composer](http://getcomposer.org
To add this package as a local, per-project dependency to your project, simply add a
dependency on `data-values/common` to your project's `composer.json` file.
Here is a minimal example of a `composer.json` file that just defines a dependency on
version 0.3 of this package:
version 1.0 of this package:

{
"require": {
"data-values/common": "0.3.*"
"data-values/common": "^1.0.0"
}
}

Expand Down Expand Up @@ -55,10 +55,14 @@ employees for the [Wikidata project](https://wikidata.org/).

## Release notes

### 0.5.0 (dev)
### 1.0.0 (dev)

#### Breaking changes
* The `StringFormatter` constructor does not accept options any more.
* Removed the `DATAVALUES_COMMON_VERSION` constant
* The `StringFormatter` constructor does not accept options any more

### 0.4.1 (2017-08-09)

* Fixed version number not updated before.

### 0.4.0 (2017-08-09)

Expand Down
15 changes: 6 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,19 @@
"require": {
"php": ">=5.5.9",
"data-values/data-values": "~1.0|~0.1",
"data-values/interfaces": "~0.2.0|~0.1.5"
"data-values/interfaces": "~0.2.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8",
"ockcyp/covers-validator": "~0.4",
"phpunit/phpunit": "~4.8",
"wikibase/wikibase-codesniffer": "^0.1.0"
},
"extra": {
"branch-alias": {
"dev-master": "0.3.x-dev"
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"files" : [
"Common.php"
],
"psr-4": {
"DataValues\\": "src/DataValues/",
"ValueFormatters\\": "src/ValueFormatters/",
Expand All @@ -52,16 +49,16 @@
},
"scripts": {
"cs": [
"phpcs src/* tests/* --standard=phpcs.xml -sp"
"phpcs -p -s"
],
"test": [
"composer validate --no-interaction",
"covers-validator",
"phpunit"
],
"ci": [
"@test",
"@cs"
"@cs",
"@test"
]
}
}
6 changes: 3 additions & 3 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<ruleset name="DataValuesCommon">
<rule ref="./vendor/wikibase/wikibase-codesniffer/Wikibase">
<exclude name="PSR2.Methods.MethodDeclaration" />
</rule>
<rule ref="./vendor/wikibase/wikibase-codesniffer/Wikibase" />

<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="124" />
</properties>
</rule>

<file>.</file>
</ruleset>
2 changes: 1 addition & 1 deletion src/DataValues/MonolingualTextValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function getArrayValue() {
* Constructs a new instance from the provided data. Required for @see DataValueDeserializer.
* This is expected to round-trip with @see getArrayValue.
*
* @deprecated since 0.3.2. Static DataValue::newFromArray constructors like this are
* @deprecated since 1.0.0. Static DataValue::newFromArray constructors like this are
* underspecified (not in the DataValue interface), and misleadingly named (should be named
* newFromArrayValue). Instead, use DataValue builder callbacks in @see DataValueDeserializer.
*
Expand Down
2 changes: 1 addition & 1 deletion src/DataValues/MultilingualTextValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function getArrayValue() {
* Constructs a new instance from the provided data. Required for @see DataValueDeserializer.
* This is expected to round-trip with @see getArrayValue.
*
* @deprecated since 0.3.2. Static DataValue::newFromArray constructors like this are
* @deprecated since 1.0.0. Static DataValue::newFromArray constructors like this are
* underspecified (not in the DataValue interface), and misleadingly named (should be named
* newFromArrayValue). Instead, use DataValue builder callbacks in @see DataValueDeserializer.
*
Expand Down
8 changes: 4 additions & 4 deletions src/ValueParsers/StringValueParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function parse( $value ) {
*
* @return mixed
*/
protected abstract function stringParse( $value );
abstract protected function stringParse( $value );

/**
* @since 0.1
Expand Down Expand Up @@ -88,7 +88,7 @@ public function getOptions() {
* @throws InvalidArgumentException
* @return mixed
*/
protected final function getOption( $option ) {
final protected function getOption( $option ) {
return $this->options->getOption( $option );
}

Expand All @@ -101,7 +101,7 @@ protected final function getOption( $option ) {
*
* @throws RuntimeException
*/
protected final function requireOption( $option ) {
final protected function requireOption( $option ) {
$this->options->requireOption( $option );
}

Expand All @@ -113,7 +113,7 @@ protected final function requireOption( $option ) {
* @param string $option
* @param mixed $default
*/
protected final function defaultOption( $option, $default ) {
final protected function defaultOption( $option, $default ) {
$this->options->defaultOption( $option, $default );
}

Expand Down
7 changes: 0 additions & 7 deletions tests/ValueFormatters/StringFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
*/
class StringFormatterTest extends ValueFormatterTestBase {

/**
* @deprecated since DataValues Interfaces 0.2, just use getInstance.
*/
protected function getFormatterClass() {
throw new \LogicException( 'Should not be called, use getInstance' );
}

/**
* @see ValueFormatterTestBase::getInstance
*
Expand Down
4 changes: 1 addition & 3 deletions tests/ValueParsers/StringValueParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
use ValueParsers\StringValueParser;

/**
* Unit test StringValueParser class.
*
* @since 0.1
* @covers ValueParsers\StringValueParser
*
* @group ValueParsers
* @group DataValueExtensions
Expand Down
6 changes: 3 additions & 3 deletions tests/ValueParsers/ValueParserTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ abstract class ValueParserTestBase extends PHPUnit_Framework_TestCase {
*
* @return array[]
*/
public abstract function validInputProvider();
abstract public function validInputProvider();

/**
* @since 0.1
*
* @return array[]
*/
public abstract function invalidInputProvider();
abstract public function invalidInputProvider();

/**
* @since 0.1
*
* @return ValueParser
*/
protected abstract function getInstance();
abstract protected function getInstance();

/**
* @since 0.1
Expand Down

0 comments on commit e0182d6

Please sign in to comment.