From 35cfa6bcbf322aa61e791dc6280e12c7e98f18dc Mon Sep 17 00:00:00 2001 From: nagyad Date: Fri, 24 May 2019 10:27:35 +0200 Subject: [PATCH 01/11] OPENEUROPA-1905: Create field type plugin. --- composer.json | 1 + src/Plugin/Field/FieldType/EntityVersion.php | 90 ++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 src/Plugin/Field/FieldType/EntityVersion.php diff --git a/composer.json b/composer.json index 96302d5..93aa81b 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "drupal/config_devel": "~1.2", "drupal/console": "^1.6", "drupal/drupal-extension": "~4.0", + "drupal/examples": "1.x-dev", "drush/drush": "~9.0@stable", "openeuropa/code-review": "~1.0.0-beta2", "openeuropa/drupal-core-require-dev": "^8.7", diff --git a/src/Plugin/Field/FieldType/EntityVersion.php b/src/Plugin/Field/FieldType/EntityVersion.php new file mode 100644 index 0000000..7f527a6 --- /dev/null +++ b/src/Plugin/Field/FieldType/EntityVersion.php @@ -0,0 +1,90 @@ + [ + 'major' => [ + 'type' => 'int', + ], + 'minor' => [ + 'type' => 'int', + ], + 'patch' => [ + 'type' => 'int', + ], + ], + ]; + } + + /** + * {@inheritdoc} + */ + public function isEmpty() { + + } + + /** + * {@inheritdoc} + */ + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { + $properties['major'] = DataDefinition::create('integer') + ->setLabel(t('Major number')); + $properties['minor'] = DataDefinition::create('integer') + ->setLabel(t('Minor number')); + $properties['patch'] = DataDefinition::create('integer') + ->setLabel(t('Patch number')); + + return $properties; + } + + /** + * Increase the given version number category. + * + * @param string $category + */ + public function increase(string $category): void { + //$value = $this->get('value')->getValue(); + } + + /** + * Decrease the given version number category. + * + * @param string $category + */ + public function decrease(string $category): void { + + } + + /** + * Reset the given version number category to zero. + * + * @param string $category + */ + public function reset(string $category): void { + + } + +} From 31e8751a87b2d0c8b2148bec47ebd7fc990f7a97 Mon Sep 17 00:00:00 2001 From: nagyad Date: Fri, 24 May 2019 10:27:35 +0200 Subject: [PATCH 02/11] OPENEUROPA-1905: Create field type plugin. --- composer.json | 1 + src/Plugin/Field/FieldType/EntityVersion.php | 90 ++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 src/Plugin/Field/FieldType/EntityVersion.php diff --git a/composer.json b/composer.json index 96302d5..93aa81b 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "drupal/config_devel": "~1.2", "drupal/console": "^1.6", "drupal/drupal-extension": "~4.0", + "drupal/examples": "1.x-dev", "drush/drush": "~9.0@stable", "openeuropa/code-review": "~1.0.0-beta2", "openeuropa/drupal-core-require-dev": "^8.7", diff --git a/src/Plugin/Field/FieldType/EntityVersion.php b/src/Plugin/Field/FieldType/EntityVersion.php new file mode 100644 index 0000000..7f527a6 --- /dev/null +++ b/src/Plugin/Field/FieldType/EntityVersion.php @@ -0,0 +1,90 @@ + [ + 'major' => [ + 'type' => 'int', + ], + 'minor' => [ + 'type' => 'int', + ], + 'patch' => [ + 'type' => 'int', + ], + ], + ]; + } + + /** + * {@inheritdoc} + */ + public function isEmpty() { + + } + + /** + * {@inheritdoc} + */ + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { + $properties['major'] = DataDefinition::create('integer') + ->setLabel(t('Major number')); + $properties['minor'] = DataDefinition::create('integer') + ->setLabel(t('Minor number')); + $properties['patch'] = DataDefinition::create('integer') + ->setLabel(t('Patch number')); + + return $properties; + } + + /** + * Increase the given version number category. + * + * @param string $category + */ + public function increase(string $category): void { + //$value = $this->get('value')->getValue(); + } + + /** + * Decrease the given version number category. + * + * @param string $category + */ + public function decrease(string $category): void { + + } + + /** + * Reset the given version number category to zero. + * + * @param string $category + */ + public function reset(string $category): void { + + } + +} From 0608e91fec625bcb16fa538128ff58ebd53efccf Mon Sep 17 00:00:00 2001 From: nagyad Date: Mon, 27 May 2019 09:39:33 +0200 Subject: [PATCH 03/11] OPENEUROPA-1905: Remove drupal/console from composer. --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 93aa81b..7250650 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,6 @@ "composer/installers": "~1.5", "drupal-composer/drupal-scaffold": "~2.2", "drupal/config_devel": "~1.2", - "drupal/console": "^1.6", "drupal/drupal-extension": "~4.0", "drupal/examples": "1.x-dev", "drush/drush": "~9.0@stable", From 878297e9b691371f6263a47ad1d0931a5dc62b0d Mon Sep 17 00:00:00 2001 From: nagyad Date: Mon, 27 May 2019 09:55:05 +0200 Subject: [PATCH 04/11] OPENEUROPA-1905: Complete kernel test. --- .../Field/FieldType/EntityVersionItem.php | 10 ++-- tests/Kernel/EntityVersionItemTest.php | 56 ++++++++++++++++--- 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/src/Plugin/Field/FieldType/EntityVersionItem.php b/src/Plugin/Field/FieldType/EntityVersionItem.php index 2775a23..0a4d388 100644 --- a/src/Plugin/Field/FieldType/EntityVersionItem.php +++ b/src/Plugin/Field/FieldType/EntityVersionItem.php @@ -15,7 +15,7 @@ * id = "entity_version", * label = @Translation("Entity version"), * module = "entity_versions", - * description = @Translation("Stores the versions of the entity.") + * description = @Translation("Stores the version of the entity.") * ) */ class EntityVersionItem extends FieldItemBase { @@ -70,7 +70,7 @@ public static function propertyDefinitions(FieldStorageDefinitionInterface $fiel * * @param string $category */ - public function increaseValue(string $category): void { + public function increase(string $category): void { $value = $this->get($category)->getValue(); $this->set($category, ($value + 1)); } @@ -80,9 +80,9 @@ public function increaseValue(string $category): void { * * @param string $category */ - public function decreaseValue(string $category): void { + public function decrease(string $category): void { $value = $this->get($category)->getValue(); - $this->set($category, ($value + 1)); + $this->set($category, ($value - 1)); } /** @@ -90,7 +90,7 @@ public function decreaseValue(string $category): void { * * @param string $category */ - public function resetValue(string $category): void { + public function reset(string $category): void { $this->set($category, 0); } diff --git a/tests/Kernel/EntityVersionItemTest.php b/tests/Kernel/EntityVersionItemTest.php index 626b771..a8b8eb1 100755 --- a/tests/Kernel/EntityVersionItemTest.php +++ b/tests/Kernel/EntityVersionItemTest.php @@ -24,13 +24,13 @@ protected function setUp() { // Create a generic field for validation. FieldStorageConfig::create([ - 'field_name' => 'field_test', + 'field_name' => 'version', 'entity_type' => 'entity_test', 'type' => 'entity_version', ])->save(); FieldConfig::create([ 'entity_type' => 'entity_test', - 'field_name' => 'field_test', + 'field_name' => 'version', 'bundle' => 'entity_test', ])->save(); } @@ -41,18 +41,56 @@ protected function setUp() { public function testEntityVersionItem() { // Create entity. $entity = EntityTest::create(); - $entity->field_test->title = 'Test'; - $entity->field_test->major = 1; - $entity->field_test->minor = 1; - $entity->field_test->patch = 1; + $entity->version->major = 1; + $entity->version->minor = 1; + $entity->version->patch = 1; $entity->save(); // Verify that the field value is changed. $id = $entity->id(); $entity = EntityTest::load($id); - $this->assertEqual($entity->field_test->major, 1); - $this->assertEqual($entity->field_test->minor, 1); - $this->assertEqual($entity->field_test->patch, 1); + $this->assertEqual($entity->version->major, 1); + $this->assertEqual($entity->version->minor, 1); + $this->assertEqual($entity->version->patch, 1); + + // Use the field type method to increase the values. + $entity->version->first()->increase('major'); + $entity->version->first()->increase('minor'); + $entity->version->first()->increase('patch'); + $entity->save(); + + // Verify that the field value is changed. + $id = $entity->id(); + $entity = EntityTest::load($id); + $this->assertEqual($entity->version->major, 2); + $this->assertEqual($entity->version->minor, 2); + $this->assertEqual($entity->version->patch, 2); + + // Use the field type method to decrease the values. + $entity->version->first()->decrease('major'); + $entity->version->first()->decrease('minor'); + $entity->version->first()->decrease('patch'); + $entity->save(); + + // Verify that the field value is changed. + $id = $entity->id(); + $entity = EntityTest::load($id); + $this->assertEqual($entity->version->major, 1); + $this->assertEqual($entity->version->minor, 1); + $this->assertEqual($entity->version->patch, 1); + + // Use the field type method to reset the values to zero. + $entity->version->first()->reset('major'); + $entity->version->first()->reset('minor'); + $entity->version->first()->reset('patch'); + $entity->save(); + + // Verify that the field value is changed. + $id = $entity->id(); + $entity = EntityTest::load($id); + $this->assertEqual($entity->version->major, 0); + $this->assertEqual($entity->version->minor, 0); + $this->assertEqual($entity->version->patch, 0); } } From 7d7def4be091141f5f9e3d4f34fccd346d6d684c Mon Sep 17 00:00:00 2001 From: nagyad Date: Mon, 27 May 2019 10:34:58 +0200 Subject: [PATCH 05/11] OPENEUROPA-1905: Make sure that zero is a value. --- composer.json | 1 - .../Field/FieldType/EntityVersionItem.php | 18 +++----- .../FieldType/EntityVersionItemInterface.php | 38 +++++++++++++++++ tests/Kernel/EntityVersionItemTest.php | 41 ++++++++++++++++++- 4 files changed, 83 insertions(+), 15 deletions(-) create mode 100644 src/Plugin/Field/FieldType/EntityVersionItemInterface.php diff --git a/composer.json b/composer.json index 7250650..d3974b2 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,6 @@ "drupal-composer/drupal-scaffold": "~2.2", "drupal/config_devel": "~1.2", "drupal/drupal-extension": "~4.0", - "drupal/examples": "1.x-dev", "drush/drush": "~9.0@stable", "openeuropa/code-review": "~1.0.0-beta2", "openeuropa/drupal-core-require-dev": "^8.7", diff --git a/src/Plugin/Field/FieldType/EntityVersionItem.php b/src/Plugin/Field/FieldType/EntityVersionItem.php index 0a4d388..5929a75 100644 --- a/src/Plugin/Field/FieldType/EntityVersionItem.php +++ b/src/Plugin/Field/FieldType/EntityVersionItem.php @@ -18,7 +18,7 @@ * description = @Translation("Stores the version of the entity.") * ) */ -class EntityVersionItem extends FieldItemBase { +class EntityVersionItem extends FieldItemBase implements EntityVersionItemInterface { /** * {@inheritdoc} @@ -48,7 +48,7 @@ public function isEmpty() { $minor = $this->get('minor')->getValue(); $patch = $this->get('patch')->getValue(); - return empty($major) || empty($minor) || empty($patch); + return $major === NULL || $major === '' || $minor === NULL || $minor === '' || $patch === NULL || $patch === ''; } /** @@ -66,9 +66,7 @@ public static function propertyDefinitions(FieldStorageDefinitionInterface $fiel } /** - * Increase the given version number category. - * - * @param string $category + * {@inheritdoc} */ public function increase(string $category): void { $value = $this->get($category)->getValue(); @@ -76,19 +74,15 @@ public function increase(string $category): void { } /** - * Decrease the given version number category. - * - * @param string $category + * {@inheritdoc} */ public function decrease(string $category): void { $value = $this->get($category)->getValue(); - $this->set($category, ($value - 1)); + $this->set($category, empty($value) ? 0 : ($value - 1)); } /** - * Reset the given version number category to zero. - * - * @param string $category + * {@inheritdoc} */ public function reset(string $category): void { $this->set($category, 0); diff --git a/src/Plugin/Field/FieldType/EntityVersionItemInterface.php b/src/Plugin/Field/FieldType/EntityVersionItemInterface.php new file mode 100644 index 0000000..84fbd1c --- /dev/null +++ b/src/Plugin/Field/FieldType/EntityVersionItemInterface.php @@ -0,0 +1,38 @@ +assertEqual($entity->version->minor, 2); $this->assertEqual($entity->version->patch, 2); - // Use the field type method to decrease the values. + // Use the field type method to decrease the major number. $entity->version->first()->decrease('major'); + $entity->save(); + + // Verify that the field value is changed. + $id = $entity->id(); + $entity = EntityTest::load($id); + $this->assertEqual($entity->version->major, 1); + $this->assertEqual($entity->version->minor, 2); + $this->assertEqual($entity->version->patch, 2); + + // Use the field type method to decrease values. $entity->version->first()->decrease('minor'); $entity->version->first()->decrease('patch'); $entity->save(); @@ -79,7 +92,7 @@ public function testEntityVersionItem() { $this->assertEqual($entity->version->minor, 1); $this->assertEqual($entity->version->patch, 1); - // Use the field type method to reset the values to zero. + // Use the field type method to reset values to zero. $entity->version->first()->reset('major'); $entity->version->first()->reset('minor'); $entity->version->first()->reset('patch'); @@ -91,6 +104,30 @@ public function testEntityVersionItem() { $this->assertEqual($entity->version->major, 0); $this->assertEqual($entity->version->minor, 0); $this->assertEqual($entity->version->patch, 0); + + // Use the field type method to decrease values. + $entity->version->first()->decrease('major'); + $entity->version->first()->decrease('minor'); + $entity->version->first()->decrease('patch'); + $entity->save(); + + // Verify that the field value has not changed. + $id = $entity->id(); + $entity = EntityTest::load($id); + $this->assertEqual($entity->version->major, 0); + $this->assertEqual($entity->version->minor, 0); + $this->assertEqual($entity->version->patch, 0); + + // Use the field type method to increase patch. + $entity->version->first()->increase('patch'); + $entity->save(); + + // Verify that the field value is changed. + $id = $entity->id(); + $entity = EntityTest::load($id); + $this->assertEqual($entity->version->major, 0); + $this->assertEqual($entity->version->minor, 0); + $this->assertEqual($entity->version->patch, 1); } } From 3fb9fb111dae3aaa197802254f740c8465233923 Mon Sep 17 00:00:00 2001 From: nagyad Date: Mon, 27 May 2019 11:47:31 +0200 Subject: [PATCH 06/11] OPENEUROPA-1905: Rename module to singular. --- .drone.yml | 4 ++-- composer.json | 6 +++--- entity_versions.info.yml => entity_version.info.yml | 0 entity_versions.module => entity_version.module | 0 runner.yml.dist | 4 ++-- src/Plugin/Field/FieldType/EntityVersionItem.php | 4 ++-- src/Plugin/Field/FieldType/EntityVersionItemInterface.php | 2 +- tests/Kernel/EntityVersionItemTest.php | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) rename entity_versions.info.yml => entity_version.info.yml (100%) rename entity_versions.module => entity_version.module (100%) diff --git a/.drone.yml b/.drone.yml index b4c639e..6685551 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,12 +1,12 @@ workspace: base: /test - path: entity_versions + path: entity_version services: web: image: fpfis/httpd-php-ci:7.1 environment: - - DOCUMENT_ROOT=/test/entity_versions + - DOCUMENT_ROOT=/test/entity_version mysql: image: percona/percona-server:5.6 environment: diff --git a/composer.json b/composer.json index d3974b2..ebe67b1 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "openeuropa/entity_versions", + "name": "openeuropa/entity_version", "description": "Entity Versions.", "type": "drupal-module", "license": "EUPL-1.2", @@ -33,12 +33,12 @@ ], "autoload": { "psr-4": { - "Drupal\\entity_versions\\": "./src/" + "Drupal\\entity_version\\": "./src/" } }, "autoload-dev": { "psr-4": { - "Drupal\\Tests\\entity_versions\\": "./tests/" + "Drupal\\Tests\\entity_version\\": "./tests/" } }, "extra": { diff --git a/entity_versions.info.yml b/entity_version.info.yml similarity index 100% rename from entity_versions.info.yml rename to entity_version.info.yml diff --git a/entity_versions.module b/entity_version.module similarity index 100% rename from entity_versions.module rename to entity_version.module diff --git a/runner.yml.dist b/runner.yml.dist index 404e401..85017a8 100644 --- a/runner.yml.dist +++ b/runner.yml.dist @@ -20,7 +20,7 @@ drupal: - "./vendor/bin/drush config-set node.settings use_admin_theme 1 -y" # Enable the modules. - "./vendor/bin/drush en config_devel -y" - - "./vendor/bin/drush en entity_versions -y" + - "./vendor/bin/drush en entity_version -y" - "./vendor/bin/drush cr" settings: settings: @@ -32,7 +32,7 @@ drupal: commands: drupal:site-setup: - - { task: "symlink", from: "../../..", to: "${drupal.root}/modules/custom/entity_versions" } + - { task: "symlink", from: "../../..", to: "${drupal.root}/modules/custom/entity_version" } - { task: "run", command: "drupal:drush-setup" } - { task: "run", command: "drupal:settings-setup" } - { task: "run", command: "setup:phpunit" } diff --git a/src/Plugin/Field/FieldType/EntityVersionItem.php b/src/Plugin/Field/FieldType/EntityVersionItem.php index 5929a75..b5ebae7 100644 --- a/src/Plugin/Field/FieldType/EntityVersionItem.php +++ b/src/Plugin/Field/FieldType/EntityVersionItem.php @@ -2,7 +2,7 @@ declare(strict_types = 1); -namespace Drupal\entity_versions\Plugin\Field\FieldType; +namespace Drupal\entity_version\Plugin\Field\FieldType; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\Field\FieldStorageDefinitionInterface; @@ -14,7 +14,7 @@ * @FieldType( * id = "entity_version", * label = @Translation("Entity version"), - * module = "entity_versions", + * module = "entity_version", * description = @Translation("Stores the version of the entity.") * ) */ diff --git a/src/Plugin/Field/FieldType/EntityVersionItemInterface.php b/src/Plugin/Field/FieldType/EntityVersionItemInterface.php index 84fbd1c..35de026 100644 --- a/src/Plugin/Field/FieldType/EntityVersionItemInterface.php +++ b/src/Plugin/Field/FieldType/EntityVersionItemInterface.php @@ -2,7 +2,7 @@ declare(strict_types = 1); -namespace Drupal\entity_versions\Plugin\Field\FieldType; +namespace Drupal\entity_version\Plugin\Field\FieldType; use Drupal\Core\Field\FieldItemInterface; diff --git a/tests/Kernel/EntityVersionItemTest.php b/tests/Kernel/EntityVersionItemTest.php index 617f34d..1ddfd23 100755 --- a/tests/Kernel/EntityVersionItemTest.php +++ b/tests/Kernel/EntityVersionItemTest.php @@ -1,6 +1,6 @@ Date: Tue, 28 May 2019 13:00:44 +0200 Subject: [PATCH 07/11] OPENEUROPA-1905: Add default value zero. --- .../Field/FieldType/EntityVersionItem.php | 18 +++++++++ tests/Kernel/EntityVersionItemTest.php | 37 ++++++++++--------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/src/Plugin/Field/FieldType/EntityVersionItem.php b/src/Plugin/Field/FieldType/EntityVersionItem.php index b5ebae7..37edf4e 100644 --- a/src/Plugin/Field/FieldType/EntityVersionItem.php +++ b/src/Plugin/Field/FieldType/EntityVersionItem.php @@ -65,6 +65,24 @@ public static function propertyDefinitions(FieldStorageDefinitionInterface $fiel return $properties; } + /** + * {@inheritdoc} + */ + public function applyDefaultValue($notify = TRUE) { + parent::applyDefaultValue($notify); + // Created fields default to zero. + $this->setValue( + [ + 'major' => 0, + 'minor' => 0, + 'patch' => 0, + ], + $notify + ); + + return $this; + } + /** * {@inheritdoc} */ diff --git a/tests/Kernel/EntityVersionItemTest.php b/tests/Kernel/EntityVersionItemTest.php index 1ddfd23..0d4345f 100755 --- a/tests/Kernel/EntityVersionItemTest.php +++ b/tests/Kernel/EntityVersionItemTest.php @@ -44,17 +44,14 @@ protected function setUp() { public function testEntityVersionItem() { // Create entity. $entity = EntityTest::create(); - $entity->version->major = 1; - $entity->version->minor = 1; - $entity->version->patch = 1; $entity->save(); - // Verify that the field value is changed. + // Verify that the field default value is zero. $id = $entity->id(); $entity = EntityTest::load($id); - $this->assertEqual($entity->version->major, 1); - $this->assertEqual($entity->version->minor, 1); - $this->assertEqual($entity->version->patch, 1); + $this->assertEqual($entity->version->major, 0); + $this->assertEqual($entity->version->minor, 0); + $this->assertEqual($entity->version->patch, 0); // Use the field type method to increase the values. $entity->version->first()->increase('major'); @@ -65,9 +62,9 @@ public function testEntityVersionItem() { // Verify that the field value is changed. $id = $entity->id(); $entity = EntityTest::load($id); - $this->assertEqual($entity->version->major, 2); - $this->assertEqual($entity->version->minor, 2); - $this->assertEqual($entity->version->patch, 2); + $this->assertEqual($entity->version->major, 1); + $this->assertEqual($entity->version->minor, 1); + $this->assertEqual($entity->version->patch, 1); // Use the field type method to decrease the major number. $entity->version->first()->decrease('major'); @@ -76,9 +73,9 @@ public function testEntityVersionItem() { // Verify that the field value is changed. $id = $entity->id(); $entity = EntityTest::load($id); - $this->assertEqual($entity->version->major, 1); - $this->assertEqual($entity->version->minor, 2); - $this->assertEqual($entity->version->patch, 2); + $this->assertEqual($entity->version->major, 0); + $this->assertEqual($entity->version->minor, 1); + $this->assertEqual($entity->version->patch, 1); // Use the field type method to decrease values. $entity->version->first()->decrease('minor'); @@ -88,9 +85,15 @@ public function testEntityVersionItem() { // Verify that the field value is changed. $id = $entity->id(); $entity = EntityTest::load($id); - $this->assertEqual($entity->version->major, 1); - $this->assertEqual($entity->version->minor, 1); - $this->assertEqual($entity->version->patch, 1); + $this->assertEqual($entity->version->major, 0); + $this->assertEqual($entity->version->minor, 0); + $this->assertEqual($entity->version->patch, 0); + + // Use the field type method to increase the values. + $entity->version->first()->increase('major'); + $entity->version->first()->increase('minor'); + $entity->version->first()->increase('patch'); + $entity->save(); // Use the field type method to reset values to zero. $entity->version->first()->reset('major'); @@ -98,7 +101,7 @@ public function testEntityVersionItem() { $entity->version->first()->reset('patch'); $entity->save(); - // Verify that the field value is changed. + // Verify that the field value is reset. $id = $entity->id(); $entity = EntityTest::load($id); $this->assertEqual($entity->version->major, 0); From d2f1a10d657c76100acd03221e7699d1ebd08399 Mon Sep 17 00:00:00 2001 From: nagyad Date: Tue, 28 May 2019 13:07:39 +0200 Subject: [PATCH 08/11] OPENEUROPA-1905: Module name to singular. --- README.md | 4 ++-- composer.json | 2 +- entity_version.info.yml | 4 ++-- entity_version.module | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2a7c962..d905899 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Entity versions +# Entity version -Entity versions allows to attach version number to content revisions that help content editors to understand the evolution of the content item. Versions are composed of major, minor and patch numbers that can be changed manually or by third party modules. +Entity version allows to attach version number to content revisions that help content editors to understand the evolution of the content item. Versions are composed of major, minor and patch numbers that can be changed manually or by third party modules. ## Development setup diff --git a/composer.json b/composer.json index ebe67b1..55bee9f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "openeuropa/entity_version", - "description": "Entity Versions.", + "description": "Entity Version.", "type": "drupal-module", "license": "EUPL-1.2", "minimum-stability": "dev", diff --git a/entity_version.info.yml b/entity_version.info.yml index 2c6c20d..8b98c58 100644 --- a/entity_version.info.yml +++ b/entity_version.info.yml @@ -1,5 +1,5 @@ -name: Entity versions -description: Entity versions allows to attach version number to content revisions that help content editors to +name: Entity version +description: Entity version allows to attach version number to content revisions that help content editors to understand the evolution of the content item. Versions are composed of major, minor and patch numbers that can be changed manually or by third party modules. diff --git a/entity_version.module b/entity_version.module index 68e645a..020ecde 100644 --- a/entity_version.module +++ b/entity_version.module @@ -2,7 +2,7 @@ /** * @file - * Entity versions module. + * Entity version module. */ declare(strict_types = 1); From ffcbf694e03008a8d047c0921eddd510601b80e2 Mon Sep 17 00:00:00 2001 From: Hernani Borges de Freitas Date: Wed, 29 May 2019 12:32:27 +0100 Subject: [PATCH 09/11] OPENEUROPA-1905: Changed readme. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d905899..c06e251 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Entity version -Entity version allows to attach version number to content revisions that help content editors to understand the evolution of the content item. Versions are composed of major, minor and patch numbers that can be changed manually or by third party modules. +Entity version allows to attach version number to content revisions that help content editors to understand the evolution of the content item. +Versions are composed of major, minor and patch numbers that can be changed manually or by third party modules. ## Development setup From 7d9e7ead7c824c709fa8b77df43709166ae9813a Mon Sep 17 00:00:00 2001 From: Hernani Borges de Freitas Date: Mon, 3 Jun 2019 09:14:13 +0100 Subject: [PATCH 10/11] OPENEUROPA-1905: Small README fix. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c06e251..eb19beb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Entity version -Entity version allows to attach version number to content revisions that help content editors to understand the evolution of the content item. +Entity version allows to attach version number to content revisions that help content editors to understand and version the evolution of the content item. Versions are composed of major, minor and patch numbers that can be changed manually or by third party modules. ## Development setup From f3ffde68a47fd8082505a92d3d7ccccf9aebec34 Mon Sep 17 00:00:00 2001 From: Hernani Borges de Freitas Date: Mon, 3 Jun 2019 11:39:19 +0100 Subject: [PATCH 11/11] OPENEUROPA-1905: Small README fix. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb19beb..c06e251 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Entity version -Entity version allows to attach version number to content revisions that help content editors to understand and version the evolution of the content item. +Entity version allows to attach version number to content revisions that help content editors to understand the evolution of the content item. Versions are composed of major, minor and patch numbers that can be changed manually or by third party modules. ## Development setup