Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • project/date_recur
  • issue/date_recur-3173876
  • issue/date_recur-3193288
  • issue/date_recur-3167866
  • issue/date_recur-3193440
  • issue/date_recur-3200528
  • issue/date_recur-3030603
  • issue/date_recur-3201310
  • issue/date_recur-3166458
  • issue/date_recur-3240193
  • issue/date_recur-3158733
  • issue/date_recur-3220728
  • issue/date_recur-3217384
  • issue/date_recur-3250423
  • issue/date_recur-3050030
  • issue/date_recur-3251503
  • issue/date_recur-3175227
  • issue/date_recur-3153976
  • issue/date_recur-3074723
  • issue/date_recur-3205682
  • issue/date_recur-3262658
  • issue/date_recur-3303231
  • issue/date_recur-3313233
  • issue/date_recur-3328422
  • issue/date_recur-3312547
  • issue/date_recur-3400305
  • issue/date_recur-3374535
  • issue/date_recur-3381573
  • issue/date_recur-3382482
  • issue/date_recur-3402699
  • issue/date_recur-3420827
  • issue/date_recur-3425292
  • issue/date_recur-3010184
  • issue/date_recur-3455189
  • issue/date_recur-3485912
  • issue/date_recur-3498936
  • issue/date_recur-3501607
  • issue/date_recur-3505857
  • issue/date_recur-3486727
  • issue/date_recur-3518068
40 results
Show changes
Commits on Source (7)
Showing
with 86 additions and 60 deletions
BYDAY
BYHOUR
BYMINUTE
BYMONTH
BYMONTHDAY
BYSECOND
BYSETPOS
BYWEEKNO
BYYEARDAY
Chuuk
DDTHH
DTSTART
EXDATE
Exdate
exdate
EXRULE
Granularities
granularities
Kaya
Lanvin
Moresby
myfield
Precreate
precreate
RDATE
Rdate
Rdates
Rlanvin
rlanvin
RRULE
Rrule
rrule
RRULE's
RRULEs
weekdaily
WKST
...@@ -49,6 +49,9 @@ include: ...@@ -49,6 +49,9 @@ include:
################ ################
# variables: # variables:
# SKIP_ESLINT: '1' # SKIP_ESLINT: '1'
variables:
# https://git.drupalcode.org/project/gitlab_templates/-/commit/1b6e9ff965a417882c3142453a647008b6902c0f
IGNORE_PROJECT_DRUPAL_CORE_VERSION: 1
################################################################################### ###################################################################################
......
...@@ -22,17 +22,17 @@ deploystacks: ...@@ -22,17 +22,17 @@ deploystacks:
# from `include.drupalci.variables.yml`. Until then define the strings # from `include.drupalci.variables.yml`. Until then define the strings
# manually https://gitlab.com/gitlab-org/gitlab/-/issues/11549 # manually https://gitlab.com/gitlab-org/gitlab/-/issues/11549
# Valid tags for databases are at https://git.drupalcode.org/project/drupalci_environments/-/tree/dev/db # Valid tags for databases are at https://git.drupalcode.org/project/drupalci_environments/-/tree/dev/db
- _TARGET_CORE: ["10.2.x-dev"] - _TARGET_CORE: ["11.x-dev" ]
_TARGET_PHP: [ "8.1", "8.2"] _TARGET_PHP: [ "8.3" ]
_TARGET_DB_TYPE: "mysql" _TARGET_DB_TYPE: "mysql"
_TARGET_DB_VERSION: "5.7" _TARGET_DB_VERSION: "8"
- _TARGET_CORE: ["10.2.x-dev"] - _TARGET_CORE: ["10.3.x-dev" ]
_TARGET_PHP: [ "8.1"] _TARGET_PHP: [ "8.3" ]
_TARGET_DB_TYPE: "pgsql" _TARGET_DB_TYPE: "pgsql"
_TARGET_DB_VERSION: "16" _TARGET_DB_VERSION: "16"
- _TARGET_CORE: ["10.2.x-dev"] - _TARGET_CORE: ["10.3.x-dev" ]
_TARGET_PHP: [ "8.1"] _TARGET_PHP: [ "8.3" ]
_TARGET_DB_TYPE: "sqlite" _TARGET_DB_TYPE: "sqlite"
_TARGET_DB_VERSION: "3" _TARGET_DB_VERSION: "3"
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
} }
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.3",
"drupal/core": "^10.2", "drupal/core": "^10.3 || ^11",
"rlanvin/php-rrule": "^2" "rlanvin/php-rrule": "^2"
}, },
"require-dev": { "require-dev": {
"composer/installers": "^2", "composer/installers": "^2",
"dealerdirect/phpcodesniffer-composer-installer": "^1", "dealerdirect/phpcodesniffer-composer-installer": "^1",
"drupal/core-dev": "^10.1", "drupal/core-dev": "^10.3 || ^11",
"drupal/token": "^1.5", "drupal/token": "^1.5",
"micheh/phpcs-gitlab": "^1.1", "micheh/phpcs-gitlab": "^1.1",
"mockery/mockery": "^1.5", "mockery/mockery": "^1.5",
......
name: Recurring Dates Field name: Recurring Dates Field
type: module type: module
description: Provides a recurring/repeating dates field. description: Provides a recurring/repeating dates field.
core_version_requirement: ^10.2 core_version_requirement: '^10.3 || ^11'
php: 8.1 php: 8.3
package: Field types package: Field types
dependencies: dependencies:
- drupal:system (>=9.0.x) - drupal:system (>=9.0.x)
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
* Install, update and uninstall functions for date_recur module. * Install, update and uninstall functions for date_recur module.
*/ */
declare(strict_types = 1); declare(strict_types=1);
use Drupal\Core\Database\SchemaObjectExistsException;
use Drupal\Core\Datetime\Entity\DateFormat; use Drupal\Core\Datetime\Entity\DateFormat;
use Drupal\Core\Entity\Entity\EntityFormDisplay; use Drupal\Core\Entity\Entity\EntityFormDisplay;
use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\Entity\Entity\EntityViewDisplay;
...@@ -404,7 +405,13 @@ function date_recur_update_8208(&$sandbox): void { ...@@ -404,7 +405,13 @@ function date_recur_update_8208(&$sandbox): void {
// Iterate over all date_recur field definitions for this entity type. // Iterate over all date_recur field definitions for this entity type.
foreach ($fieldDefinitions as $fieldDefinition) { foreach ($fieldDefinitions as $fieldDefinition) {
$tableName = DateRecurOccurrences::getOccurrenceCacheStorageTableName($fieldDefinition); $tableName = DateRecurOccurrences::getOccurrenceCacheStorageTableName($fieldDefinition);
$schema->addPrimaryKey($tableName, $primaryKey); try {
$schema->addPrimaryKey($tableName, $primaryKey);
}
catch (SchemaObjectExistsException $e) {
// Somehow people already have primary keys set, so ignore.
continue;
}
} }
} }
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Contains hooks for date_recur module. * Contains hooks for date_recur module.
*/ */
declare(strict_types = 1); declare(strict_types=1);
use Drupal\Core\Render\Element; use Drupal\Core\Render\Element;
use Drupal\date_recur\DateRecurCachedHooks; use Drupal\date_recur\DateRecurCachedHooks;
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ruleset name="My Coding Standard"> <ruleset name="My Coding Standard">
<file>./date_recur.install</file>
<file>./date_recur.module</file>
<file>./src</file> <file>./src</file>
<file>./tests</file> <file>./tests</file>
<rule ref="PreviousNextDrupal" /> <rule ref="PreviousNextDrupal" />
......
...@@ -460,36 +460,11 @@ parameters: ...@@ -460,36 +460,11 @@ parameters:
count: 1 count: 1
path: tests/src/Functional/DateRecurBasicWidgetTest.php path: tests/src/Functional/DateRecurBasicWidgetTest.php
-
message: "#^Call to an undefined method Drupal\\\\Tests\\\\WebAssert\\:\\:waitForElementVisible\\(\\)\\.$#"
count: 1
path: tests/src/Functional/DateRecurInterpreterTest.php
-
message: "#^Parameter \\#1 \\$button of method Drupal\\\\Tests\\\\WebAssert\\:\\:buttonExists\\(\\) expects string, Drupal\\\\Core\\\\StringTranslation\\\\TranslatableMarkup given\\.$#"
count: 1
path: tests/src/Functional/DateRecurInterpreterTest.php
-
message: "#^Parameter \\#1 \\$button of method Drupal\\\\Tests\\\\WebAssert\\:\\:buttonNotExists\\(\\) expects string, Drupal\\\\Core\\\\StringTranslation\\\\TranslatableMarkup given\\.$#"
count: 1
path: tests/src/Functional/DateRecurInterpreterTest.php
-
message: "#^Parameter \\#2 \\$submit of method Drupal\\\\Tests\\\\BrowserTestBase\\:\\:submitForm\\(\\) expects string, Drupal\\\\Core\\\\StringTranslation\\\\TranslatableMarkup given\\.$#"
count: 2
path: tests/src/Functional/DateRecurInterpreterTest.php
- -
message: "#^Property Drupal\\\\date_recur_entity_test\\\\Entity\\\\DrEntityTest\\:\\:\\$dr \\(Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\) does not accept array\\<string, string\\>\\.$#" message: "#^Property Drupal\\\\date_recur_entity_test\\\\Entity\\\\DrEntityTest\\:\\:\\$dr \\(Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\) does not accept array\\<string, string\\>\\.$#"
count: 1 count: 1
path: tests/src/Kernel/DateRecurBaseFieldTest.php path: tests/src/Kernel/DateRecurBaseFieldTest.php
-
message: "#^Parameter \\#1 \\$content of method Drupal\\\\KernelTests\\\\KernelTestBase\\:\\:setRawContent\\(\\) expects string, Drupal\\\\Component\\\\Render\\\\MarkupInterface given\\.$#"
count: 1
path: tests/src/Kernel/DateRecurBasicFormatterTest.php
- -
message: "#^Property Drupal\\\\date_recur_entity_test\\\\Entity\\\\DrEntityTest\\:\\:\\$dr \\(Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\) does not accept array\\<int, array\\<string, string\\>\\>\\.$#" message: "#^Property Drupal\\\\date_recur_entity_test\\\\Entity\\\\DrEntityTest\\:\\:\\$dr \\(Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\) does not accept array\\<int, array\\<string, string\\>\\>\\.$#"
count: 2 count: 2
......
...@@ -7,8 +7,6 @@ parameters: ...@@ -7,8 +7,6 @@ parameters:
- src - src
- tests - tests
reportUnmatchedIgnoredErrors: true reportUnmatchedIgnoredErrors: true
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
fileExtensions: fileExtensions:
- php - php
- module - module
...@@ -42,4 +40,9 @@ parameters: ...@@ -42,4 +40,9 @@ parameters:
scanDirectories: scanDirectories:
- vendor/rlanvin/php-rrule/ - vendor/rlanvin/php-rrule/
- web/core/ - web/core/
ignoreErrors:
-
identifier: missingType.generics
-
identifier: missingType.iterableValue
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur\Annotation; namespace Drupal\date_recur\Annotation;
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
...@@ -11,7 +11,7 @@ use Drupal\date_recur\Rl\RlHelper; ...@@ -11,7 +11,7 @@ use Drupal\date_recur\Rl\RlHelper;
* Helper for recurring rules. * Helper for recurring rules.
* *
* Provides a helper for getting occurrences from a RRULE. The class can be * Provides a helper for getting occurrences from a RRULE. The class can be
* iterated apon, producing occurrence objects beginning at the first * iterated upon, producing occurrence objects beginning at the first
* occurrence. * occurrence.
* *
* This helper is a proxy to the default helper. It should be used if there is * This helper is a proxy to the default helper. It should be used if there is
...@@ -46,7 +46,7 @@ final class DateRecurHelper implements DateRecurHelperInterface { ...@@ -46,7 +46,7 @@ final class DateRecurHelper implements DateRecurHelperInterface {
* @throws \Exception * @throws \Exception
* Throws various exceptions if string is invalid. * Throws various exceptions if string is invalid.
*/ */
public static function create(string $string, \DateTimeInterface $dtStart, \DateTimeInterface $dtStartEnd = NULL): static { public static function create(string $string, \DateTimeInterface $dtStart, ?\DateTimeInterface $dtStartEnd = NULL): static {
// @todo Get the helper preference from Drupal module config. // @todo Get the helper preference from Drupal module config.
/** @var \Drupal\date_recur\DateRecurHelperInterface $dateRecurHelper */ /** @var \Drupal\date_recur\DateRecurHelperInterface $dateRecurHelper */
$dateRecurHelper = RlHelper::createInstance($string, $dtStart, $dtStartEnd); $dateRecurHelper = RlHelper::createInstance($string, $dtStart, $dtStartEnd);
...@@ -87,7 +87,7 @@ final class DateRecurHelper implements DateRecurHelperInterface { ...@@ -87,7 +87,7 @@ final class DateRecurHelper implements DateRecurHelperInterface {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getOccurrences(\DateTimeInterface $rangeStart = NULL, ?\DateTimeInterface $rangeEnd = NULL, ?int $limit = NULL): array { public function getOccurrences(?\DateTimeInterface $rangeStart = NULL, ?\DateTimeInterface $rangeEnd = NULL, ?int $limit = NULL): array {
return $this->dateRecurHelper->getOccurrences($rangeStart, $rangeEnd, $limit); return $this->dateRecurHelper->getOccurrences($rangeStart, $rangeEnd, $limit);
} }
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
...@@ -73,7 +73,7 @@ interface DateRecurHelperInterface extends \Iterator { ...@@ -73,7 +73,7 @@ interface DateRecurHelperInterface extends \Iterator {
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* Exceptions thrown if ranges are invalid or undefined. * Exceptions thrown if ranges are invalid or undefined.
*/ */
public function getOccurrences(\DateTimeInterface $rangeStart = NULL, ?\DateTimeInterface $rangeEnd = NULL, ?int $limit = NULL): array; public function getOccurrences(?\DateTimeInterface $rangeStart = NULL, ?\DateTimeInterface $rangeEnd = NULL, ?int $limit = NULL): array;
/** /**
* Get excluded dates. * Get excluded dates.
...@@ -83,7 +83,7 @@ interface DateRecurHelperInterface extends \Iterator { ...@@ -83,7 +83,7 @@ interface DateRecurHelperInterface extends \Iterator {
* dates in the same time zone as the initial dates. * dates in the same time zone as the initial dates.
* *
* Implementors of this method are responsible for ensuring time zone is * Implementors of this method are responsible for ensuring time zone is
* normalised. * normalized.
* *
* @return \DateTimeInterface[] * @return \DateTimeInterface[]
* An array of excluded dates. * An array of excluded dates.
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
...@@ -26,7 +26,7 @@ class DateRecurNonRecurringHelper implements DateRecurHelperInterface { ...@@ -26,7 +26,7 @@ class DateRecurNonRecurringHelper implements DateRecurHelperInterface {
*/ */
public function __construct( public function __construct(
\DateTimeInterface $dtStart, \DateTimeInterface $dtStart,
\DateTimeInterface $dtStartEnd = NULL, ?\DateTimeInterface $dtStartEnd = NULL,
) { ) {
$dtStartEnd ??= clone $dtStart; $dtStartEnd ??= clone $dtStart;
$this->occurrences = [new DateRange($dtStart, $dtStartEnd)]; $this->occurrences = [new DateRange($dtStart, $dtStartEnd)];
...@@ -80,7 +80,7 @@ class DateRecurNonRecurringHelper implements DateRecurHelperInterface { ...@@ -80,7 +80,7 @@ class DateRecurNonRecurringHelper implements DateRecurHelperInterface {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getOccurrences(\DateTimeInterface $rangeStart = NULL, ?\DateTimeInterface $rangeEnd = NULL, ?int $limit = NULL): array { public function getOccurrences(?\DateTimeInterface $rangeStart = NULL, ?\DateTimeInterface $rangeEnd = NULL, ?int $limit = NULL): array {
if (isset($limit) && (!is_int($limit) || $limit < 0)) { if (isset($limit) && (!is_int($limit) || $limit < 0)) {
// Limit must be a number and more than one. // Limit must be a number and more than one.
throw new \InvalidArgumentException('Invalid count limit.'); throw new \InvalidArgumentException('Invalid count limit.');
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
...@@ -407,7 +407,7 @@ class DateRecurOccurrences implements EventSubscriberInterface, EntityTypeListen ...@@ -407,7 +407,7 @@ class DateRecurOccurrences implements EventSubscriberInterface, EntityTypeListen
protected function getBaseFieldStorages(ContentEntityTypeInterface $entityType): array { protected function getBaseFieldStorages(ContentEntityTypeInterface $entityType): array {
$baseFields = $this->entityFieldManager->getBaseFieldDefinitions($entityType->id()); $baseFields = $this->entityFieldManager->getBaseFieldDefinitions($entityType->id());
$baseFields = array_filter($baseFields, $baseFields = array_filter($baseFields,
fn (FieldDefinitionInterface $fieldDefinition): bool => $this->isDateRecur($fieldDefinition->getFieldStorageDefinition()) fn (FieldDefinitionInterface $fieldDefinition): bool => $this->isDateRecur($fieldDefinition->getFieldStorageDefinition()),
); );
return array_map( return array_map(
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
......
<?php <?php
declare(strict_types = 1); declare(strict_types=1);
namespace Drupal\date_recur; namespace Drupal\date_recur;
......