Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like FieldTypeTest often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use FieldTypeTest, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 16 | abstract class FieldTypeTest extends TestCase |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Generic cache for the getFieldTypeUnderTest() method. |
||
| 20 | * |
||
| 21 | * @var \eZ\Publish\SPI\FieldType\FieldType |
||
| 22 | */ |
||
| 23 | private $fieldTypeUnderTest; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Returns the identifier of the field type under test. |
||
| 27 | * |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | abstract protected function provideFieldTypeIdentifier(); |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Returns the field type under test. |
||
| 34 | * |
||
| 35 | * This method is used by all test cases to retrieve the field type under |
||
| 36 | * test. Just create the FieldType instance using mocks from the provided |
||
| 37 | * get*Mock() methods and/or custom get*Mock() implementations. You MUST |
||
| 38 | * NOT take care for test case wide caching of the field type, just return |
||
| 39 | * a new instance from this method! |
||
| 40 | * |
||
| 41 | * @return FieldType |
||
| 42 | */ |
||
| 43 | abstract protected function createFieldTypeUnderTest(); |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Returns the validator configuration schema expected from the field type. |
||
| 47 | * |
||
| 48 | * @return array |
||
| 49 | */ |
||
| 50 | abstract protected function getValidatorConfigurationSchemaExpectation(); |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Returns the settings schema expected from the field type. |
||
| 54 | * |
||
| 55 | * @return array |
||
| 56 | */ |
||
| 57 | abstract protected function getSettingsSchemaExpectation(); |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Returns the empty value expected from the field type. |
||
| 61 | * |
||
| 62 | * @return mixed |
||
| 63 | */ |
||
| 64 | abstract protected function getEmptyValueExpectation(); |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Data provider for invalid input to acceptValue(). |
||
| 68 | * |
||
| 69 | * Returns an array of data provider sets with 2 arguments: 1. The invalid |
||
| 70 | * input to acceptValue(), 2. The expected exception type as a string. For |
||
| 71 | * example: |
||
| 72 | * |
||
| 73 | * <code> |
||
| 74 | * return array( |
||
| 75 | * array( |
||
| 76 | * new \stdClass(), |
||
| 77 | * 'eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException', |
||
| 78 | * ), |
||
| 79 | * array( |
||
| 80 | * array(), |
||
| 81 | * 'eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException', |
||
| 82 | * ), |
||
| 83 | * // ... |
||
| 84 | * ); |
||
| 85 | * </code> |
||
| 86 | * |
||
| 87 | * @return array |
||
| 88 | */ |
||
| 89 | abstract public function provideInvalidInputForAcceptValue(); |
||
| 90 | |||
| 91 | /** |
||
| 92 | * Data provider for valid input to acceptValue(). |
||
| 93 | * |
||
| 94 | * Returns an array of data provider sets with 2 arguments: 1. The valid |
||
| 95 | * input to acceptValue(), 2. The expected return value from acceptValue(). |
||
| 96 | * For example: |
||
| 97 | * |
||
| 98 | * <code> |
||
| 99 | * return array( |
||
| 100 | * array( |
||
| 101 | * null, |
||
| 102 | * null |
||
| 103 | * ), |
||
| 104 | * array( |
||
| 105 | * __FILE__, |
||
| 106 | * new BinaryFileValue( array( |
||
| 107 | * 'path' => __FILE__, |
||
| 108 | * 'fileName' => basename( __FILE__ ), |
||
| 109 | * 'fileSize' => filesize( __FILE__ ), |
||
| 110 | * 'downloadCount' => 0, |
||
| 111 | * 'mimeType' => 'text/plain', |
||
| 112 | * ) ) |
||
| 113 | * ), |
||
| 114 | * // ... |
||
| 115 | * ); |
||
| 116 | * </code> |
||
| 117 | * |
||
| 118 | * @return array |
||
| 119 | */ |
||
| 120 | abstract public function provideValidInputForAcceptValue(); |
||
| 121 | |||
| 122 | /** |
||
| 123 | * Provide input for the toHash() method. |
||
| 124 | * |
||
| 125 | * Returns an array of data provider sets with 2 arguments: 1. The valid |
||
| 126 | * input to toHash(), 2. The expected return value from toHash(). |
||
| 127 | * For example: |
||
| 128 | * |
||
| 129 | * <code> |
||
| 130 | * return array( |
||
| 131 | * array( |
||
| 132 | * null, |
||
| 133 | * null |
||
| 134 | * ), |
||
| 135 | * array( |
||
| 136 | * new BinaryFileValue( array( |
||
| 137 | * 'path' => 'some/file/here', |
||
| 138 | * 'fileName' => 'sindelfingen.jpg', |
||
| 139 | * 'fileSize' => 2342, |
||
| 140 | * 'downloadCount' => 0, |
||
| 141 | * 'mimeType' => 'image/jpeg', |
||
| 142 | * ) ), |
||
| 143 | * array( |
||
| 144 | * 'path' => 'some/file/here', |
||
| 145 | * 'fileName' => 'sindelfingen.jpg', |
||
| 146 | * 'fileSize' => 2342, |
||
| 147 | * 'downloadCount' => 0, |
||
| 148 | * 'mimeType' => 'image/jpeg', |
||
| 149 | * ) |
||
| 150 | * ), |
||
| 151 | * // ... |
||
| 152 | * ); |
||
| 153 | * </code> |
||
| 154 | * |
||
| 155 | * @return array |
||
| 156 | */ |
||
| 157 | abstract public function provideInputForToHash(); |
||
| 158 | |||
| 159 | /** |
||
| 160 | * Provide input to fromHash() method. |
||
| 161 | * |
||
| 162 | * Returns an array of data provider sets with 2 arguments: 1. The valid |
||
| 163 | * input to fromHash(), 2. The expected return value from fromHash(). |
||
| 164 | * For example: |
||
| 165 | * |
||
| 166 | * <code> |
||
| 167 | * return array( |
||
| 168 | * array( |
||
| 169 | * null, |
||
| 170 | * null |
||
| 171 | * ), |
||
| 172 | * array( |
||
| 173 | * array( |
||
| 174 | * 'path' => 'some/file/here', |
||
| 175 | * 'fileName' => 'sindelfingen.jpg', |
||
| 176 | * 'fileSize' => 2342, |
||
| 177 | * 'downloadCount' => 0, |
||
| 178 | * 'mimeType' => 'image/jpeg', |
||
| 179 | * ), |
||
| 180 | * new BinaryFileValue( array( |
||
| 181 | * 'path' => 'some/file/here', |
||
| 182 | * 'fileName' => 'sindelfingen.jpg', |
||
| 183 | * 'fileSize' => 2342, |
||
| 184 | * 'downloadCount' => 0, |
||
| 185 | * 'mimeType' => 'image/jpeg', |
||
| 186 | * ) ) |
||
| 187 | * ), |
||
| 188 | * // ... |
||
| 189 | * ); |
||
| 190 | * </code> |
||
| 191 | * |
||
| 192 | * @return array |
||
| 193 | */ |
||
| 194 | abstract public function provideInputForFromHash(); |
||
| 195 | |||
| 196 | /** |
||
| 197 | * Provides data for the getName() test. |
||
| 198 | * |
||
| 199 | * @return array |
||
| 200 | */ |
||
| 201 | abstract public function provideDataForGetName(): array; |
||
| 202 | |||
| 203 | /** |
||
| 204 | * Provide data sets with field settings which are considered valid by the |
||
| 205 | * {@link validateFieldSettings()} method. |
||
| 206 | * |
||
| 207 | * ATTENTION: This is a default implementation, which must be overwritten |
||
| 208 | * if a FieldType supports field settings! |
||
| 209 | * |
||
| 210 | * Returns an array of data provider sets with a single argument: A valid |
||
| 211 | * set of field settings. |
||
| 212 | * For example: |
||
| 213 | * |
||
| 214 | * <code> |
||
| 215 | * return array( |
||
| 216 | * array( |
||
| 217 | * array(), |
||
| 218 | * ), |
||
| 219 | * array( |
||
| 220 | * array( 'rows' => 2 ) |
||
| 221 | * ), |
||
| 222 | * // ... |
||
| 223 | * ); |
||
| 224 | * </code> |
||
| 225 | * |
||
| 226 | * @return array |
||
| 227 | */ |
||
| 228 | public function provideValidFieldSettings() |
||
| 236 | |||
| 237 | /** |
||
| 238 | * Provide data sets with field settings which are considered invalid by the |
||
| 239 | * {@link validateFieldSettings()} method. The method must return a |
||
| 240 | * non-empty array of validation error when receiving such field settings. |
||
| 241 | * |
||
| 242 | * ATTENTION: This is a default implementation, which must be overwritten |
||
| 243 | * if a FieldType supports field settings! |
||
| 244 | * |
||
| 245 | * Returns an array of data provider sets with a single argument: A valid |
||
| 246 | * set of field settings. |
||
| 247 | * For example: |
||
| 248 | * |
||
| 249 | * <code> |
||
| 250 | * return array( |
||
| 251 | * array( |
||
| 252 | * true, |
||
| 253 | * ), |
||
| 254 | * array( |
||
| 255 | * array( 'nonExistentKey' => 2 ) |
||
| 256 | * ), |
||
| 257 | * // ... |
||
| 258 | * ); |
||
| 259 | * </code> |
||
| 260 | * |
||
| 261 | * @return array |
||
| 262 | */ |
||
| 263 | public function provideInValidFieldSettings() |
||
| 271 | |||
| 272 | /** |
||
| 273 | * Provide data sets with validator configurations which are considered |
||
| 274 | * valid by the {@link validateValidatorConfiguration()} method. |
||
| 275 | * |
||
| 276 | * ATTENTION: This is a default implementation, which must be overwritten |
||
| 277 | * if a FieldType supports validators! |
||
| 278 | * |
||
| 279 | * Returns an array of data provider sets with a single argument: A valid |
||
| 280 | * set of validator configurations. |
||
| 281 | * |
||
| 282 | * For example: |
||
| 283 | * |
||
| 284 | * <code> |
||
| 285 | * return array( |
||
| 286 | * array( |
||
| 287 | * array(), |
||
| 288 | * ), |
||
| 289 | * array( |
||
| 290 | * array( |
||
| 291 | * 'IntegerValueValidator' => array( |
||
| 292 | * 'minIntegerValue' => 0, |
||
| 293 | * 'maxIntegerValue' => 23, |
||
| 294 | * ) |
||
| 295 | * ) |
||
| 296 | * ), |
||
| 297 | * // ... |
||
| 298 | * ); |
||
| 299 | * </code> |
||
| 300 | * |
||
| 301 | * @return array |
||
| 302 | */ |
||
| 303 | public function provideValidValidatorConfiguration() |
||
| 311 | |||
| 312 | /** |
||
| 313 | * Provide data sets with validator configurations which are considered |
||
| 314 | * invalid by the {@link validateValidatorConfiguration()} method. The |
||
| 315 | * method must return a non-empty array of valiation errors when receiving |
||
| 316 | * one of the provided values. |
||
| 317 | * |
||
| 318 | * ATTENTION: This is a default implementation, which must be overwritten |
||
| 319 | * if a FieldType supports validators! |
||
| 320 | * |
||
| 321 | * Returns an array of data provider sets with a single argument: A valid |
||
| 322 | * set of validator configurations. |
||
| 323 | * |
||
| 324 | * For example: |
||
| 325 | * |
||
| 326 | * <code> |
||
| 327 | * return array( |
||
| 328 | * array( |
||
| 329 | * array( |
||
| 330 | * 'NonExistentValidator' => array(), |
||
| 331 | * ), |
||
| 332 | * ), |
||
| 333 | * array( |
||
| 334 | * array( |
||
| 335 | * // Typos |
||
| 336 | * 'InTEgervALUeVALIdator' => array( |
||
| 337 | * 'minIntegerValue' => 0, |
||
| 338 | * 'maxIntegerValue' => 23, |
||
| 339 | * ) |
||
| 340 | * ) |
||
| 341 | * ), |
||
| 342 | * array( |
||
| 343 | * array( |
||
| 344 | * 'IntegerValueValidator' => array( |
||
| 345 | * // Incorrect value types |
||
| 346 | * 'minIntegerValue' => true, |
||
| 347 | * 'maxIntegerValue' => false, |
||
| 348 | * ) |
||
| 349 | * ) |
||
| 350 | * ), |
||
| 351 | * // ... |
||
| 352 | * ); |
||
| 353 | * </code> |
||
| 354 | * |
||
| 355 | * @return array |
||
| 356 | */ |
||
| 357 | public function provideInvalidValidatorConfiguration() |
||
| 367 | |||
| 368 | /** |
||
| 369 | * Provides data sets with validator configuration and/or field settings and |
||
| 370 | * field value which are considered valid by the {@link validate()} method. |
||
| 371 | * |
||
| 372 | * ATTENTION: This is a default implementation, which must be overwritten if |
||
| 373 | * a FieldType supports validation! |
||
| 374 | * |
||
| 375 | * For example: |
||
| 376 | * |
||
| 377 | * <code> |
||
| 378 | * return array( |
||
| 379 | * array( |
||
| 380 | * array( |
||
| 381 | * "validatorConfiguration" => array( |
||
| 382 | * "StringLengthValidator" => array( |
||
| 383 | * "minStringLength" => 2, |
||
| 384 | * "maxStringLength" => 10, |
||
| 385 | * ), |
||
| 386 | * ), |
||
| 387 | * ), |
||
| 388 | * new TextLineValue( "lalalala" ), |
||
| 389 | * ), |
||
| 390 | * array( |
||
| 391 | * array( |
||
| 392 | * "fieldSettings" => array( |
||
| 393 | * 'isMultiple' => true |
||
| 394 | * ), |
||
| 395 | * ), |
||
| 396 | * new CountryValue( |
||
| 397 | * array( |
||
| 398 | * "BE" => array( |
||
| 399 | * "Name" => "Belgium", |
||
| 400 | * "Alpha2" => "BE", |
||
| 401 | * "Alpha3" => "BEL", |
||
| 402 | * "IDC" => 32, |
||
| 403 | * ), |
||
| 404 | * ), |
||
| 405 | * ), |
||
| 406 | * ), |
||
| 407 | * // ... |
||
| 408 | * ); |
||
| 409 | * </code> |
||
| 410 | * |
||
| 411 | * @return array |
||
| 412 | */ |
||
| 413 | public function provideValidDataForValidate() |
||
| 422 | |||
| 423 | /** |
||
| 424 | * Provides data sets with validator configuration and/or field settings, |
||
| 425 | * field value and corresponding validation errors returned by |
||
| 426 | * the {@link validate()} method. |
||
| 427 | * |
||
| 428 | * ATTENTION: This is a default implementation, which must be overwritten |
||
| 429 | * if a FieldType supports validation! |
||
| 430 | * |
||
| 431 | * For example: |
||
| 432 | * |
||
| 433 | * <code> |
||
| 434 | * return array( |
||
| 435 | * array( |
||
| 436 | * array( |
||
| 437 | * "validatorConfiguration" => array( |
||
| 438 | * "IntegerValueValidator" => array( |
||
| 439 | * "minIntegerValue" => 5, |
||
| 440 | * "maxIntegerValue" => 10 |
||
| 441 | * ), |
||
| 442 | * ), |
||
| 443 | * ), |
||
| 444 | * new IntegerValue( 3 ), |
||
| 445 | * array( |
||
| 446 | * new ValidationError( |
||
| 447 | * "The value can not be lower than %size%.", |
||
| 448 | * null, |
||
| 449 | * array( |
||
| 450 | * "%size%" => 5 |
||
| 451 | * ), |
||
| 452 | * ), |
||
| 453 | * ), |
||
| 454 | * ), |
||
| 455 | * array( |
||
| 456 | * array( |
||
| 457 | * "fieldSettings" => array( |
||
| 458 | * "isMultiple" => false |
||
| 459 | * ), |
||
| 460 | * ), |
||
| 461 | * new CountryValue( |
||
| 462 | * "BE" => array( |
||
| 463 | * "Name" => "Belgium", |
||
| 464 | * "Alpha2" => "BE", |
||
| 465 | * "Alpha3" => "BEL", |
||
| 466 | * "IDC" => 32, |
||
| 467 | * ), |
||
| 468 | * "FR" => array( |
||
| 469 | * "Name" => "France", |
||
| 470 | * "Alpha2" => "FR", |
||
| 471 | * "Alpha3" => "FRA", |
||
| 472 | * "IDC" => 33, |
||
| 473 | * ), |
||
| 474 | * ) |
||
| 475 | * ), |
||
| 476 | * array( |
||
| 477 | * new ValidationError( |
||
| 478 | * "Field definition does not allow multiple countries to be selected." |
||
| 479 | * ), |
||
| 480 | * ), |
||
| 481 | * // ... |
||
| 482 | * ); |
||
| 483 | * </code> |
||
| 484 | * |
||
| 485 | * @return array |
||
| 486 | */ |
||
| 487 | public function provideInvalidDataForValidate() |
||
| 497 | |||
| 498 | /** |
||
| 499 | * Retrieves a test wide cached version of the field type under test. |
||
| 500 | * |
||
| 501 | * Uses {@link createFieldTypeUnderTest()} to create the instance |
||
| 502 | * initially. |
||
| 503 | * |
||
| 504 | * @return \eZ\Publish\SPI\FieldType\FieldType |
||
| 505 | */ |
||
| 506 | protected function getFieldTypeUnderTest() |
||
| 514 | |||
| 515 | public function testGetFieldTypeIdentifier() |
||
| 522 | |||
| 523 | /** |
||
| 524 | * @dataProvider provideDataForGetName |
||
| 525 | */ |
||
| 526 | View Code Duplication | public function testGetName(SPIValue $value, array $fieldSettings = [], string $languageCode = 'en_GB', string $expected) |
|
| 535 | |||
| 536 | public function testValidatorConfigurationSchema() |
||
| 546 | |||
| 547 | public function testSettingsSchema() |
||
| 557 | |||
| 558 | public function testEmptyValue() |
||
| 567 | |||
| 568 | /** |
||
| 569 | * @param mixed $inputValue |
||
| 570 | * @param mixed $expectedOutputValue |
||
| 571 | * |
||
| 572 | * @dataProvider provideValidInputForAcceptValue |
||
| 573 | */ |
||
| 574 | public function testAcceptValue($inputValue, $expectedOutputValue) |
||
| 586 | |||
| 587 | /** |
||
| 588 | * Tests that default empty value is unchanged by acceptValue() method. |
||
| 589 | */ |
||
| 590 | public function testAcceptGetEmptyValue() |
||
| 603 | |||
| 604 | /** |
||
| 605 | * @param mixed $inputValue |
||
| 606 | * @param \Exception $expectedException |
||
| 607 | * |
||
| 608 | * @dataProvider provideInvalidInputForAcceptValue |
||
| 609 | */ |
||
| 610 | public function testAcceptValueFailsOnInvalidValues($inputValue, $expectedException) |
||
| 635 | |||
| 636 | /** |
||
| 637 | * @param mixed $inputValue |
||
| 638 | * @param array $expectedResult |
||
| 639 | * |
||
| 640 | * @dataProvider provideInputForToHash |
||
| 641 | */ |
||
| 642 | View Code Duplication | public function testToHash($inputValue, $expectedResult) |
|
| 664 | |||
| 665 | /** |
||
| 666 | * @param mixed $inputValue |
||
| 667 | * @param array $expectedResult |
||
| 668 | * |
||
| 669 | * @dataProvider provideInputForFromHash |
||
| 670 | */ |
||
| 671 | View Code Duplication | public function testFromHash($inputHash, $expectedResult) |
|
| 693 | |||
| 694 | public function testEmptyValueIsEmpty() |
||
| 702 | |||
| 703 | /** |
||
| 704 | * @param mixed $inputSettings |
||
| 705 | * |
||
| 706 | * @dataProvider provideValidFieldSettings |
||
| 707 | */ |
||
| 708 | public function testValidateFieldSettingsValid($inputSettings) |
||
| 723 | |||
| 724 | /** |
||
| 725 | * @param mixed $inputSettings |
||
| 726 | * |
||
| 727 | * @dataProvider provideInvalidFieldSettings |
||
| 728 | */ |
||
| 729 | View Code Duplication | public function testValidateFieldSettingsInvalid($inputSettings) |
|
| 753 | |||
| 754 | /** |
||
| 755 | * @param mixed $inputConfiguration |
||
| 756 | * |
||
| 757 | * @dataProvider provideValidValidatorConfiguration |
||
| 758 | */ |
||
| 759 | public function testValidateValidatorConfigurationValid($inputConfiguration) |
||
| 774 | |||
| 775 | /** |
||
| 776 | * @param mixed $inputConfiguration |
||
| 777 | * |
||
| 778 | * @dataProvider provideInvalidValidatorConfiguration |
||
| 779 | */ |
||
| 780 | View Code Duplication | public function testValidateValidatorConfigurationInvalid($inputConfiguration) |
|
| 804 | |||
| 805 | /** |
||
| 806 | * @param mixed $inputConfiguration |
||
| 807 | * |
||
| 808 | * @dataProvider provideValidFieldSettings |
||
| 809 | */ |
||
| 810 | public function testFieldSettingsToHash($inputSettings) |
||
| 818 | |||
| 819 | /** |
||
| 820 | * @param mixed $inputConfiguration |
||
| 821 | * |
||
| 822 | * @dataProvider provideValidValidatorConfiguration |
||
| 823 | */ |
||
| 824 | public function testValidatorConfigurationToHash($inputConfiguration) |
||
| 832 | |||
| 833 | /** |
||
| 834 | * @param mixed $inputConfiguration |
||
| 835 | * |
||
| 836 | * @dataProvider provideValidFieldSettings |
||
| 837 | */ |
||
| 838 | public function testFieldSettingsFromHash($inputSettings) |
||
| 847 | |||
| 848 | /** |
||
| 849 | * @param mixed $inputConfiguration |
||
| 850 | * |
||
| 851 | * @dataProvider provideValidValidatorConfiguration |
||
| 852 | */ |
||
| 853 | public function testValidatorConfigurationFromHash($inputConfiguration) |
||
| 862 | |||
| 863 | /** |
||
| 864 | * Asserts that the given $actualHash complies to the rules for hashes. |
||
| 865 | * |
||
| 866 | * @param mixed $actualHash |
||
| 867 | * @param array $keyChain |
||
| 868 | */ |
||
| 869 | protected function assertIsValidHashValue($actualHash, $keyChain = []) |
||
| 901 | |||
| 902 | /** |
||
| 903 | * @dataProvider provideValidDataForValidate |
||
| 904 | */ |
||
| 905 | public function testValidateValid($fieldDefinitionData, $value) |
||
| 912 | |||
| 913 | /** |
||
| 914 | * @dataProvider provideInvalidDataForValidate |
||
| 915 | */ |
||
| 916 | public function testValidateInvalid($fieldDefinitionData, $value, $errors) |
||
| 923 | |||
| 924 | protected function doValidate($fieldDefinitionData, $value) |
||
| 951 | |||
| 952 | /** |
||
| 953 | * @return \eZ\Publish\API\Repository\Values\ContentType\FieldDefinition|\PHPUnit\Framework\MockObject\MockObject |
||
| 954 | */ |
||
| 955 | protected function getFieldDefinitionMock(array $fieldSettings) |
||
| 965 | |||
| 966 | // @todo: More test methods … |
||
| 967 | } |
||
| 968 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.