From fdf37b66176d79c3ec03d996fff7b4642b1bb793 Mon Sep 17 00:00:00 2001 From: Tatsuyuki Ishi Date: Sat, 14 May 2022 17:35:56 +0900 Subject: [PATCH 01/49] Add feedId to EVENT_AFTER_PARSE_FEED Close #1107 (cherry picked from commit b472eaba2892cd7727fa9b62c85dbcac4df3f967) --- src/services/DataTypes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/DataTypes.php b/src/services/DataTypes.php index 374d5325..f126a631 100644 --- a/src/services/DataTypes.php +++ b/src/services/DataTypes.php @@ -230,6 +230,7 @@ public function getFeedData($feedModel, $usePrimaryElement = true) $event = new FeedDataEvent([ 'url' => $feedModel->feedUrl, 'response' => $feedDataResponse, + 'feedId' => $feedModel->id, ]); Event::trigger(static::class, self::EVENT_AFTER_PARSE_FEED, $event); From eab291101cfca9aa5220f49c9af67468a25bc769 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Tue, 17 May 2022 16:38:00 -0700 Subject: [PATCH 02/49] Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 870f8220..d984163c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes for Feed Me 4.x +## Unreleased + +### Changed +- The `EVENT_AFTER_PARSE_FEED` event now passes in the feed’s ID. ([#1107](https://github.com/craftcms/feed-me/issues/1107)) + ## 4.5.1 - 2022-05-05 ### Fixed From 116ee940f582d59651bd6b4130364fb7b8c33025 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Tue, 17 May 2022 16:38:47 -0700 Subject: [PATCH 03/49] 4.5.2 --- CHANGELOG.md | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d984163c..8aa76edb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes for Feed Me 4.x -## Unreleased +## 4.5.2 - 2022-05-17 ### Changed - The `EVENT_AFTER_PARSE_FEED` event now passes in the feed’s ID. ([#1107](https://github.com/craftcms/feed-me/issues/1107)) diff --git a/composer.json b/composer.json index 300b6e21..ac6842d9 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "craftcms/feed-me", "description": "Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.", "type": "craft-plugin", - "version": "4.5.1", + "version": "4.5.2", "keywords": [ "craft", "cms", From 6b2dc5d49f2cc7a708251624d83a46239791eaef Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Tue, 31 May 2022 12:11:50 -0700 Subject: [PATCH 04/49] Backport some fixes from v5 --- CHANGELOG.md | 6 +++++ src/fields/Assets.php | 59 ++++++++++++++++++++----------------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aa76edb..8d312e97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Release Notes for Feed Me 4.x +## Unreleased + +### Fixed +- Fixed a PHP error that could occur when importing a base64-encoded asset. +- Fixed a bug where asset file names were getting normalized before searching for an existing asset when the feed specified a file path. ([#847](https://github.com/craftcms/feed-me/issues/847)) + ## 4.5.2 - 2022-05-17 ### Changed diff --git a/src/fields/Assets.php b/src/fields/Assets.php index 945ab883..11547ded 100644 --- a/src/fields/Assets.php +++ b/src/fields/Assets.php @@ -11,8 +11,8 @@ use craft\feedme\base\FieldInterface; use craft\feedme\helpers\AssetHelper; use craft\feedme\Plugin; -use craft\helpers\Assets as AssetsHelper; use craft\helpers\Db; +use craft\helpers\Json; use craft\helpers\UrlHelper; /** @@ -128,48 +128,43 @@ public function parseField() } } - // If we're uploading files, this will need to be an absolute URL. If it is, save until later. - // We also don't check for existing assets here, so break out instantly. - if ($upload && UrlHelper::isAbsoluteUrl($dataValue)) { - $urlsToUpload[$key] = $dataValue; - - // If we're opting to use the already uploaded asset, we can check here - if ($conflict === AssetElement::SCENARIO_INDEX) { - $dataValue = AssetHelper::getRemoteUrlFilename($dataValue); - } - } - - // Check if the URL is actually an base64 encoded file. - $matches = []; + // Check if the URL is actually a base64 encoded file. preg_match('/^data:\w+\/\w+;base64,/i', $dataValue, $matches); if ($upload && count($matches) > 0) { $base64ToUpload[$key] = $dataValue; - } - - $filename = AssetsHelper::prepareAssetName($dataValue); + } else { + // If we're uploading files, this will need to be an absolute URL. If it is, save until later. + // We also don't check for existing assets here, so break out instantly. + if ($upload && UrlHelper::isAbsoluteUrl($dataValue)) { + $urlsToUpload[$key] = $dataValue; + $filename = AssetHelper::getRemoteUrlFilename($dataValue); + } else { + $filename = basename($dataValue); + } - $criteria['status'] = null; - $criteria['folderId'] = $folderIds; - $criteria['kind'] = $settings['allowedKinds']; - $criteria['limit'] = $limit; - $criteria['filename'] = $filename; - $criteria['includeSubfolders'] = true; + $criteria['status'] = null; + $criteria['folderId'] = $folderIds; + $criteria['kind'] = $settings['allowedKinds']; + $criteria['limit'] = $limit; + $criteria['filename'] = $filename; + $criteria['includeSubfolders'] = true; - Craft::configure($query, $criteria); + Craft::configure($query, $criteria); - Plugin::info('Search for existing asset with query `{i}`', ['i' => json_encode($criteria)]); + Plugin::info('Search for existing asset with query `{i}`', ['i' => Json::encode($criteria)]); - $ids = $query->ids(); - $foundElements = array_merge($foundElements, $ids); + $ids = $query->ids(); + $foundElements = array_merge($foundElements, $ids); - Plugin::info('Found `{i}` existing assets: `{j}`', ['i' => count($foundElements), 'j' => json_encode($foundElements)]); + Plugin::info('Found `{i}` existing assets: `{j}`', ['i' => count($foundElements), 'j' => Json::encode($foundElements)]); - // Are we uploading, and did we find existing assets? No need to process - if ($upload && $ids && $conflict === AssetElement::SCENARIO_INDEX) { - unset($urlsToUpload[$key]); + // Are we uploading, and did we find existing assets? No need to process + if ($upload && $ids && $conflict === AssetElement::SCENARIO_INDEX) { + unset($urlsToUpload[$key]); - Plugin::info('Skipping asset upload (already exists).'); + Plugin::info('Skipping asset upload (already exists).'); + } } } From 1cc8bab6b9bb16285678c5a4c3384edcb34c95d2 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Tue, 31 May 2022 12:13:51 -0700 Subject: [PATCH 05/49] 4.5.3 --- CHANGELOG.md | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d312e97..a2159dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes for Feed Me 4.x -## Unreleased +## 4.5.3 - 2022-05-31 ### Fixed - Fixed a PHP error that could occur when importing a base64-encoded asset. diff --git a/composer.json b/composer.json index ac6842d9..23bab8a7 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "craftcms/feed-me", "description": "Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.", "type": "craft-plugin", - "version": "4.5.2", + "version": "4.5.3", "keywords": [ "craft", "cms", From e4020f6d4a19831f67b3ad7e61100b619493c4e7 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Fri, 1 Jul 2022 17:09:28 -0700 Subject: [PATCH 06/49] Fixed a PHP error that could occur when using the `--continue-on-error` flag on the `feed-me/feeds/queue` CLI command. --- CHANGELOG.md | 5 +++++ src/services/Process.php | 34 ++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2159dc8..fb16dcab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes for Feed Me 4.x +## Unreleased + +### Fixed +- Fixed a PHP error that could occur when using the `--continue-on-error` flag on the `feed-me/feeds/queue` CLI command. + ## 4.5.3 - 2022-05-31 ### Fixed diff --git a/src/services/Process.php b/src/services/Process.php index 0e22b193..b26cee29 100644 --- a/src/services/Process.php +++ b/src/services/Process.php @@ -524,22 +524,24 @@ public function afterProcessFeed($settings, $feed, $processedElementIds) return; } - $elementsToDeleteDisable = array_diff($settings['existingElements'], $processedElementIds); - - if ($elementsToDeleteDisable) { - if (DuplicateHelper::isDisable($feed)) { - $this->_service->disable($elementsToDeleteDisable); - $message = 'The following elements have been disabled: ' . json_encode($elementsToDeleteDisable) . '.'; - } elseif (DuplicateHelper::isDisableForSite($feed)) { - $this->_service->disableForSite($elementsToDeleteDisable); - $message = 'The following elements have been disabled for the target site: ' . json_encode($elementsToDeleteDisable) . '.'; - } else { - $this->_service->delete($elementsToDeleteDisable); - $message = 'The following elements have been deleted: ' . json_encode($elementsToDeleteDisable) . '.'; - } + if ($processedElementIds) { + $elementsToDeleteDisable = array_diff($settings['existingElements'], $processedElementIds); + + if ($elementsToDeleteDisable) { + if (DuplicateHelper::isDisable($feed)) { + $this->_service->disable($elementsToDeleteDisable); + $message = 'The following elements have been disabled: ' . json_encode($elementsToDeleteDisable) . '.'; + } elseif (DuplicateHelper::isDisableForSite($feed)) { + $this->_service->disableForSite($elementsToDeleteDisable); + $message = 'The following elements have been disabled for the target site: ' . json_encode($elementsToDeleteDisable) . '.'; + } else { + $this->_service->delete($elementsToDeleteDisable); + $message = 'The following elements have been deleted: ' . json_encode($elementsToDeleteDisable) . '.'; + } - Plugin::info($message); - Plugin::debug($message); + Plugin::info($message); + Plugin::debug($message); + } } // Log the total time taken to process the feed @@ -548,7 +550,7 @@ public function afterProcessFeed($settings, $feed, $processedElementIds) Plugin::$stepKey = null; - $message = 'Processing ' . count($processedElementIds) . ' elements finished in ' . $execution_time . 's'; + $message = 'Processing ' . ($processedElementIds ? count($processedElementIds) : 0) . ' elements finished in ' . $execution_time . 's'; Plugin::info($message); Plugin::debug($message); From 2dd9685ad29b8c61ca12c1401e452ecb76b5c0b3 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Wed, 4 Jan 2023 17:10:33 -0600 Subject: [PATCH 07/49] `fruitstudios` -> `presseddigital` --- src/fields/Linkit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fields/Linkit.php b/src/fields/Linkit.php index 7fa4dd63..12e8cabb 100644 --- a/src/fields/Linkit.php +++ b/src/fields/Linkit.php @@ -24,7 +24,7 @@ class Linkit extends Field implements FieldInterface /** * @var string */ - public static $class = 'fruitstudios\linkit\fields\LinkitField'; + public static $class = 'presseddigital\linkit\fields\LinkitField'; // Templates @@ -60,9 +60,9 @@ public function parseField() if ($preppedData) { // Handle Link Type - $preppedData['type'] = empty($preppedData['type'] ?? '') ? 'fruitstudios\linkit\models\Url' : $preppedData['type']; + $preppedData['type'] = empty($preppedData['type'] ?? '') ? 'presseddigital\linkit\models\Url' : $preppedData['type']; if (strpos($preppedData['type'], '\\') === false) { - $preppedData['type'] = 'fruitstudios\\linkit\\models\\' . ucfirst(strtolower(trim($preppedData['type']))); + $preppedData['type'] = 'presseddigital\\linkit\\models\\' . ucfirst(strtolower(trim($preppedData['type']))); } // Handle Link Target From 812d3af870167f196dff2ddab6df9e784df7c4ca Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 9 Jan 2023 11:57:12 -0800 Subject: [PATCH 08/49] backport some fixes from v5 --- CHANGELOG.md | 4 +++- src/services/Process.php | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb16dcab..52ebbb8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,9 @@ ## Unreleased ### Fixed -- Fixed a PHP error that could occur when using the `--continue-on-error` flag on the `feed-me/feeds/queue` CLI command. +- Fixed a PHP error that could occur when using the `--continue-on-error` flag on the `feed-me/feeds/queue` CLI command. +- Fixed a bug where sites in a Site Group would all have their statuses updated when a feed was targeting a single site. ([#1208](https://github.com/craftcms/feed-me/issues/1208)) +- Fixed importing using the LinkIt plugin. ([#1203](https://github.com/craftcms/feed-me/issues/1203)) ## 4.5.3 - 2022-05-31 diff --git a/src/services/Process.php b/src/services/Process.php index b26cee29..e897e417 100644 --- a/src/services/Process.php +++ b/src/services/Process.php @@ -380,6 +380,9 @@ public function processFeed($step, $feed, &$processedElementIds, $feedData = nul } $enabledForSite[$element->siteId] = $attributeData['enabled']; + + // Set the global status to true if it's enabled for *any* sites, or if already enabled. + $element->enabled = in_array(true, $enabledForSite) || $element->enabled; $element->setEnabledForSite($enabledForSite); } From ca196331cc5fdb0e8944820ea0eb25147fd4e1fa Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 9 Jan 2023 12:16:12 -0800 Subject: [PATCH 09/49] 4.5.4 --- CHANGELOG.md | 2 ++ composer.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ebbb8d..3f1aa63b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.5.4 - 2023-01-09 + ### Fixed - Fixed a PHP error that could occur when using the `--continue-on-error` flag on the `feed-me/feeds/queue` CLI command. - Fixed a bug where sites in a Site Group would all have their statuses updated when a feed was targeting a single site. ([#1208](https://github.com/craftcms/feed-me/issues/1208)) diff --git a/composer.json b/composer.json index 23bab8a7..a32319d8 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "craftcms/feed-me", "description": "Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.", "type": "craft-plugin", - "version": "4.5.3", + "version": "4.5.4", "keywords": [ "craft", "cms", From 240fb5390b375b7c1154ebb9e2e89dee696cd0a2 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Mon, 9 Jan 2023 14:49:24 -0600 Subject: [PATCH 10/49] Add field events --- docs/developers/events.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/developers/events.md b/docs/developers/events.md index 6e95b061..03868c2d 100644 --- a/docs/developers/events.md +++ b/docs/developers/events.md @@ -153,3 +153,33 @@ Event::on(Process::class, Process::EVENT_STEP_AFTER_ELEMENT_SAVE, function(FeedP }); ``` + +## Field parsing related events + +### The `beforeParseField` event + +Triggered before a field value is parsed. Plugins can get notified before a field value is parsed. + +```php +use craft\feedme\events\FieldEvent; +use craft\feedme\services\Fields; +use yii\base\Event; + +Event::on(Fields::class, Fields::EVENT_BEFORE_PARSE_FIELD, function(FieldEvent $event) { + +}); +``` + +### The `afterParseField` event + +Triggered after a field value is parsed. Plugins can get notified before a field value is parsed and alter the parsed value. + +```php +use craft\feedme\events\FieldEvent; +use craft\feedme\services\Fields; +use yii\base\Event; + +Event::on(Fields::class, Fields::EVENT_AFTER_PARSE_FIELD, function(FieldEvent $event) { + +}); +``` \ No newline at end of file From b1367140f980bcf869cd051b93ab9096e67995bd Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Fri, 20 Jan 2023 13:36:13 -0600 Subject: [PATCH 11/49] Compare $attributes not $fields Same fix as #1218, just onto the v4 branch instead. @boudewijn-zicht deserves all the credit. --- src/helpers/DataHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index c45d265b..f251c49e 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -224,7 +224,7 @@ public static function compareElementContent($content, $element) $existingValue = $groups; } - if (self::_compareSimpleValues($fields, $key, $existingValue, $newValue)) { + if (self::_compareSimpleValues($attributes, $key, $existingValue, $newValue)) { unset($trackedChanges[$key]); continue; } From 22ff3f8a597672d4fcf95b09332a2889589d9eb2 Mon Sep 17 00:00:00 2001 From: dlarimore Date: Wed, 19 Jan 2022 16:26:48 -0500 Subject: [PATCH 12/49] Added settings option enableStringReplace so empty strings overwrite data --- src/helpers/DataHelper.php | 5 +++++ src/models/Settings.php | 5 +++++ src/templates/settings/general.html | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index c45d265b..81dd118b 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -147,6 +147,11 @@ public static function fetchValue($feedData, $fieldInfo) $value = $default; } + // If emptyStringReplace setting is enabled, send $value overwrite existing data + if ($value === "" && Plugin::$plugin->getSettings()->emptyStringReplace) { + return $value; + } + // We want to preserve 0 and '0', but if it's empty, return null. // https://github.com/craftcms/feed-me/issues/779 if (!is_numeric($value) && empty($value)) { diff --git a/src/models/Settings.php b/src/models/Settings.php index e066e997..749783aa 100644 --- a/src/models/Settings.php +++ b/src/models/Settings.php @@ -19,6 +19,11 @@ class Settings extends Model */ public $cache = 60; + /** + * @var bool + */ + public $emptyStringReplace = false; + /** * @var string */ diff --git a/src/templates/settings/general.html b/src/templates/settings/general.html index 0ce39619..de7da7da 100755 --- a/src/templates/settings/general.html +++ b/src/templates/settings/general.html @@ -28,6 +28,12 @@ instructions: 'Cache duration (in seconds) to cache requests. Note: this only affects calls using the template tag - requests are never cached when triggering directly via the CP.'|t('feed-me'), }) }} + {{ forms.lightswitchField({ + label: 'Empty strings overwrite previous values'|t('feed-me'), + name: 'emptyStringReplace', + on: settings.emptyStringReplace + }) }} +
{{ forms.checkboxSelectField({ From c5a28d8f395bf263ef26fd2edc33abd8c22315e4 Mon Sep 17 00:00:00 2001 From: dlarimore Date: Wed, 19 Jan 2022 16:38:12 -0500 Subject: [PATCH 13/49] Field description --- src/templates/settings/general.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/templates/settings/general.html b/src/templates/settings/general.html index de7da7da..de72de46 100755 --- a/src/templates/settings/general.html +++ b/src/templates/settings/general.html @@ -29,7 +29,8 @@ }) }} {{ forms.lightswitchField({ - label: 'Empty strings overwrite previous values'|t('feed-me'), + label: 'Empty Strings Overwrite Values'|t('feed-me'), + instructions: 'Empty string values by default do not overwrite existing data when updating records, enabling this allows empty string values to overwrite data'|t('feed-me'), name: 'emptyStringReplace', on: settings.emptyStringReplace }) }} From a4dcdbfdadaed809d938c177269228d49f96285d Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Tue, 31 Jan 2023 09:18:49 -0600 Subject: [PATCH 14/49] Settings for "Set empty values" --- src/controllers/FeedsController.php | 1 + src/migrations/Install.php | 1 + .../m230123_152413_set_empty_values.php | 32 +++++++++++++++++++ src/models/FeedModel.php | 7 +++- src/services/Feeds.php | 2 ++ src/templates/feeds/_edit.html | 7 ++++ 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 src/migrations/m230123_152413_set_empty_values.php diff --git a/src/controllers/FeedsController.php b/src/controllers/FeedsController.php index ed765e8b..81e47be1 100644 --- a/src/controllers/FeedsController.php +++ b/src/controllers/FeedsController.php @@ -408,6 +408,7 @@ private function _getModelFromPost() $feed->paginationNode = $request->getBodyParam('paginationNode', $feed->paginationNode); $feed->passkey = $request->getBodyParam('passkey', $feed->passkey); $feed->backup = (bool)$request->getBodyParam('backup', $feed->backup); + $feed->setEmptyValues = (bool)$request->getBodyParam('setEmptyValues', $feed->setEmptyValues); // Don't overwrite mappings when saving from first screen if ($request->getBodyParam('fieldMapping')) { diff --git a/src/migrations/Install.php b/src/migrations/Install.php index bda053eb..4aba770d 100644 --- a/src/migrations/Install.php +++ b/src/migrations/Install.php @@ -46,6 +46,7 @@ protected function createTables() 'fieldUnique' => $this->text(), 'passkey' => $this->string()->notNull(), 'backup' => $this->boolean()->notNull()->defaultValue(false), + 'setEmptyValues' => $this->boolean()->notNull()->defaultValue(false), 'dateCreated' => $this->dateTime()->notNull(), 'dateUpdated' => $this->dateTime()->notNull(), diff --git a/src/migrations/m230123_152413_set_empty_values.php b/src/migrations/m230123_152413_set_empty_values.php new file mode 100644 index 00000000..1fb66085 --- /dev/null +++ b/src/migrations/m230123_152413_set_empty_values.php @@ -0,0 +1,32 @@ +db->columnExists('{{%feedme_feeds}}', 'setEmptyValues')) { + $this->addColumn('{{%feedme_feeds}}', 'setEmptyValues', $this->boolean()->defaultValue(false)->notNull()->after('backup')); + } + } + + /** + * @inheritdoc + */ + public function safeDown() + { + if ($this->db->columnExists('{{%feedme_feeds}}', 'setEmptyValues')) { + $this->dropColumn('{{%feedme_feeds}}', 'setEmptyValues'); + } + } +} diff --git a/src/models/FeedModel.php b/src/models/FeedModel.php index 3a8b8573..252372ea 100644 --- a/src/models/FeedModel.php +++ b/src/models/FeedModel.php @@ -110,6 +110,11 @@ class FeedModel extends Model */ public $backup; + /** + * @var bool + */ + public $setEmptyValues; + /** * @var */ @@ -243,7 +248,7 @@ public function rules() { return [ [['name', 'feedUrl', 'feedType', 'elementType', 'duplicateHandle', 'passkey'], 'required'], - [['backup'], 'boolean'], + [['backup', 'setEmptyValues'], 'boolean'], ]; } } diff --git a/src/services/Feeds.php b/src/services/Feeds.php index 4cd6d24f..ba229d80 100644 --- a/src/services/Feeds.php +++ b/src/services/Feeds.php @@ -127,6 +127,7 @@ public function saveFeed(FeedModel $model, bool $runValidation = true): bool $record->paginationNode = $model->paginationNode; $record->passkey = $model->passkey; $record->backup = $model->backup; + $record->setEmptyValues = $model->setEmptyValues; if ($model->elementGroup) { $record->setAttribute('elementGroup', json_encode($model->elementGroup)); @@ -259,6 +260,7 @@ private function _getQuery() 'fieldUnique', 'passkey', 'backup', + 'setEmptyValues', 'dateCreated', 'dateUpdated', 'uid', diff --git a/src/templates/feeds/_edit.html b/src/templates/feeds/_edit.html index 200d0225..ec48800d 100644 --- a/src/templates/feeds/_edit.html +++ b/src/templates/feeds/_edit.html @@ -208,6 +208,13 @@

{{ 'Import strategy'|t('feed-me') }}

on: (feed.id) ? feed.backup : true, }) }} + {{ forms.lightswitchField({ + label: 'Set Empty Values'|t('feed-me'), + instructions: 'When enabled, empty values are considered valid and will be used to replace existing data. When disabled, empty values are ignored.'|t('feed-me'), + name: 'setEmptyValues', + on: (feed.id) ? feed.setEmptyValues : false, + }) }} + {{ parent() }} {% endblock %} From f4fa8a4ff75ea555bc79614c1bbe6b0e020187f6 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Thu, 2 Feb 2023 10:08:19 -0600 Subject: [PATCH 15/49] Set empty values when setting is present --- src/base/Field.php | 20 ++++++++++++-------- src/helpers/DataHelper.php | 18 +++++++++++------- src/services/Process.php | 10 ++++++++-- 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/base/Field.php b/src/base/Field.php index e9bb6c7c..bd479adc 100644 --- a/src/base/Field.php +++ b/src/base/Field.php @@ -2,12 +2,16 @@ namespace craft\feedme\base; +use ArrayAccess; use Cake\Utility\Hash; use Craft; use craft\base\Component; +use craft\errors\ElementNotFoundException; use craft\feedme\helpers\DataHelper; use craft\feedme\models\FeedModel; use craft\feedme\Plugin; +use Throwable; +use yii\base\Exception; /** * @@ -42,7 +46,7 @@ abstract class Field extends Component public $field; /** - * @var FeedModel + * @var FeedModel|array */ public $feed; @@ -104,7 +108,7 @@ public function getElementType() // ========================================================================= /** - * @return array|\ArrayAccess|mixed|string|null + * @return array|ArrayAccess|mixed|string|null */ public function fetchSimpleValue() { @@ -112,7 +116,7 @@ public function fetchSimpleValue() } /** - * @return array|\ArrayAccess|mixed + * @return array|ArrayAccess|mixed */ public function fetchArrayValue() { @@ -120,11 +124,11 @@ public function fetchArrayValue() } /** - * @return array|\ArrayAccess|mixed|null + * @return array|ArrayAccess|mixed|null */ public function fetchValue() { - return DataHelper::fetchValue($this->feedData, $this->fieldInfo); + return DataHelper::fetchValue($this->feedData, $this->fieldInfo, $this->feed); } // Protected Methods @@ -132,9 +136,9 @@ public function fetchValue() /** * @param $elementIds - * @throws \Throwable - * @throws \craft\errors\ElementNotFoundException - * @throws \yii\base\Exception + * @throws Throwable + * @throws ElementNotFoundException + * @throws Exception */ protected function populateElementFields($elementIds) { diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 81dd118b..67ea1482 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -2,11 +2,14 @@ namespace craft\feedme\helpers; +use ArrayAccess; use Cake\Utility\Hash; use Craft; use craft\feedme\Plugin; use craft\helpers\DateTimeHelper; use craft\helpers\Db; +use DateTime; +use Throwable; class DataHelper { @@ -16,7 +19,7 @@ class DataHelper /** * @param $feedData * @param $fieldInfo - * @return array|\ArrayAccess|mixed|string|null + * @return array|ArrayAccess|mixed|string|null */ public static function fetchSimpleValue($feedData, $fieldInfo) { @@ -42,7 +45,7 @@ public static function fetchSimpleValue($feedData, $fieldInfo) /** * @param $feedData * @param $fieldInfo - * @return array|\ArrayAccess|mixed + * @return array|ArrayAccess|mixed */ public static function fetchArrayValue($feedData, $fieldInfo) { @@ -96,9 +99,10 @@ public static function fetchArrayValue($feedData, $fieldInfo) /** * @param $feedData * @param $fieldInfo - * @return array|\ArrayAccess|mixed|null + * @param array $feed + * @return array|ArrayAccess|mixed|null */ - public static function fetchValue($feedData, $fieldInfo) + public static function fetchValue($feedData, $fieldInfo, array $feed) { $value = []; @@ -148,7 +152,7 @@ public static function fetchValue($feedData, $fieldInfo) } // If emptyStringReplace setting is enabled, send $value overwrite existing data - if ($value === "" && Plugin::$plugin->getSettings()->emptyStringReplace) { + if ($value === "" && $feed['setEmptyValues']) { return $value; } @@ -173,7 +177,7 @@ public static function parseFieldDataForElement($value, $element) // it won't be a field handle tag, causing the Twig Lexer to freak out. We ignore those errors try { $value = Craft::$app->getView()->renderObjectTemplate($value, $element); - } catch (\Throwable $e) { + } catch (Throwable $e) { } } @@ -200,7 +204,7 @@ public static function compareElementContent($content, $element) $existingValue = Hash::get($fields, $key); // If date value, make sure to cast it as a string to compare - if ($newValue instanceof \DateTime || DateTimeHelper::isIso8601($newValue)) { + if ($newValue instanceof DateTime || DateTimeHelper::isIso8601($newValue)) { $newValue = Db::prepareDateForDb($newValue); } diff --git a/src/services/Process.php b/src/services/Process.php index e897e417..87f4b40f 100644 --- a/src/services/Process.php +++ b/src/services/Process.php @@ -5,6 +5,7 @@ use Cake\Utility\Hash; use Craft; use craft\base\Component; +use craft\errors\ShellCommandException; use craft\feedme\base\ElementInterface; use craft\feedme\events\FeedProcessEvent; use craft\feedme\helpers\DataHelper; @@ -14,6 +15,7 @@ use craft\helpers\App; use craft\helpers\FileHelper; use craft\helpers\StringHelper; +use yii\base\Exception; class Process extends Component { @@ -391,6 +393,10 @@ public function processFeed($step, $feed, &$processedElementIds, $feedData = nul if (Hash::get($fieldInfo, 'field')) { $fieldValue = Plugin::$plugin->fields->parseField($feed, $element, $feedData, $fieldHandle, $fieldInfo); + if ($feed['setEmptyValues'] === 1 && $fieldValue === null) { + $fieldData[$fieldHandle] = ""; + } + if ($fieldValue !== null) { $fieldData[$fieldHandle] = $fieldValue; } @@ -613,8 +619,8 @@ public function debugFeed($feed, $limit, $offset, $processedElementIds) /** * @param $feed - * @throws \craft\errors\ShellCommandException - * @throws \yii\base\Exception + * @throws ShellCommandException + * @throws Exception */ private function _backupBeforeFeed($feed) { From 796aa153800ff4bd6e9bc49ba6f6b6ae6a67f320 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Thu, 2 Feb 2023 10:36:20 -0600 Subject: [PATCH 16/49] Cleanup --- src/helpers/DataHelper.php | 2 +- src/models/Settings.php | 5 ----- src/templates/settings/general.html | 7 ------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 67ea1482..80918830 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -151,7 +151,7 @@ public static function fetchValue($feedData, $fieldInfo, array $feed) $value = $default; } - // If emptyStringReplace setting is enabled, send $value overwrite existing data + // If setEmptyValues is enabled allow overwriting existing data if ($value === "" && $feed['setEmptyValues']) { return $value; } diff --git a/src/models/Settings.php b/src/models/Settings.php index 749783aa..e066e997 100644 --- a/src/models/Settings.php +++ b/src/models/Settings.php @@ -19,11 +19,6 @@ class Settings extends Model */ public $cache = 60; - /** - * @var bool - */ - public $emptyStringReplace = false; - /** * @var string */ diff --git a/src/templates/settings/general.html b/src/templates/settings/general.html index de72de46..0ce39619 100755 --- a/src/templates/settings/general.html +++ b/src/templates/settings/general.html @@ -28,13 +28,6 @@ instructions: 'Cache duration (in seconds) to cache requests. Note: this only affects calls using the template tag - requests are never cached when triggering directly via the CP.'|t('feed-me'), }) }} - {{ forms.lightswitchField({ - label: 'Empty Strings Overwrite Values'|t('feed-me'), - instructions: 'Empty string values by default do not overwrite existing data when updating records, enabling this allows empty string values to overwrite data'|t('feed-me'), - name: 'emptyStringReplace', - on: settings.emptyStringReplace - }) }} -
{{ forms.checkboxSelectField({ From cd0c11004e51c632806f8fa4d7109569284db861 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Thu, 2 Feb 2023 10:41:49 -0600 Subject: [PATCH 17/49] Remove extra Craft import --- src/migrations/m230123_152413_set_empty_values.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/migrations/m230123_152413_set_empty_values.php b/src/migrations/m230123_152413_set_empty_values.php index 1fb66085..a0326744 100644 --- a/src/migrations/m230123_152413_set_empty_values.php +++ b/src/migrations/m230123_152413_set_empty_values.php @@ -2,7 +2,6 @@ namespace craft\feedme\migrations; -use Craft; use craft\db\Migration; /** From 51533ee3eb3f00736d43eb58b03001f0a97a0775 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Sat, 4 Feb 2023 18:20:14 -0600 Subject: [PATCH 18/49] CI Fixes --- src/base/Element.php | 2 +- src/elements/CommerceProduct.php | 2 +- src/fields/GoogleMaps.php | 2 +- src/fields/Linkit.php | 2 +- src/fields/SimpleMap.php | 2 +- src/fields/SmartMap.php | 2 +- src/fields/TypedLink.php | 2 +- src/helpers/DataHelper.php | 10 ++++++++-- 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/base/Element.php b/src/base/Element.php index 06c1224e..92e4cd80 100644 --- a/src/base/Element.php +++ b/src/base/Element.php @@ -36,7 +36,7 @@ abstract class Element extends Component implements ElementInterface /** - * @var FeedModel + * @var FeedModel|array */ public $feed; diff --git a/src/elements/CommerceProduct.php b/src/elements/CommerceProduct.php index 5218a918..ae812a5f 100644 --- a/src/elements/CommerceProduct.php +++ b/src/elements/CommerceProduct.php @@ -393,7 +393,7 @@ private function _parseVariants($event) // Parse the just the element attributes first. We use these in our field contexts, and need a fully-prepped element foreach ($variantContent as $fieldHandle => $fieldInfo) { if (Hash::get($fieldInfo, 'attribute')) { - $attributeValue = DataHelper::fetchValue(Hash::get($fieldInfo, 'data'), $fieldInfo); + $attributeValue = DataHelper::fetchValue(Hash::get($fieldInfo, 'data'), $fieldInfo, $this->feed); $attributeData[$fieldHandle] = $attributeValue; } diff --git a/src/fields/GoogleMaps.php b/src/fields/GoogleMaps.php index bb0c0d15..c98e7294 100644 --- a/src/fields/GoogleMaps.php +++ b/src/fields/GoogleMaps.php @@ -54,7 +54,7 @@ public function parseField() } foreach ($fields as $subFieldHandle => $subFieldInfo) { - $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo); + $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo, $this->feed); } // Protect against sending an empty array diff --git a/src/fields/Linkit.php b/src/fields/Linkit.php index 12e8cabb..2aa9f314 100644 --- a/src/fields/Linkit.php +++ b/src/fields/Linkit.php @@ -55,7 +55,7 @@ public function parseField() } foreach ($fields as $subFieldHandle => $subFieldInfo) { - $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo); + $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo, $this->feed); } if ($preppedData) { diff --git a/src/fields/SimpleMap.php b/src/fields/SimpleMap.php index 73b27fa9..4ee86819 100644 --- a/src/fields/SimpleMap.php +++ b/src/fields/SimpleMap.php @@ -56,7 +56,7 @@ public function parseField() } foreach ($fields as $subFieldHandle => $subFieldInfo) { - $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo); + $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo, $this->feed); } // In order to full-fill any empty gaps in data (lng/lat/address), we check to see if we have any data missing diff --git a/src/fields/SmartMap.php b/src/fields/SmartMap.php index 9927c70f..2f1b6455 100644 --- a/src/fields/SmartMap.php +++ b/src/fields/SmartMap.php @@ -54,7 +54,7 @@ public function parseField() } foreach ($fields as $subFieldHandle => $subFieldInfo) { - $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo); + $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo, $this->feed); } // Protect against sending an empty array diff --git a/src/fields/TypedLink.php b/src/fields/TypedLink.php index dbc9f9a0..4f3a8216 100644 --- a/src/fields/TypedLink.php +++ b/src/fields/TypedLink.php @@ -54,7 +54,7 @@ public function parseField() } foreach ($fields as $subFieldHandle => $subFieldInfo) { - $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo); + $preppedData[$subFieldHandle] = DataHelper::fetchValue($this->feedData, $subFieldInfo, $this->feed); } // Protect against sending an empty array diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 80918830..e2482030 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -5,6 +5,7 @@ use ArrayAccess; use Cake\Utility\Hash; use Craft; +use craft\feedme\models\FeedModel; use craft\feedme\Plugin; use craft\helpers\DateTimeHelper; use craft\helpers\Db; @@ -99,11 +100,16 @@ public static function fetchArrayValue($feedData, $fieldInfo) /** * @param $feedData * @param $fieldInfo - * @param array $feed + * @param array|FeedModel $feed * @return array|ArrayAccess|mixed|null */ - public static function fetchValue($feedData, $fieldInfo, array $feed) + public static function fetchValue($feedData, $fieldInfo, $feed) { + // $feed will be a FeedModel when calling `fetchValue` from an element + if ($feed instanceof FeedModel) { + $feed = $feed->toArray(); + } + $value = []; $node = Hash::get($fieldInfo, 'node'); From 37a5d0642c954bc0b4e073a92b459e5970a1f276 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Thu, 9 Feb 2023 16:04:46 -0800 Subject: [PATCH 19/49] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f1aa63b..4e16cecc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +### Added +- Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854)) + ## 4.5.4 - 2023-01-09 ### Fixed From 46101e5af687730bb997d06e3bb82554f9f8797f Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Thu, 9 Feb 2023 16:36:14 -0800 Subject: [PATCH 20/49] bump schema version for https://github.com/craftcms/feed-me/pull/1228 --- src/Plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plugin.php b/src/Plugin.php index 620c2f09..2d9aa442 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -43,7 +43,7 @@ class Plugin extends \craft\base\Plugin // Public Properties // ========================================================================= - public $schemaVersion = '4.4.0'; + public $schemaVersion = '4.4.1'; public $hasCpSettings = true; public $hasCpSection = true; From 3f8c2199aaa38a2db50e86a3fee051fd9eeeaca1 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Thu, 9 Feb 2023 17:13:52 -0800 Subject: [PATCH 21/49] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e16cecc..de14f19f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Unreleased ### Added -- Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854)) +- Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) ## 4.5.4 - 2023-01-09 From eeb2905c63700af590f2c6bdeec66bfabdf33c51 Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Fri, 10 Feb 2023 08:34:12 +0000 Subject: [PATCH 22/49] limit relational field default value options to field's sources --- src/templates/_includes/fields/_base.html | 1 + src/templates/_includes/fields/calendar-events.html | 1 + src/templates/_includes/fields/categories.html | 1 + src/templates/_includes/fields/commerce_products.html | 1 + src/templates/_includes/fields/commerce_variants.html | 1 + src/templates/_includes/fields/digital-products.html | 1 + src/templates/_includes/fields/entries.html | 1 + src/templates/_includes/fields/tags.html | 1 + src/templates/_includes/fields/users.html | 1 + 9 files changed, 9 insertions(+) diff --git a/src/templates/_includes/fields/_base.html b/src/templates/_includes/fields/_base.html index 86a7849b..f8a4fadb 100644 --- a/src/templates/_includes/fields/_base.html +++ b/src/templates/_includes/fields/_base.html @@ -168,6 +168,7 @@ selectionLabel: default.options.selectionLabel, limit: default.options.limit ?? null, elements: elements, + sources: default.options.sources ?? '*', }) }} {% endif %} diff --git a/src/templates/_includes/fields/calendar-events.html b/src/templates/_includes/fields/calendar-events.html index a75cb1bd..98803307 100644 --- a/src/templates/_includes/fields/calendar-events.html +++ b/src/templates/_includes/fields/calendar-events.html @@ -17,6 +17,7 @@ options: { elementType: fieldClass.elementType, selectionLabel: "Default Event"|t('feed-me'), + sources: field.sources ?? '*', }, } %} {% endif %} diff --git a/src/templates/_includes/fields/categories.html b/src/templates/_includes/fields/categories.html index 75208e6e..e642dc20 100644 --- a/src/templates/_includes/fields/categories.html +++ b/src/templates/_includes/fields/categories.html @@ -17,6 +17,7 @@ options: { elementType: fieldClass.elementType, selectionLabel: "Default Category"|t('feed-me'), + sources: field.source ? [field.source] : '*', }, } %} {% endif %} diff --git a/src/templates/_includes/fields/commerce_products.html b/src/templates/_includes/fields/commerce_products.html index a4903341..1a4d9e2f 100644 --- a/src/templates/_includes/fields/commerce_products.html +++ b/src/templates/_includes/fields/commerce_products.html @@ -17,6 +17,7 @@ options: { elementType: fieldClass.elementType, selectionLabel: "Default Product"|t('feed-me'), + sources: field.sources ?? '*', }, } %} {% endif %} diff --git a/src/templates/_includes/fields/commerce_variants.html b/src/templates/_includes/fields/commerce_variants.html index 00dd3241..34df39f4 100644 --- a/src/templates/_includes/fields/commerce_variants.html +++ b/src/templates/_includes/fields/commerce_variants.html @@ -17,6 +17,7 @@ options: { elementType: fieldClass.elementType, selectionLabel: "Default Variant"|t('feed-me'), + sources: field.sources ?? '*', }, } %} {% endif %} diff --git a/src/templates/_includes/fields/digital-products.html b/src/templates/_includes/fields/digital-products.html index a4903341..1a4d9e2f 100644 --- a/src/templates/_includes/fields/digital-products.html +++ b/src/templates/_includes/fields/digital-products.html @@ -17,6 +17,7 @@ options: { elementType: fieldClass.elementType, selectionLabel: "Default Product"|t('feed-me'), + sources: field.sources ?? '*', }, } %} {% endif %} diff --git a/src/templates/_includes/fields/entries.html b/src/templates/_includes/fields/entries.html index adb22fad..92e5e5cb 100644 --- a/src/templates/_includes/fields/entries.html +++ b/src/templates/_includes/fields/entries.html @@ -18,6 +18,7 @@ elementType: fieldClass.elementType, criteria: {'status' : null, enabledForSite : false}, selectionLabel: "Default Entry"|t('feed-me'), + sources: field.sources ?? '*', }, } %} {% endif %} diff --git a/src/templates/_includes/fields/tags.html b/src/templates/_includes/fields/tags.html index eeae9329..b5c8ad69 100644 --- a/src/templates/_includes/fields/tags.html +++ b/src/templates/_includes/fields/tags.html @@ -17,6 +17,7 @@ options: { elementType: fieldClass.elementType, selectionLabel: "Default Tag"|t('feed-me'), + sources: field.source ? [field.source] : '*', }, } %} {% endif %} diff --git a/src/templates/_includes/fields/users.html b/src/templates/_includes/fields/users.html index 275bc558..70415ba9 100644 --- a/src/templates/_includes/fields/users.html +++ b/src/templates/_includes/fields/users.html @@ -17,6 +17,7 @@ options: { elementType: fieldClass.elementType, selectionLabel: "Default User"|t('feed-me'), + sources: field.sources ?? '*', }, } %} {% endif %} From 2cae92caa5238ac1ec97aab8654e0aa79d8a71da Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Fri, 10 Feb 2023 17:22:19 -0800 Subject: [PATCH 23/49] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de14f19f..86e50400 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Added - Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) +### Fixed +- Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219) + ## 4.5.4 - 2023-01-09 ### Fixed From cd774854aa72933a7cc9b54ba2bc200a7fa7a850 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Fri, 10 Feb 2023 18:08:12 -0800 Subject: [PATCH 24/49] Squashed commit of the following: commit 10edbd25f3fcc548d28e64d07b2b86e5018b6308 Author: Boudewijn Schoon Date: Mon Jan 23 12:10:16 2023 +0100 Fixes comparison of DateTime fields during import The `$newValue` for DateTime instances is normalized to a string, however, this is not done for `$existingValue`. Therefore the comparison will always conclude that the value changed because `new \DateTime('2023-01-23') != '2023-01-23'`. This bug causes all imports, that import any of the attributes, to always conclude that the data changed. This results in more database work and also a new revision for every entry on every import. --- src/helpers/DataHelper.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 8be8e84d..8ac8a4ce 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -210,7 +210,12 @@ public static function compareElementContent($content, $element) $existingValue = Hash::get($fields, $key); // If date value, make sure to cast it as a string to compare - if ($newValue instanceof DateTime || DateTimeHelper::isIso8601($newValue)) { + if ($existingValue instanceof \DateTime || DateTimeHelper::isIso8601($existingValue)) { + $existingValue = Db::prepareDateForDb($existingValue); + } + + // If date value, make sure to cast it as a string to compare + if ($newValue instanceof \DateTime || DateTimeHelper::isIso8601($newValue)) { $newValue = Db::prepareDateForDb($newValue); } @@ -227,6 +232,11 @@ public static function compareElementContent($content, $element) // Then check for simple attributes $existingValue = Hash::get($attributes, $key); + + // If date value, make sure to cast it as a string to compare + if ($existingValue instanceof \DateTime || DateTimeHelper::isIso8601($existingValue)) { + $existingValue = Db::prepareDateForDb($existingValue); + } // Check for attribute groups - more than simple asset if ($key === 'groups') { From 9aae3c1e1388cc5fb10d9595bb9e9de1cf6f1d78 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Fri, 10 Feb 2023 18:09:01 -0800 Subject: [PATCH 25/49] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e50400..aa631dc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) ### Fixed -- Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219) +- Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1219](https://github.com/craftcms/feed-me/issues/1219)) ## 4.5.4 - 2023-01-09 From b1bd00c5ebbcc78b1e9bcfaa06d96fdc99412d81 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sat, 11 Feb 2023 22:29:16 -0800 Subject: [PATCH 26/49] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa631dc7..d61a8ade 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Added - Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) +### Changed +- Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) + ### Fixed - Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1219](https://github.com/craftcms/feed-me/issues/1219)) From 08160e36477a373ee9280c690e185cb1ffc3684e Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sat, 11 Feb 2023 22:30:50 -0800 Subject: [PATCH 27/49] changelog --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d61a8ade..c5ed2139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,9 @@ ### Added - Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) -### Changed -- Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) - ### Fixed - Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1219](https://github.com/craftcms/feed-me/issues/1219)) +- Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) ## 4.5.4 - 2023-01-09 From be5e0675166b4b3eccb71da1939cc867a89c55c4 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sun, 12 Feb 2023 19:11:33 -0800 Subject: [PATCH 28/49] Squashed commit of the following: commit 876c3d8c7eedb3a551c94e163c64426dbd95cc4d Author: Brad Bell Date: Sun Feb 12 19:10:49 2023 -0800 changelog commit 2ed2f7660f62d390fb00070bb75183ac44430620 Author: Brad Bell Date: Sun Feb 12 17:40:59 2023 -0800 ecs commit 3246232be98de6fbfa780cf56bf10715845adc26 Merge: bc60900 08160e3 Author: Brad Bell Date: Sun Feb 12 17:38:21 2023 -0800 Merge branch 'v4' into bugfix/1195-use-defaults-if-mapped-val-empty # Conflicts: # src/base/Field.php commit bc60900e9ba10c614f1c274c2224ad0e9fcf90f0 Author: Iwona Just Date: Fri Feb 3 15:46:40 2023 +0000 default value (incl. fallback) for user element commit 53850ef1e8ca955650f2f24fa01899d3f8ef7110 Author: Iwona Just Date: Fri Feb 3 14:32:16 2023 +0000 default value (incl. fallback) for category parent commit 473108eb6f05e609ea9646bc91b92051336dc0b3 Author: Iwona Just Date: Fri Feb 3 14:28:16 2023 +0000 default value (incl. fallback) for entry parent commit 242c7522dfbde0463be81379e1f29cbd584ad9a3 Author: Iwona Just Date: Fri Feb 3 13:16:11 2023 +0000 ecs fix commit 11108e7255fa0ee0c34ae21d8ee905b7871658da Author: Iwona Just Date: Fri Feb 3 12:57:01 2023 +0000 different approach to default value fallback commit f86df03e146ea08a3cf81074c299b5e0c5f547b8 Author: Iwona Just Date: Thu Feb 2 16:35:05 2023 +0000 fall back to default relation if mapped value is empty --- CHANGELOG.md | 1 + src/base/Field.php | 10 +++++++++- src/elements/Category.php | 15 +++++++++++++++ src/elements/Entry.php | 15 +++++++++++++++ src/elements/User.php | 6 ++++++ src/fields/Assets.php | 10 +++++++++- src/fields/CalendarEvents.php | 10 +++++++++- src/fields/Categories.php | 10 +++++++++- src/fields/Checkboxes.php | 6 ++++++ src/fields/CommerceProducts.php | 10 +++++++++- src/fields/CommerceVariants.php | 10 +++++++++- src/fields/DigitalProducts.php | 10 +++++++++- src/fields/Entries.php | 10 +++++++++- src/fields/MultiSelect.php | 8 +++++++- src/fields/Tags.php | 10 +++++++++- src/fields/Users.php | 10 +++++++++- src/helpers/DataHelper.php | 30 ++++++++++++++++++------------ 17 files changed, 158 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ed2139..b3fa1b9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed - Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1219](https://github.com/craftcms/feed-me/issues/1219)) - Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) +- Fixed a PHP error that could occur when you map an assets field with a default value and there is an empty value in the feed. ([#1229](https://github.com/craftcms/feed-me/pull/1229), [#1195](https://github.com/craftcms/feed-me/issues/1195), [#1106](https://github.com/craftcms/feed-me/issues/1106), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1154](https://github.com/craftcms/feed-me/issues/1154)) ## 4.5.4 - 2023-01-09 diff --git a/src/base/Field.php b/src/base/Field.php index bd479adc..6455f6d2 100644 --- a/src/base/Field.php +++ b/src/base/Field.php @@ -124,7 +124,15 @@ public function fetchArrayValue() } /** - * @return array|ArrayAccess|mixed|null + * @return array|\ArrayAccess|mixed + */ + public function fetchDefaultArrayValue() + { + return DataHelper::fetchDefaultArrayValue($this->fieldInfo); + } + + /** + * @return array|\ArrayAccess|mixed|null */ public function fetchValue() { diff --git a/src/elements/Category.php b/src/elements/Category.php index c7ce48b4..b04a9cee 100644 --- a/src/elements/Category.php +++ b/src/elements/Category.php @@ -6,6 +6,7 @@ use Craft; use craft\elements\Category as CategoryElement; use craft\feedme\base\Element; +use craft\feedme\helpers\DataHelper; use craft\feedme\Plugin; /** @@ -128,15 +129,21 @@ public function afterSave($data, $settings) protected function parseParent($feedData, $fieldInfo) { $value = $this->fetchSimpleValue($feedData, $fieldInfo); + $default = DataHelper::fetchDefaultArrayValue($fieldInfo); $match = Hash::get($fieldInfo, 'options.match'); $create = Hash::get($fieldInfo, 'options.create'); + $node = Hash::get($fieldInfo, 'node'); // Element lookups must have a value to match against if ($value === null || $value === '') { return null; } + if ($node === 'usedefault') { + $match = 'elements.id'; + } + $query = CategoryElement::find() ->status(null) ->andWhere(['=', $match, $value]); @@ -165,6 +172,14 @@ protected function parseParent($feedData, $fieldInfo) return $element->id; } + + // use the default value if it's provided and none of the above worked + // https://github.com/craftcms/feed-me/issues/1154 + if (!empty($default)) { + $this->element->newParentId = $default[0]; + + return $default[0]; + } return null; } diff --git a/src/elements/Entry.php b/src/elements/Entry.php index 6e265822..9c31f4e5 100644 --- a/src/elements/Entry.php +++ b/src/elements/Entry.php @@ -7,6 +7,7 @@ use craft\elements\Entry as EntryElement; use craft\elements\User as UserElement; use craft\feedme\base\Element; +use craft\feedme\helpers\DataHelper; use craft\feedme\models\ElementGroup; use craft\feedme\Plugin; use craft\models\Section; @@ -169,15 +170,21 @@ protected function parseExpiryDate($feedData, $fieldInfo) protected function parseParent($feedData, $fieldInfo) { $value = $this->fetchSimpleValue($feedData, $fieldInfo); + $default = DataHelper::fetchDefaultArrayValue($fieldInfo); $match = Hash::get($fieldInfo, 'options.match'); $create = Hash::get($fieldInfo, 'options.create'); + $node = Hash::get($fieldInfo, 'node'); // Element lookups must have a value to match against if ($value === null || $value === '') { return null; } + if ($node === 'usedefault') { + $match = 'elements.id'; + } + $query = EntryElement::find() ->status(null) ->andWhere(['=', $match, $value]); @@ -210,6 +217,14 @@ protected function parseParent($feedData, $fieldInfo) return $element->id; } + // use the default value if it's provided and none of the above worked + // https://github.com/craftcms/feed-me/issues/1154 + if (!empty($default)) { + $this->element->newParentId = $default[0]; + + return $default[0]; + } + return null; } diff --git a/src/elements/User.php b/src/elements/User.php index d0328e66..6b17bcc5 100644 --- a/src/elements/User.php +++ b/src/elements/User.php @@ -9,6 +9,7 @@ use craft\elements\User as UserElement; use craft\feedme\base\Element; use craft\feedme\helpers\AssetHelper; +use craft\feedme\helpers\DataHelper; use craft\helpers\UrlHelper; use craft\records\User as UserRecord; @@ -180,6 +181,7 @@ public function disable($elementIds) protected function parseGroups($feedData, $fieldInfo) { $value = $this->fetchArrayValue($feedData, $fieldInfo); + $default = DataHelper::fetchDefaultArrayValue($fieldInfo); $newGroupsIds = []; @@ -205,6 +207,10 @@ protected function parseGroups($feedData, $fieldInfo) $newGroupsIds[] = $result['id']; } + if (empty(array_filter($value)) && !empty($default)) { + $newGroupsIds = $default; + } + $removeFromExisting = Hash::get($fieldInfo, 'options.removeFromExisting'); $existingGroupsIds = Hash::extract($this->element->groups, '{n}.id'); diff --git a/src/fields/Assets.php b/src/fields/Assets.php index 11547ded..cca96fb3 100644 --- a/src/fields/Assets.php +++ b/src/fields/Assets.php @@ -60,6 +60,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $settings = Hash::get($this->field, 'settings'); $folders = Hash::get($this->field, 'settings.sources'); @@ -104,7 +105,7 @@ public function parseField() foreach ($value as $key => $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -114,6 +115,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + $query = AssetElement::find(); // In multi-site, there's currently no way to query across all sites - we use the current site diff --git a/src/fields/CalendarEvents.php b/src/fields/CalendarEvents.php index b22a18d1..67444a36 100644 --- a/src/fields/CalendarEvents.php +++ b/src/fields/CalendarEvents.php @@ -53,6 +53,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $sources = Hash::get($this->field, 'settings.sources'); $limit = Hash::get($this->field, 'settings.limit'); @@ -80,7 +81,7 @@ public function parseField() foreach ($value as $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -90,6 +91,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + // Because we can match on element attributes and custom fields, AND we're directly using SQL // queries in our `where` below, we need to check if we need a prefix for custom fields accessing // the content table. diff --git a/src/fields/Categories.php b/src/fields/Categories.php index 7a601bfb..34240a6c 100644 --- a/src/fields/Categories.php +++ b/src/fields/Categories.php @@ -55,6 +55,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $source = Hash::get($this->field, 'settings.source'); $branchLimit = Hash::get($this->field, 'settings.branchLimit'); @@ -77,7 +78,7 @@ public function parseField() foreach ($value as $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -87,6 +88,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + $query = CategoryElement::find(); // In multi-site, there's currently no way to query across all sites - we use the current site diff --git a/src/fields/Checkboxes.php b/src/fields/Checkboxes.php index 149b1bce..7fbdf7e2 100644 --- a/src/fields/Checkboxes.php +++ b/src/fields/Checkboxes.php @@ -45,6 +45,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $preppedData = []; @@ -56,6 +57,11 @@ public function parseField() if ($dataValue === $option[$match]) { $preppedData[] = $option['value']; } + // special case for when mapping by label, but also using a default value + // which relies on $option['value'] + if (empty($dataValue) && in_array($option['value'], $default)) { + $preppedData[] = $option['value']; + } } } diff --git a/src/fields/CommerceProducts.php b/src/fields/CommerceProducts.php index 24e26086..ff510e91 100644 --- a/src/fields/CommerceProducts.php +++ b/src/fields/CommerceProducts.php @@ -54,6 +54,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $sources = Hash::get($this->field, 'settings.sources'); $limit = Hash::get($this->field, 'settings.limit'); @@ -81,7 +82,7 @@ public function parseField() foreach ($value as $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -91,6 +92,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + // Because we can match on element attributes and custom fields, AND we're directly using SQL // queries in our `where` below, we need to check if we need a prefix for custom fields accessing // the content table. diff --git a/src/fields/CommerceVariants.php b/src/fields/CommerceVariants.php index cfa094fe..1bf12797 100644 --- a/src/fields/CommerceVariants.php +++ b/src/fields/CommerceVariants.php @@ -53,6 +53,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $sources = Hash::get($this->field, 'settings.sources'); $limit = Hash::get($this->field, 'settings.limit'); @@ -80,7 +81,7 @@ public function parseField() foreach ($value as $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -90,6 +91,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + // Because we can match on element attributes and custom fields, AND we're directly using SQL // queries in our `where` below, we need to check if we need a prefix for custom fields accessing // the content table. diff --git a/src/fields/DigitalProducts.php b/src/fields/DigitalProducts.php index dec325d7..22775b11 100644 --- a/src/fields/DigitalProducts.php +++ b/src/fields/DigitalProducts.php @@ -55,6 +55,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $sources = Hash::get($this->field, 'settings.sources'); $limit = Hash::get($this->field, 'settings.limit'); @@ -82,7 +83,7 @@ public function parseField() foreach ($value as $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -92,6 +93,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + // Because we can match on element attributes and custom fields, AND we're directly using SQL // queries in our `where` below, we need to check if we need a prefix for custom fields accessing // the content table. diff --git a/src/fields/Entries.php b/src/fields/Entries.php index df81c8d9..544b0189 100644 --- a/src/fields/Entries.php +++ b/src/fields/Entries.php @@ -55,6 +55,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $sources = Hash::get($this->field, 'settings.sources'); $limit = Hash::get($this->field, 'settings.limit'); @@ -91,7 +92,7 @@ public function parseField() foreach ($value as $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -101,6 +102,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + $query = EntryElement::find(); // In multi-site, there's currently no way to query across all sites - we use the current site diff --git a/src/fields/MultiSelect.php b/src/fields/MultiSelect.php index c91e2247..b68902f9 100644 --- a/src/fields/MultiSelect.php +++ b/src/fields/MultiSelect.php @@ -45,6 +45,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $preppedData = []; @@ -57,7 +58,12 @@ public function parseField() continue; } foreach ($value as $dataValue) { - if ($dataValue === $option[$match]) { + if (!empty($dataValue) && $dataValue === $option[$match]) { + $preppedData[] = $option['value']; + } + // special case for when mapping by label, but also using a default value + // which relies on $option['value'] + if (empty($dataValue) && in_array($option['value'], $default)) { $preppedData[] = $option['value']; } } diff --git a/src/fields/Tags.php b/src/fields/Tags.php index 22373109..432a9f15 100644 --- a/src/fields/Tags.php +++ b/src/fields/Tags.php @@ -56,6 +56,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $source = Hash::get($this->field, 'settings.source'); $limit = Hash::get($this->field, 'settings.limit'); @@ -78,7 +79,7 @@ public function parseField() foreach ($value as $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -88,6 +89,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + // Because we can match on element attributes and custom fields, AND we're directly using SQL // queries in our `where` below, we need to check if we need a prefix for custom fields accessing // the content table. diff --git a/src/fields/Users.php b/src/fields/Users.php index b6c1fb19..36e1224b 100644 --- a/src/fields/Users.php +++ b/src/fields/Users.php @@ -56,6 +56,7 @@ public function getMappingTemplate() public function parseField() { $value = $this->fetchArrayValue(); + $default = $this->fetchDefaultArrayValue(); $sources = Hash::get($this->field, 'settings.sources'); $limit = Hash::get($this->field, 'settings.limit'); @@ -84,7 +85,7 @@ public function parseField() foreach ($value as $dataValue) { // Prevent empty or blank values (string or array), which match all elements - if (empty($dataValue)) { + if (empty($dataValue) && empty($default)) { continue; } @@ -94,6 +95,13 @@ public function parseField() break; } + // special provision for falling back on default BaseRelationField value + // https://github.com/craftcms/feed-me/issues/1195 + if (empty($dataValue) && !empty($default)) { + $foundElements = $default; + break; + } + // Because we can match on element attributes and custom fields, AND we're directly using SQL // queries in our `where` below, we need to check if we need a prefix for custom fields accessing // the content table. diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 8ac8a4ce..11d25a20 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -9,7 +9,6 @@ use craft\feedme\Plugin; use craft\helpers\DateTimeHelper; use craft\helpers\Db; -use DateTime; use Throwable; class DataHelper @@ -53,7 +52,6 @@ public static function fetchArrayValue($feedData, $fieldInfo) $value = []; $node = Hash::get($fieldInfo, 'node'); - $default = Hash::get($fieldInfo, 'default'); $dataDelimiter = Plugin::$plugin->service->getConfig('dataDelimiter'); @@ -67,10 +65,6 @@ public static function fetchArrayValue($feedData, $fieldInfo) $feedPath = preg_replace('/^(\d+\/)|(\/\d+)/', '', $feedPath); if ($feedPath == $node || $nodePath == $node) { - if ($nodeValue === null || $nodeValue === '') { - $nodeValue = $default; - } - // Allow pipes '|' to denote multiple items, but even if it doesn't contain one, explode will create // an array, so ensure to merge with the current results. if (is_string($nodeValue) && strpos($nodeValue, $dataDelimiter) !== false) { @@ -88,15 +82,27 @@ public static function fetchArrayValue($feedData, $fieldInfo) // Check if not importing, just using default if ($node === 'usedefault' && !$value) { - if (!is_array($default)) { - $default = [$default]; - } - $value = $default; + $value = self::fetchDefaultArrayValue($fieldInfo); } return $value; } + /** + * @param $fieldInfo + * @return array|\ArrayAccess|mixed + */ + public static function fetchDefaultArrayValue($fieldInfo) + { + $default = Hash::get($fieldInfo, 'default'); + + if (!is_array($default)) { + $default = [$default]; + } + + return $default; + } + /** * @param $feedData * @param $fieldInfo @@ -213,7 +219,7 @@ public static function compareElementContent($content, $element) if ($existingValue instanceof \DateTime || DateTimeHelper::isIso8601($existingValue)) { $existingValue = Db::prepareDateForDb($existingValue); } - + // If date value, make sure to cast it as a string to compare if ($newValue instanceof \DateTime || DateTimeHelper::isIso8601($newValue)) { $newValue = Db::prepareDateForDb($newValue); @@ -232,7 +238,7 @@ public static function compareElementContent($content, $element) // Then check for simple attributes $existingValue = Hash::get($attributes, $key); - + // If date value, make sure to cast it as a string to compare if ($existingValue instanceof \DateTime || DateTimeHelper::isIso8601($existingValue)) { $existingValue = Db::prepareDateForDb($existingValue); From 35217ec53b616f0ed88128612b82192938780142 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sun, 12 Feb 2023 19:27:41 -0800 Subject: [PATCH 29/49] fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3fa1b9b..0287cbd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ### Fixed - Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1219](https://github.com/craftcms/feed-me/issues/1219)) - Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) -- Fixed a PHP error that could occur when you map an assets field with a default value and there is an empty value in the feed. ([#1229](https://github.com/craftcms/feed-me/pull/1229), [#1195](https://github.com/craftcms/feed-me/issues/1195), [#1106](https://github.com/craftcms/feed-me/issues/1106), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1154](https://github.com/craftcms/feed-me/issues/1154)) +- Fixed a PHP error that could occur when you map an assets field with a default value and there is an empty value in the feed. ([#1229](https://github.com/craftcms/feed-me/pull/1229), [#1195](https://github.com/craftcms/feed-me/issues/1195), [#1106](https://github.com/craftcms/feed-me/issues/1106), [#1154](https://github.com/craftcms/feed-me/issues/1154)) ## 4.5.4 - 2023-01-09 From 411caf0ac8b812c1e4ff6e768141cc6a9ac897ee Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 13 Feb 2023 16:54:05 -0800 Subject: [PATCH 30/49] phpstan on v4 --- .github/workflows/ci.yml | 1 + phpstan.neon | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a6fa8fa..07b202ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: - develop - main + - v4 pull_request: jobs: ecs: diff --git a/phpstan.neon b/phpstan.neon index 0c0ab6db..110290d8 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -15,4 +15,4 @@ parameters: - src/fields/CommerceVariants.php - src/fields/DigitalProducts.php - src/fields/SimpleMap.php - - src/fiesds/CommerceProducts.php + - src/fields/CommerceProducts.php From 3ebc12de92582069713685909d73878fc52f2c9e Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Tue, 14 Feb 2023 08:16:28 +0000 Subject: [PATCH 31/49] php stan amends --- src/fields/Assets.php | 2 +- src/fields/CalendarEvents.php | 2 +- src/fields/Categories.php | 2 +- src/fields/CommerceProducts.php | 2 +- src/fields/CommerceVariants.php | 2 +- src/fields/DigitalProducts.php | 2 +- src/fields/Entries.php | 2 +- src/fields/Tags.php | 2 +- src/fields/Users.php | 2 +- src/helpers/DataHelper.php | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/fields/Assets.php b/src/fields/Assets.php index cca96fb3..546a5795 100644 --- a/src/fields/Assets.php +++ b/src/fields/Assets.php @@ -117,7 +117,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/fields/CalendarEvents.php b/src/fields/CalendarEvents.php index 67444a36..1853d2c9 100644 --- a/src/fields/CalendarEvents.php +++ b/src/fields/CalendarEvents.php @@ -93,7 +93,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/fields/Categories.php b/src/fields/Categories.php index 34240a6c..141928e7 100644 --- a/src/fields/Categories.php +++ b/src/fields/Categories.php @@ -90,7 +90,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/fields/CommerceProducts.php b/src/fields/CommerceProducts.php index ff510e91..2d7cb6cb 100644 --- a/src/fields/CommerceProducts.php +++ b/src/fields/CommerceProducts.php @@ -94,7 +94,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/fields/CommerceVariants.php b/src/fields/CommerceVariants.php index 1bf12797..73ccb6fb 100644 --- a/src/fields/CommerceVariants.php +++ b/src/fields/CommerceVariants.php @@ -93,7 +93,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/fields/DigitalProducts.php b/src/fields/DigitalProducts.php index 22775b11..ab773b2d 100644 --- a/src/fields/DigitalProducts.php +++ b/src/fields/DigitalProducts.php @@ -95,7 +95,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/fields/Entries.php b/src/fields/Entries.php index 544b0189..d530d3d8 100644 --- a/src/fields/Entries.php +++ b/src/fields/Entries.php @@ -104,7 +104,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/fields/Tags.php b/src/fields/Tags.php index 432a9f15..efff6e59 100644 --- a/src/fields/Tags.php +++ b/src/fields/Tags.php @@ -91,7 +91,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/fields/Users.php b/src/fields/Users.php index 36e1224b..720ff9a6 100644 --- a/src/fields/Users.php +++ b/src/fields/Users.php @@ -97,7 +97,7 @@ public function parseField() // special provision for falling back on default BaseRelationField value // https://github.com/craftcms/feed-me/issues/1195 - if (empty($dataValue) && !empty($default)) { + if (empty($dataValue)) { $foundElements = $default; break; } diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 11d25a20..af2aaff7 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -96,7 +96,7 @@ public static function fetchDefaultArrayValue($fieldInfo) { $default = Hash::get($fieldInfo, 'default'); - if (!is_array($default)) { + if (!empty($default) && !is_array($default)) { $default = [$default]; } From 8b357957ff9638088b999ef8ef2bdd0e382eb844 Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Wed, 15 Feb 2023 08:31:21 +0000 Subject: [PATCH 32/49] search for the parent in the section/group we're mapping --- src/elements/Category.php | 5 +++++ src/elements/Entry.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/elements/Category.php b/src/elements/Category.php index b04a9cee..f93a8661 100644 --- a/src/elements/Category.php +++ b/src/elements/Category.php @@ -152,6 +152,11 @@ protected function parseParent($feedData, $fieldInfo) $query->siteId($this->feed['siteId']); } + // fix for https://github.com/craftcms/feed-me/issues/1154#issuecomment-1429622276 + if (!empty($this->element->groupId)) { + $query->groupId($this->element->groupId); + } + $element = $query->one(); if ($element) { diff --git a/src/elements/Entry.php b/src/elements/Entry.php index 9c31f4e5..3f68aa4d 100644 --- a/src/elements/Entry.php +++ b/src/elements/Entry.php @@ -193,6 +193,11 @@ protected function parseParent($feedData, $fieldInfo) $query->siteId($this->feed['siteId']); } + // fix for https://github.com/craftcms/feed-me/issues/1154#issuecomment-1429622276 + if (!empty($this->element->sectionId)) { + $query->sectionId($this->element->sectionId); + } + $element = $query->one(); if ($element) { From 75c25edd489d3e640621cbd31895048888c31854 Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Wed, 15 Feb 2023 08:31:54 +0000 Subject: [PATCH 33/49] assign new parent after creating it --- src/elements/Entry.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/elements/Entry.php b/src/elements/Entry.php index 3f68aa4d..5d8eebb1 100644 --- a/src/elements/Entry.php +++ b/src/elements/Entry.php @@ -217,6 +217,7 @@ protected function parseParent($feedData, $fieldInfo) Plugin::error('Entry error: Could not create parent - `{e}`.', ['e' => json_encode($element->getErrors())]); } else { Plugin::info('Entry `#{id}` added.', ['id' => $element->id]); + $this->element->newParentId = $element->id; } return $element->id; From 06a30f8e03854d51dfbc610d0e5f92f7e877875b Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Wed, 15 Feb 2023 09:02:46 +0000 Subject: [PATCH 34/49] limit category default parent to feed's group --- src/templates/_includes/elements/categories/map.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/_includes/elements/categories/map.html b/src/templates/_includes/elements/categories/map.html index bc4ac0f7..a6add37a 100644 --- a/src/templates/_includes/elements/categories/map.html +++ b/src/templates/_includes/elements/categories/map.html @@ -8,7 +8,7 @@ {% endif %} {% set categories = [{ label: 'Don’t import'|t('feed-me'), value: '' }] %} -{% for category in craft.categories.all() %} +{% for category in craft.categories({ groupId: groupId }).all() %} {% set categories = categories|merge([{ label: category.title|slice(0, 40), value: category.id }]) %} {% endfor %} From 368b8da0b174a0311360b4789bb5b9f83bbfcf74 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 6 Mar 2023 17:16:01 -0800 Subject: [PATCH 35/49] port of https://github.com/craftcms/feed-me/pull/1236/files --- CHANGELOG.md | 1 + src/helpers/DataHelper.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0287cbd5..902e9484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1219](https://github.com/craftcms/feed-me/issues/1219)) - Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) - Fixed a PHP error that could occur when you map an assets field with a default value and there is an empty value in the feed. ([#1229](https://github.com/craftcms/feed-me/pull/1229), [#1195](https://github.com/craftcms/feed-me/issues/1195), [#1106](https://github.com/craftcms/feed-me/issues/1106), [#1154](https://github.com/craftcms/feed-me/issues/1154)) +- Fixed a bug where simple array comparisons might incorrectly return false on empty arrays during an import. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) ## 4.5.4 - 2023-01-09 diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index af2aaff7..b9aba309 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -339,6 +339,11 @@ public static function arrayCompare($array1, $array2) */ private static function _compareSimpleValues($fields, $key, $firstValue, $secondValue): bool { + // When the values are empty arrays we do NOT use the Hash::check below because that will always return false + if (is_array($firstValue) && is_array($secondValue) && count($firstValue) === 0 && count($secondValue) === 0) { + return true; + } + /** @noinspection TypeUnsafeComparisonInspection */ // Should probably do a strict check, but doing this for backwards compatibility. if (Hash::check($fields, $key) && ($firstValue == $secondValue)) { From 85a8822f5c29149af722858d26c8ac1871e1d329 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 6 Mar 2023 17:26:01 -0800 Subject: [PATCH 36/49] composer update --- composer.lock | 984 ++++++++++++++++++++++++-------------------------- 1 file changed, 470 insertions(+), 514 deletions(-) diff --git a/composer.lock b/composer.lock index f285c533..fd4c78ba 100644 --- a/composer.lock +++ b/composer.lock @@ -4,11 +4,11 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0de39b2046f1076a11d5feef8ceb8d2b", + "content-hash": "87ad2e84f2442b4989ff593969c9ce1f", "packages": [ { "name": "cakephp/core", - "version": "3.10.1", + "version": "3.10.5", "source": { "type": "git", "url": "https://github.com/cakephp/core.git", @@ -64,7 +64,7 @@ }, { "name": "cakephp/utility", - "version": "3.10.1", + "version": "3.10.5", "source": { "type": "git", "url": "https://github.com/cakephp/utility.git", @@ -187,16 +187,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.3.1", + "version": "1.3.5", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b" + "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/74780ccf8c19d6acb8d65c5f39cd72110e132bbd", + "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd", "shasum": "" }, "require": { @@ -243,7 +243,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.1" + "source": "https://github.com/composer/ca-bundle/tree/1.3.5" }, "funding": [ { @@ -259,35 +259,36 @@ "type": "tidelift" } ], - "time": "2021-10-28T20:44:15+00:00" + "time": "2023-01-11T08:27:00+00:00" }, { "name": "composer/composer", - "version": "2.1.9", + "version": "2.2.19", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "e558c88f28d102d497adec4852802c0dc14c7077" + "reference": "30ff21a9af9a10845436abaeeb0bb7276e996d24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/e558c88f28d102d497adec4852802c0dc14c7077", - "reference": "e558c88f28d102d497adec4852802c0dc14c7077", + "url": "https://api.github.com/repos/composer/composer/zipball/30ff21a9af9a10845436abaeeb0bb7276e996d24", + "reference": "30ff21a9af9a10845436abaeeb0bb7276e996d24", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", "composer/metadata-minifier": "^1.0", + "composer/pcre": "^1.0", "composer/semver": "^3.0", "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^2.0", + "composer/xdebug-handler": "^2.0 || ^3.0", "justinrainbow/json-schema": "^5.2.11", "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0", + "psr/log": "^1.0 || ^2.0", "react/promise": "^1.2 || ^2.7", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.0", - "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0", "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" @@ -307,7 +308,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.2-dev" } }, "autoload": { @@ -341,7 +342,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.1.9" + "source": "https://github.com/composer/composer/tree/2.2.19" }, "funding": [ { @@ -357,7 +358,7 @@ "type": "tidelift" } ], - "time": "2021-10-05T07:47:38+00:00" + "time": "2023-02-04T13:54:48+00:00" }, { "name": "composer/metadata-minifier", @@ -582,16 +583,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.6", + "version": "1.5.7", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "a30d487169d799745ca7280bc90fdfa693536901" + "reference": "c848241796da2abf65837d51dce1fae55a960149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/a30d487169d799745ca7280bc90fdfa693536901", - "reference": "a30d487169d799745ca7280bc90fdfa693536901", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", + "reference": "c848241796da2abf65837d51dce1fae55a960149", "shasum": "" }, "require": { @@ -642,7 +643,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.6" + "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" }, "funding": [ { @@ -658,31 +659,31 @@ "type": "tidelift" } ], - "time": "2021-11-18T10:14:14+00:00" + "time": "2022-05-23T07:37:50+00:00" }, { "name": "composer/xdebug-handler", - "version": "2.0.5", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { @@ -708,7 +709,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { @@ -724,24 +725,24 @@ "type": "tidelift" } ], - "time": "2022-02-24T20:20:32+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "craftcms/cms", - "version": "3.7.38", + "version": "3.7.67", "source": { "type": "git", "url": "https://github.com/craftcms/cms.git", - "reference": "7e5b2ee7be865ec223c8e0923f41b17c21f07766" + "reference": "abd397810c6cefd2c80aa812d1a186d63807edfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/craftcms/cms/zipball/7e5b2ee7be865ec223c8e0923f41b17c21f07766", - "reference": "7e5b2ee7be865ec223c8e0923f41b17c21f07766", + "url": "https://api.github.com/repos/craftcms/cms/zipball/abd397810c6cefd2c80aa812d1a186d63807edfd", + "reference": "abd397810c6cefd2c80aa812d1a186d63807edfd", "shasum": "" }, "require": { - "composer/composer": "2.1.9", + "composer/composer": "2.2.19", "craftcms/oauth2-craftid": "~1.0.0", "craftcms/plugin-installer": "~1.5.6", "craftcms/server-check": "~1.2.0", @@ -762,11 +763,10 @@ "league/oauth2-client": "^2.6.0", "mikehaertl/php-shellcommand": "^1.6.3", "php": ">=7.2.5", - "pixelandtonic/imagine": "~1.2.4.1", + "pixelandtonic/imagine": "~1.3.3.1", "seld/cli-prompt": "^1.0.4", "symfony/yaml": "^5.2.1", - "true/punycode": "^2.1.1", - "twig/twig": "~2.14.3", + "twig/twig": "~2.15.3", "voku/stringy": "^6.4.0", "webonyx/graphql-php": "~14.11.5", "yiisoft/yii2": "~2.0.45.0", @@ -775,7 +775,8 @@ "yiisoft/yii2-swiftmailer": "^2.1.2" }, "conflict": { - "league/oauth2-client": "2.4.0" + "league/oauth2-client": "2.4.0", + "webonyx/graphql-php": "14.11.7" }, "provide": { "bower-asset/inputmask": "~3.2.2 | ~3.3.5", @@ -833,7 +834,7 @@ "rss": "https://github.com/craftcms/cms/releases.atom", "source": "https://github.com/craftcms/cms" }, - "time": "2022-04-06T18:24:35+00:00" + "time": "2023-02-17T22:30:14+00:00" }, { "name": "craftcms/oauth2-craftid", @@ -945,16 +946,16 @@ }, { "name": "craftcms/server-check", - "version": "1.2.3", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/craftcms/server-check.git", - "reference": "9d8345bc7920b6657bd3fac396efee6bf8609ed6" + "reference": "04518e63ae94effd4e352838278662c928c84e8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/craftcms/server-check/zipball/9d8345bc7920b6657bd3fac396efee6bf8609ed6", - "reference": "9d8345bc7920b6657bd3fac396efee6bf8609ed6", + "url": "https://api.github.com/repos/craftcms/server-check/zipball/04518e63ae94effd4e352838278662c928c84e8c", + "reference": "04518e63ae94effd4e352838278662c928c84e8c", "shasum": "" }, "type": "library", @@ -983,7 +984,7 @@ "rss": "https://github.com/craftcms/server-check/releases.atom", "source": "https://github.com/craftcms/server-check" }, - "time": "2021-08-18T14:46:23+00:00" + "time": "2022-04-17T02:10:54+00:00" }, { "name": "creocoder/yii2-nested-sets", @@ -1095,33 +1096,78 @@ }, "time": "2021-04-09T23:57:26+00:00" }, + { + "name": "doctrine/deprecations", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + }, + "time": "2022-05-02T15:47:09+00:00" + }, { "name": "doctrine/lexer", - "version": "1.2.3", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^10", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1153,7 +1199,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.1.0" }, "funding": [ { @@ -1169,29 +1215,28 @@ "type": "tidelift" } ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2022-12-14T08:49:07+00:00" }, { "name": "egulias/email-validator", - "version": "3.1.2", + "version": "3.2.5", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ee0db30118f661fb166bcffbf5d82032df484697" + "reference": "b531a2311709443320c786feb4519cfaf94af796" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", - "reference": "ee0db30118f661fb166bcffbf5d82032df484697", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b531a2311709443320c786feb4519cfaf94af796", + "reference": "b531a2311709443320c786feb4519cfaf94af796", "shasum": "" }, "require": { - "doctrine/lexer": "^1.2", + "doctrine/lexer": "^1.2|^2", "php": ">=7.2", "symfony/polyfill-intl-idn": "^1.15" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^8.5.8|^9.3.3", "vimeo/psalm": "^4" }, @@ -1229,7 +1274,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" + "source": "https://github.com/egulias/EmailValidator/tree/3.2.5" }, "funding": [ { @@ -1237,7 +1282,7 @@ "type": "github" } ], - "time": "2021-10-11T09:18:27+00:00" + "time": "2023-01-02T17:26:14+00:00" }, { "name": "elvanto/litemoji", @@ -1328,20 +1373,30 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.14.0", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75" + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75", - "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8", + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8", "shasum": "" }, "require": { - "php": ">=5.2" + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" }, "type": "library", "autoload": { @@ -1373,28 +1428,28 @@ ], "support": { "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0" + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0" }, - "time": "2021-12-25T01:21:49+00:00" + "time": "2022-09-18T07:06:19+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.4.2", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1403,10 +1458,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1416,8 +1471,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -1483,7 +1542,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -1499,20 +1558,20 @@ "type": "tidelift" } ], - "time": "2022-03-20T14:16:28+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -1567,7 +1626,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -1583,20 +1642,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -1610,17 +1669,21 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1682,7 +1745,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -1698,7 +1761,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "jakeasmith/http_build_url", @@ -1739,16 +1802,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "5.2.11", + "version": "5.2.12", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", "shasum": "" }, "require": { @@ -1803,9 +1866,9 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" }, - "time": "2021-07-22T09:24:00+00:00" + "time": "2022-04-13T08:02:27+00:00" }, { "name": "laminas/laminas-escaper", @@ -2149,16 +2212,16 @@ }, { "name": "league/flysystem", - "version": "1.1.9", + "version": "1.1.10", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1", + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1", "shasum": "" }, "require": { @@ -2231,7 +2294,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.9" + "source": "https://github.com/thephpleague/flysystem/tree/1.1.10" }, "funding": [ { @@ -2239,20 +2302,20 @@ "type": "other" } ], - "time": "2021-12-09T09:40:50+00:00" + "time": "2022-10-04T09:16:37+00:00" }, { "name": "league/mime-type-detection", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "3e4a35d756eedc67096f30240a68a3149120dae7" + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3e4a35d756eedc67096f30240a68a3149120dae7", - "reference": "3e4a35d756eedc67096f30240a68a3149120dae7", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", "shasum": "" }, "require": { @@ -2283,7 +2346,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.10.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" }, "funding": [ { @@ -2295,7 +2358,7 @@ "type": "tidelift" } ], - "time": "2022-04-11T12:49:04+00:00" + "time": "2022-04-17T13:12:02+00:00" }, { "name": "league/oauth2-client", @@ -2415,16 +2478,16 @@ }, { "name": "nesbot/carbon", - "version": "2.57.0", + "version": "2.66.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78" + "reference": "496712849902241f04902033b0441b269effe001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/496712849902241f04902033b0441b269effe001", + "reference": "496712849902241f04902033b0441b269effe001", "shasum": "" }, "require": { @@ -2435,14 +2498,16 @@ "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", + "doctrine/dbal": "^2.0 || ^3.1.4", "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54 || ^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -2499,15 +2564,19 @@ }, "funding": [ { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" }, { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", "type": "tidelift" } ], - "time": "2022-02-13T18:13:33+00:00" + "time": "2023-01-29T18:53:47+00:00" }, { "name": "paragonie/random_compat", @@ -2721,26 +2790,26 @@ }, { "name": "pixelandtonic/imagine", - "version": "1.2.4.2", + "version": "1.3.3.1", "source": { "type": "git", "url": "https://github.com/pixelandtonic/Imagine.git", - "reference": "5ee4b6a365497818815ba50738c8dcbb555c9fd3" + "reference": "4d9bb596ff60504e37ccf9103c0bb705dba7fec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pixelandtonic/Imagine/zipball/5ee4b6a365497818815ba50738c8dcbb555c9fd3", - "reference": "5ee4b6a365497818815ba50738c8dcbb555c9fd3", + "url": "https://api.github.com/repos/pixelandtonic/Imagine/zipball/4d9bb596ff60504e37ccf9103c0bb705dba7fec6", + "reference": "4d9bb596ff60504e37ccf9103c0bb705dba7fec6", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.5" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.2", "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5 || ^8.4 || ^9.3" }, "suggest": { + "ext-exif": "to read EXIF metadata", "ext-gd": "to use the GD implementation", "ext-gmagick": "to use the Gmagick implementation", "ext-imagick": "to use the Imagick implementation" @@ -2748,7 +2817,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.7-dev" + "dev-develop": "1.x-dev" } }, "autoload": { @@ -2776,9 +2845,9 @@ "image processing" ], "support": { - "source": "https://github.com/pixelandtonic/Imagine/tree/1.2.4.2" + "source": "https://github.com/pixelandtonic/Imagine/tree/1.3.3.1" }, - "time": "2021-06-22T18:26:46+00:00" + "time": "2023-01-03T19:18:06+00:00" }, { "name": "psr/container", @@ -3279,16 +3348,16 @@ }, { "name": "seld/phar-utils", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "9f3452c93ff423469c0d56450431562ca423dcee" + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/9f3452c93ff423469c0d56450431562ca423dcee", - "reference": "9f3452c93ff423469c0d56450431562ca423dcee", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", "shasum": "" }, "require": { @@ -3321,9 +3390,9 @@ ], "support": { "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.2.0" + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" }, - "time": "2021-12-10T11:20:11+00:00" + "time": "2022-08-31T10:31:18+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -3403,16 +3472,16 @@ }, { "name": "symfony/console", - "version": "v5.4.7", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6" + "reference": "c77433ddc6cdc689caf48065d9ea22ca0853fbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6", - "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6", + "url": "https://api.github.com/repos/symfony/console/zipball/c77433ddc6cdc689caf48065d9ea22ca0853fbd9", + "reference": "c77433ddc6cdc689caf48065d9ea22ca0853fbd9", "shasum": "" }, "require": { @@ -3482,7 +3551,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.7" + "source": "https://github.com/symfony/console/tree/v5.4.21" }, "funding": [ { @@ -3498,11 +3567,11 @@ "type": "tidelift" } ], - "time": "2022-03-31T17:09:19+00:00" + "time": "2023-02-25T16:59:41+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -3549,7 +3618,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -3569,16 +3638,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.7", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f" + "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3a4442138d80c9f7b600fb297534ac718b61d37f", - "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", + "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", "shasum": "" }, "require": { @@ -3613,7 +3682,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.7" + "source": "https://github.com/symfony/filesystem/tree/v5.4.21" }, "funding": [ { @@ -3629,20 +3698,20 @@ "type": "tidelift" } ], - "time": "2022-04-01T12:33:59+00:00" + "time": "2023-02-14T08:03:56+00:00" }, { "name": "symfony/finder", - "version": "v5.4.3", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" + "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", + "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", "shasum": "" }, "require": { @@ -3676,7 +3745,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.3" + "source": "https://github.com/symfony/finder/tree/v5.4.21" }, "funding": [ { @@ -3692,20 +3761,20 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:34:36+00:00" + "time": "2023-02-16T09:33:00+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -3720,7 +3789,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3758,7 +3827,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -3774,20 +3843,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" + "reference": "927013f3aac555983a5059aada98e1907d842695" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/927013f3aac555983a5059aada98e1907d842695", + "reference": "927013f3aac555983a5059aada98e1907d842695", "shasum": "" }, "require": { @@ -3802,7 +3871,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3841,7 +3910,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.27.0" }, "funding": [ { @@ -3857,20 +3926,20 @@ "type": "tidelift" } ], - "time": "2022-01-04T09:04:05+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -3882,7 +3951,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3922,7 +3991,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -3938,20 +4007,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", "shasum": "" }, "require": { @@ -3965,7 +4034,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4009,7 +4078,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" }, "funding": [ { @@ -4025,20 +4094,20 @@ "type": "tidelift" } ], - "time": "2021-09-14T14:02:44+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -4050,7 +4119,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4093,7 +4162,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -4109,20 +4178,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -4137,7 +4206,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4176,7 +4245,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -4192,20 +4261,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", "shasum": "" }, "require": { @@ -4214,7 +4283,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4252,7 +4321,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" }, "funding": [ { @@ -4268,20 +4337,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:17:38+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", "shasum": "" }, "require": { @@ -4290,7 +4359,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4331,7 +4400,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" }, "funding": [ { @@ -4347,20 +4416,20 @@ "type": "tidelift" } ], - "time": "2021-06-05T21:20:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -4369,7 +4438,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4414,7 +4483,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -4430,20 +4499,20 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", - "version": "v5.4.7", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb" + "reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/38a44b2517b470a436e1c944bf9b9ba3961137fb", - "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb", + "url": "https://api.github.com/repos/symfony/process/zipball/d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd", + "reference": "d4ce417ebcb0b7d090b4c178ed6d3accc518e8bd", "shasum": "" }, "require": { @@ -4476,7 +4545,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.7" + "source": "https://github.com/symfony/process/tree/v5.4.21" }, "funding": [ { @@ -4492,20 +4561,20 @@ "type": "tidelift" } ], - "time": "2022-03-18T16:18:52+00:00" + "time": "2023-02-21T19:46:44+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { @@ -4559,7 +4628,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -4575,20 +4644,20 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:07:29+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/string", - "version": "v5.4.3", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" + "reference": "edac10d167b78b1d90f46a80320d632de0bd9f2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", + "url": "https://api.github.com/repos/symfony/string/zipball/edac10d167b78b1d90f46a80320d632de0bd9f2f", + "reference": "edac10d167b78b1d90f46a80320d632de0bd9f2f", "shasum": "" }, "require": { @@ -4645,7 +4714,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.3" + "source": "https://github.com/symfony/string/tree/v5.4.21" }, "funding": [ { @@ -4661,20 +4730,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-02-22T08:00:55+00:00" }, { "name": "symfony/translation", - "version": "v5.4.7", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e1eb790575202ee3ac2659f55b93b05853726f8e" + "reference": "6996affeea65705086939894b77110e9a7f80874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e1eb790575202ee3ac2659f55b93b05853726f8e", - "reference": "e1eb790575202ee3ac2659f55b93b05853726f8e", + "url": "https://api.github.com/repos/symfony/translation/zipball/6996affeea65705086939894b77110e9a7f80874", + "reference": "6996affeea65705086939894b77110e9a7f80874", "shasum": "" }, "require": { @@ -4742,7 +4811,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.7" + "source": "https://github.com/symfony/translation/tree/v5.4.21" }, "funding": [ { @@ -4758,20 +4827,20 @@ "type": "tidelift" } ], - "time": "2022-03-24T17:09:09+00:00" + "time": "2023-02-21T19:46:44+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.5.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "1211df0afa701e45a04253110e959d4af4ef0f07" + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1211df0afa701e45a04253110e959d4af4ef0f07", - "reference": "1211df0afa701e45a04253110e959d4af4ef0f07", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", "shasum": "" }, "require": { @@ -4820,7 +4889,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" }, "funding": [ { @@ -4836,20 +4905,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.3", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2" + "reference": "3713e20d93e46e681e51605d213027e48dab3469" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3713e20d93e46e681e51605d213027e48dab3469", + "reference": "3713e20d93e46e681e51605d213027e48dab3469", "shasum": "" }, "require": { @@ -4895,7 +4964,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.3" + "source": "https://github.com/symfony/yaml/tree/v5.4.21" }, "funding": [ { @@ -4911,70 +4980,20 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:32:32+00:00" - }, - { - "name": "true/punycode", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/true/php-punycode.git", - "reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/true/php-punycode/zipball/a4d0c11a36dd7f4e7cd7096076cab6d3378a071e", - "reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.7", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "TrueBV\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Renan Gonçalves", - "email": "renan.saddam@gmail.com" - } - ], - "description": "A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)", - "homepage": "https://github.com/true/php-punycode", - "keywords": [ - "idna", - "punycode" - ], - "support": { - "issues": "https://github.com/true/php-punycode/issues", - "source": "https://github.com/true/php-punycode/tree/master" - }, - "time": "2016-11-16T10:37:54+00:00" + "time": "2023-02-21T19:46:44+00:00" }, { "name": "twig/twig", - "version": "v2.14.13", + "version": "v2.15.4", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "66856cd0459df3dc97d32077a98454dc2a0ee75a" + "reference": "3e059001d6d597dd50ea7c74dd2464b4adea48d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/66856cd0459df3dc97d32077a98454dc2a0ee75a", - "reference": "66856cd0459df3dc97d32077a98454dc2a0ee75a", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3e059001d6d597dd50ea7c74dd2464b4adea48d3", + "reference": "3e059001d6d597dd50ea7c74dd2464b4adea48d3", "shasum": "" }, "require": { @@ -4990,7 +5009,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.14-dev" + "dev-master": "2.15-dev" } }, "autoload": { @@ -5029,7 +5048,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v2.14.13" + "source": "https://github.com/twigphp/Twig/tree/v2.15.4" }, "funding": [ { @@ -5041,20 +5060,20 @@ "type": "tidelift" } ], - "time": "2022-04-06T06:45:17+00:00" + "time": "2022-12-27T12:26:20+00:00" }, { "name": "voku/anti-xss", - "version": "4.1.39", + "version": "4.1.41", "source": { "type": "git", "url": "https://github.com/voku/anti-xss.git", - "reference": "64a59ba4744e6722866ff3440d93561da9e85cd0" + "reference": "55a403436494e44a2547a8d42de68e6cad4bca1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/anti-xss/zipball/64a59ba4744e6722866ff3440d93561da9e85cd0", - "reference": "64a59ba4744e6722866ff3440d93561da9e85cd0", + "url": "https://api.github.com/repos/voku/anti-xss/zipball/55a403436494e44a2547a8d42de68e6cad4bca1d", + "reference": "55a403436494e44a2547a8d42de68e6cad4bca1d", "shasum": "" }, "require": { @@ -5100,7 +5119,7 @@ ], "support": { "issues": "https://github.com/voku/anti-xss/issues", - "source": "https://github.com/voku/anti-xss/tree/4.1.39" + "source": "https://github.com/voku/anti-xss/tree/4.1.41" }, "funding": [ { @@ -5124,20 +5143,20 @@ "type": "tidelift" } ], - "time": "2022-03-08T17:03:58+00:00" + "time": "2023-02-12T15:56:55+00:00" }, { "name": "voku/arrayy", - "version": "7.9.1", + "version": "7.9.6", "source": { "type": "git", "url": "https://github.com/voku/Arrayy.git", - "reference": "11509d59745af6b2c23a781938491f9981241c1d" + "reference": "0e20b8c6eef7fc46694a2906e0eae2f9fc11cade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/Arrayy/zipball/11509d59745af6b2c23a781938491f9981241c1d", - "reference": "11509d59745af6b2c23a781938491f9981241c1d", + "url": "https://api.github.com/repos/voku/Arrayy/zipball/0e20b8c6eef7fc46694a2906e0eae2f9fc11cade", + "reference": "0e20b8c6eef7fc46694a2906e0eae2f9fc11cade", "shasum": "" }, "require": { @@ -5181,7 +5200,7 @@ "utils" ], "support": { - "docs": "http://voku.github.io/Arrayy/index.html", + "docs": "https://voku.github.io/Arrayy/", "issues": "https://github.com/voku/Arrayy/issues", "source": "https://github.com/voku/Arrayy" }, @@ -5207,7 +5226,7 @@ "type": "tidelift" } ], - "time": "2022-03-08T19:16:33+00:00" + "time": "2022-12-27T12:58:32+00:00" }, { "name": "voku/email-check", @@ -5361,16 +5380,16 @@ }, { "name": "voku/portable-utf8", - "version": "6.0.4", + "version": "6.0.12", "source": { "type": "git", "url": "https://github.com/voku/portable-utf8.git", - "reference": "f6c78e492520115bb2d947c3a0d90a2c6b7a60a8" + "reference": "db0583727bb17666bbd2ba238c85babb973fd165" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-utf8/zipball/f6c78e492520115bb2d947c3a0d90a2c6b7a60a8", - "reference": "f6c78e492520115bb2d947c3a0d90a2c6b7a60a8", + "url": "https://api.github.com/repos/voku/portable-utf8/zipball/db0583727bb17666bbd2ba238c85babb973fd165", + "reference": "db0583727bb17666bbd2ba238c85babb973fd165", "shasum": "" }, "require": { @@ -5383,7 +5402,11 @@ "voku/portable-ascii": "~2.0.0" }, "require-dev": { - "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + "phpstan/phpstan": "1.9.*@dev", + "phpstan/phpstan-strict-rules": "1.4.*@dev", + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0", + "thecodingmachine/phpstan-strict-rules": "1.0.*@dev", + "voku/phpstan-rules": "3.1.*@dev" }, "suggest": { "ext-ctype": "Use Ctype for e.g. hexadecimal digit detection", @@ -5432,7 +5455,7 @@ ], "support": { "issues": "https://github.com/voku/portable-utf8/issues", - "source": "https://github.com/voku/portable-utf8/tree/6.0.4" + "source": "https://github.com/voku/portable-utf8/tree/6.0.12" }, "funding": [ { @@ -5456,7 +5479,7 @@ "type": "tidelift" } ], - "time": "2022-03-08T17:04:59+00:00" + "time": "2023-01-11T12:26:16+00:00" }, { "name": "voku/stop-words", @@ -5684,21 +5707,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -5736,22 +5759,22 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" }, { "name": "webonyx/graphql-php", - "version": "v14.11.5", + "version": "v14.11.9", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "ffa431c0821821839370a68dab3c2597c06bf7f0" + "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/ffa431c0821821839370a68dab3c2597c06bf7f0", - "reference": "ffa431c0821821839370a68dab3c2597c06bf7f0", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/ff91c9f3cf241db702e30b2c42bcc0920e70ac70", + "reference": "ff91c9f3cf241db702e30b2c42bcc0920e70ac70", "shasum": "" }, "require": { @@ -5796,7 +5819,7 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/v14.11.5" + "source": "https://github.com/webonyx/graphql-php/tree/v14.11.9" }, "funding": [ { @@ -5804,7 +5827,7 @@ "type": "open_collective" } ], - "time": "2022-01-24T11:13:31+00:00" + "time": "2023-01-06T12:12:50+00:00" }, { "name": "yiisoft/yii2", @@ -6006,16 +6029,16 @@ }, { "name": "yiisoft/yii2-debug", - "version": "2.1.19", + "version": "2.1.22", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-debug.git", - "reference": "84d20d738b0698298f851fcb6fc25e748d759223" + "reference": "c0fa388c56b64edfb92987fdcc37d7a0243170d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/84d20d738b0698298f851fcb6fc25e748d759223", - "reference": "84d20d738b0698298f851fcb6fc25e748d759223", + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/c0fa388c56b64edfb92987fdcc37d7a0243170d7", + "reference": "c0fa388c56b64edfb92987fdcc37d7a0243170d7", "shasum": "" }, "require": { @@ -6092,32 +6115,32 @@ "type": "tidelift" } ], - "time": "2022-04-05T20:35:14+00:00" + "time": "2022-11-18T17:29:27+00:00" }, { "name": "yiisoft/yii2-queue", - "version": "2.3.4", + "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-queue.git", - "reference": "ed30b5f46ddadd62587a4963dec35f9b756c408b" + "reference": "c1bf0ef5dbe107dc1cf692c1349b9ddd2485a399" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-queue/zipball/ed30b5f46ddadd62587a4963dec35f9b756c408b", - "reference": "ed30b5f46ddadd62587a4963dec35f9b756c408b", + "url": "https://api.github.com/repos/yiisoft/yii2-queue/zipball/c1bf0ef5dbe107dc1cf692c1349b9ddd2485a399", + "reference": "c1bf0ef5dbe107dc1cf692c1349b9ddd2485a399", "shasum": "" }, "require": { "php": ">=5.5.0", - "symfony/process": "^3.3||^4.0||^5.0", + "symfony/process": "^3.3||^4.0||^5.0||^6.0", "yiisoft/yii2": "~2.0.14" }, "require-dev": { "aws/aws-sdk-php": ">=2.4", "enqueue/amqp-lib": "^0.8||^0.9.10", "enqueue/stomp": "^0.8.39", - "jeremeamia/superclosure": "*", + "opis/closure": "*", "pda/pheanstalk": "v3.*", "php-amqplib/php-amqplib": "*", "phpunit/phpunit": "~4.4", @@ -6198,7 +6221,7 @@ "type": "tidelift" } ], - "time": "2022-03-31T07:41:51+00:00" + "time": "2022-11-18T17:16:47+00:00" }, { "name": "yiisoft/yii2-swiftmailer", @@ -6352,16 +6375,16 @@ }, { "name": "codeception/codeception", - "version": "4.1.31", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "15524571ae0686a7facc2eb1f40f600e5bbce9e5" + "reference": "b88014f3348c93f3df99dc6d0967b0dbfa804474" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/15524571ae0686a7facc2eb1f40f600e5bbce9e5", - "reference": "15524571ae0686a7facc2eb1f40f600e5bbce9e5", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b88014f3348c93f3df99dc6d0967b0dbfa804474", + "reference": "b88014f3348c93f3df99dc6d0967b0dbfa804474", "shasum": "" }, "require": { @@ -6424,11 +6447,11 @@ { "name": "Michael Bodnarchuk", "email": "davert@mail.ua", - "homepage": "http://codegyre.com" + "homepage": "https://codegyre.com" } ], "description": "BDD-style testing framework", - "homepage": "http://codeception.com/", + "homepage": "https://codeception.com/", "keywords": [ "BDD", "TDD", @@ -6438,7 +6461,7 @@ ], "support": { "issues": "https://github.com/Codeception/Codeception/issues", - "source": "https://github.com/Codeception/Codeception/tree/4.1.31" + "source": "https://github.com/Codeception/Codeception/tree/4.2.2" }, "funding": [ { @@ -6446,7 +6469,7 @@ "type": "open_collective" } ], - "time": "2022-03-13T17:07:08+00:00" + "time": "2022-08-13T13:28:25+00:00" }, { "name": "codeception/lib-asserts", @@ -6561,16 +6584,16 @@ }, { "name": "codeception/phpunit-wrapper", - "version": "8.1.4", + "version": "8.1.6", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3" + "reference": "7d3479bab7e2b6349044db8af11cd05d57809f9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3", - "reference": "f41335f0b4dd17cf7bbc63e87943b3ae72a8bbc3", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7d3479bab7e2b6349044db8af11cd05d57809f9c", + "reference": "7d3479bab7e2b6349044db8af11cd05d57809f9c", "shasum": "" }, "require": { @@ -6603,9 +6626,9 @@ "description": "PHPUnit classes used by Codeception", "support": { "issues": "https://github.com/Codeception/phpunit-wrapper/issues", - "source": "https://github.com/Codeception/phpunit-wrapper/tree/8.1.4" + "source": "https://github.com/Codeception/phpunit-wrapper/tree/8.1.6" }, - "time": "2020-12-28T14:00:08+00:00" + "time": "2022-05-23T06:22:33+00:00" }, { "name": "codeception/stub", @@ -6647,17 +6670,17 @@ "source": { "type": "git", "url": "https://github.com/craftcms/ecs.git", - "reference": "6534ed578927b9e1da0acd44584c9341e0e87fbe" + "reference": "b4ef13140cd808feed5bfb857b3083d6c44ca2b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/craftcms/ecs/zipball/6534ed578927b9e1da0acd44584c9341e0e87fbe", - "reference": "6534ed578927b9e1da0acd44584c9341e0e87fbe", + "url": "https://api.github.com/repos/craftcms/ecs/zipball/b4ef13140cd808feed5bfb857b3083d6c44ca2b4", + "reference": "b4ef13140cd808feed5bfb857b3083d6c44ca2b4", "shasum": "" }, "require": { "php": "^7.2.5|^8.0.2", - "symplify/easy-coding-standard": "^10.0" + "symplify/easy-coding-standard": "^10.3.3" }, "default-branch": true, "type": "library", @@ -6672,7 +6695,7 @@ "issues": "https://github.com/craftcms/ecs/issues", "source": "https://github.com/craftcms/ecs/tree/main" }, - "time": "2022-04-12T20:55:14+00:00" + "time": "2022-06-30T16:27:12+00:00" }, { "name": "craftcms/phpstan", @@ -6703,30 +6726,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -6753,7 +6776,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -6769,7 +6792,7 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "myclabs/deep-copy", @@ -6941,85 +6964,18 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, { "name": "phpstan/phpstan", - "version": "1.5.4", + "version": "1.10.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b" + "reference": "8d39218664b45a4a42d5be66d2b63dcf8c149982" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bbf68cae24f6dc023c607ea0f87da55dd9d55c2b", - "reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8d39218664b45a4a42d5be66d2b63dcf8c149982", + "reference": "8d39218664b45a4a42d5be66d2b63dcf8c149982", "shasum": "" }, "require": { @@ -7043,9 +6999,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.5.4" + "source": "https://github.com/phpstan/phpstan/tree/1.10.4" }, "funding": [ { @@ -7056,16 +7016,12 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2022-04-03T12:39:00+00:00" + "time": "2023-03-06T13:39:20+00:00" }, { "name": "phpunit/php-code-coverage", @@ -7366,16 +7322,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.26", + "version": "8.5.33", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ef117c59fc4c54a979021b26d08a3373e386606d" + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ef117c59fc4c54a979021b26d08a3373e386606d", - "reference": "ef117c59fc4c54a979021b26d08a3373e386606d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", "shasum": "" }, "require": { @@ -7390,24 +7346,20 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", "phpunit/php-code-coverage": "^7.0.12", "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", + "sebastian/comparator": "^3.0.5", "sebastian/diff": "^3.0.2", "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", + "sebastian/exporter": "^3.1.5", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "require-dev": { - "ext-pdo": "*" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", @@ -7447,7 +7399,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.26" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" }, "funding": [ { @@ -7457,9 +7409,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-04-01T12:34:39+00:00" + "time": "2023-02-27T13:04:50+00:00" }, { "name": "psr/event-dispatcher", @@ -7568,16 +7524,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { @@ -7630,7 +7586,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, "funding": [ { @@ -7638,7 +7594,7 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", @@ -7771,16 +7727,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -7836,7 +7792,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -7844,7 +7800,7 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", @@ -8242,16 +8198,16 @@ }, { "name": "symfony/css-selector", - "version": "v5.4.3", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "b0a190285cd95cb019237851205b8140ef6e368e" + "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/b0a190285cd95cb019237851205b8140ef6e368e", - "reference": "b0a190285cd95cb019237851205b8140ef6e368e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/95f3c7468db1da8cc360b24fa2a26e7cefcb355d", + "reference": "95f3c7468db1da8cc360b24fa2a26e7cefcb355d", "shasum": "" }, "require": { @@ -8288,7 +8244,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.3" + "source": "https://github.com/symfony/css-selector/tree/v5.4.21" }, "funding": [ { @@ -8304,20 +8260,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-02-14T08:03:56+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.3", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d" + "reference": "f0ae1383a8285dfc6752b8d8602790953118ff5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/dec8a9f58d20df252b9cd89f1c6c1530f747685d", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f0ae1383a8285dfc6752b8d8602790953118ff5a", + "reference": "f0ae1383a8285dfc6752b8d8602790953118ff5a", "shasum": "" }, "require": { @@ -8373,7 +8329,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.21" }, "funding": [ { @@ -8389,11 +8345,11 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-02-14T08:03:56+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -8452,7 +8408,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" }, "funding": [ { @@ -8472,20 +8428,20 @@ }, { "name": "symplify/easy-coding-standard", - "version": "10.1.4", + "version": "10.3.3", "source": { "type": "git", "url": "https://github.com/symplify/easy-coding-standard.git", - "reference": "3fdbead9da24889727dc11804e9bbfb9d4502d3a" + "reference": "c93878b3c052321231519b6540e227380f90be17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symplify/easy-coding-standard/zipball/3fdbead9da24889727dc11804e9bbfb9d4502d3a", - "reference": "3fdbead9da24889727dc11804e9bbfb9d4502d3a", + "url": "https://api.github.com/repos/symplify/easy-coding-standard/zipball/c93878b3c052321231519b6540e227380f90be17", + "reference": "c93878b3c052321231519b6540e227380f90be17", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "conflict": { "friendsofphp/php-cs-fixer": "<3.0", @@ -8497,7 +8453,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "9.5-dev" + "dev-main": "10.3-dev" } }, "autoload": { @@ -8511,7 +8467,7 @@ ], "description": "Prefixed scoped version of ECS package", "support": { - "source": "https://github.com/symplify/easy-coding-standard/tree/10.1.4" + "source": "https://github.com/symplify/easy-coding-standard/tree/10.3.3" }, "funding": [ { @@ -8523,7 +8479,7 @@ "type": "github" } ], - "time": "2022-03-16T15:18:55+00:00" + "time": "2022-06-13T14:03:37+00:00" }, { "name": "theseer/tokenizer", @@ -8589,5 +8545,5 @@ "platform-overrides": { "php": "7.2.5" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } From e98bef9a23b4a4b303ea474083045f27b9301463 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 6 Mar 2023 17:28:25 -0800 Subject: [PATCH 37/49] update ecs container config --- ecs.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ecs.php b/ecs.php index 6a617ade..7b09884d 100644 --- a/ecs.php +++ b/ecs.php @@ -1,18 +1,14 @@ parameters(); - $parameters->set(Option::PARALLEL, true); - $parameters->set(Option::PATHS, [ +return static function(ECSConfig $ecsConfig): void { + $ecsConfig->paths([ __DIR__ . '/src', __FILE__, ]); - $containerConfigurator->import(SetList::CRAFT_CMS_3); -}; + $ecsConfig->parallel(); + $ecsConfig->sets([SetList::CRAFT_CMS_4]); +}; \ No newline at end of file From df83b13aaac8c243966c952eab6bdea394c37460 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 6 Mar 2023 17:33:25 -0800 Subject: [PATCH 38/49] ecs for craft 3 --- ecs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecs.php b/ecs.php index 7b09884d..1d0dfbdd 100644 --- a/ecs.php +++ b/ecs.php @@ -10,5 +10,5 @@ ]); $ecsConfig->parallel(); - $ecsConfig->sets([SetList::CRAFT_CMS_4]); -}; \ No newline at end of file + $ecsConfig->sets([SetList::CRAFT_CMS_3]); +}; From 0b43e5071096ef5b01647b9657af6e9a4b081412 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 6 Mar 2023 19:53:21 -0800 Subject: [PATCH 39/49] changelog for https://github.com/craftcms/feed-me/pull/1240 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 902e9484..f4f1c9fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) - Fixed a PHP error that could occur when you map an assets field with a default value and there is an empty value in the feed. ([#1229](https://github.com/craftcms/feed-me/pull/1229), [#1195](https://github.com/craftcms/feed-me/issues/1195), [#1106](https://github.com/craftcms/feed-me/issues/1106), [#1154](https://github.com/craftcms/feed-me/issues/1154)) - Fixed a bug where simple array comparisons might incorrectly return false on empty arrays during an import. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) +- Fixed multiple issues that could occur when importing elements mapped to a structure section. ([#1240](https://github.com/craftcms/feed-me/pull/1240), [#1154](https://github.com/craftcms/feed-me/issues/1154)) ## 4.5.4 - 2023-01-09 From f804fd8e976005acfc057028931528fe53e50744 Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Tue, 7 Mar 2023 11:09:44 +0000 Subject: [PATCH 40/49] don't disable already disabled elements --- src/base/Element.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/base/Element.php b/src/base/Element.php index 92e4cd80..680b0c04 100644 --- a/src/base/Element.php +++ b/src/base/Element.php @@ -201,8 +201,10 @@ public function disable($elementIds) foreach ($elementIds as $elementId) { /** @var BaseElement $element */ $element = $elementsService->getElementById($elementId, $class); - $element->enabled = false; - $elementsService->saveElement($element, true, true, Hash::get($this->feed, 'updateSearchIndexes')); + if ($element->enabled) { + $element->enabled = false; + $elementsService->saveElement($element, true, true, Hash::get($this->feed, 'updateSearchIndexes')); + } } return true; @@ -226,8 +228,10 @@ public function disableForSite($elementIds) foreach ($query->each() as $element) { /** @var BaseElement $element */ - $element->enabledForSite = false; - $elementsService->saveElement($element, false, false, Hash::get($this->feed, 'updateSearchIndexes')); + if ($element->enabledForSite) { + $element->enabledForSite = false; + $elementsService->saveElement($element, false, false, Hash::get($this->feed, 'updateSearchIndexes')); + } } return true; From 1d5dee11db27d6ba37b6e3684be49606bd15bb49 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Thu, 9 Mar 2023 15:57:57 -0800 Subject: [PATCH 41/49] Changelog for https://github.com/craftcms/feed-me/pull/1248 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4f1c9fe..0eaeb29d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Added - Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) +### Changed +- Feed Me now won't disable already disabled elements when importing a feed, drastically improving the performance of some feeds. ([#1248](https://github.com/craftcms/feed-me/pull/1248), [#1241](https://github.com/craftcms/feed-me/issues/1241)) + ### Fixed - Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1219](https://github.com/craftcms/feed-me/issues/1219)) - Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) From aefe61b4486f620908eb50c375acf5a52519281c Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Thu, 9 Mar 2023 16:31:26 -0800 Subject: [PATCH 42/49] port of https://github.com/craftcms/feed-me/issues/1069 --- CHANGELOG.md | 1 + src/fields/Matrix.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eaeb29d..fef24618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fixed a PHP error that could occur when you map an assets field with a default value and there is an empty value in the feed. ([#1229](https://github.com/craftcms/feed-me/pull/1229), [#1195](https://github.com/craftcms/feed-me/issues/1195), [#1106](https://github.com/craftcms/feed-me/issues/1106), [#1154](https://github.com/craftcms/feed-me/issues/1154)) - Fixed a bug where simple array comparisons might incorrectly return false on empty arrays during an import. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) - Fixed multiple issues that could occur when importing elements mapped to a structure section. ([#1240](https://github.com/craftcms/feed-me/pull/1240), [#1154](https://github.com/craftcms/feed-me/issues/1154)) +- Fixed a PHP error that could occur when importing into a relational field inside of Matrix under certain circumstances. ([#1069](https://github.com/craftcms/feed-me/issues/1069)) ## 4.5.4 - 2023-01-09 diff --git a/src/fields/Matrix.php b/src/fields/Matrix.php index 0d894f6e..32524bd1 100644 --- a/src/fields/Matrix.php +++ b/src/fields/Matrix.php @@ -103,7 +103,7 @@ public function parseField() // Finish up with the content, also sort out cases where there's array content if (isset($fieldData[$key]) && is_array($fieldData[$key])) { - $fieldData[$key] = array_merge_recursive($fieldData[$key], $parsedValue); + $fieldData[$key] = is_array($parsedValue) ? array_merge_recursive($fieldData[$key], $parsedValue) : $fieldData[$key]; } else { $fieldData[$key] = $parsedValue; } From 59a3691e3a33bb71d2251ab35eae889501efbd29 Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Fri, 10 Mar 2023 12:17:45 +0000 Subject: [PATCH 43/49] make sure empty value is changed to an array --- src/helpers/DataHelper.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index b9aba309..0c780f9c 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -96,8 +96,12 @@ public static function fetchDefaultArrayValue($fieldInfo) { $default = Hash::get($fieldInfo, 'default'); - if (!empty($default) && !is_array($default)) { - $default = [$default]; + if (!is_array($default)) { + if (empty($default)) { + $default = []; + } else { + $default = [$default]; + } } return $default; From 303742d396fcff6d714884e335f98e4b0553426f Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Wed, 15 Mar 2023 14:40:28 -0700 Subject: [PATCH 44/49] Fixed an PHP error that would occur if you tried to import a new Asset with a filename > 255 characters --- CHANGELOG.md | 1 + src/helpers/AssetHelper.php | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fef24618..2981d30f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Fixed a bug where simple array comparisons might incorrectly return false on empty arrays during an import. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) - Fixed multiple issues that could occur when importing elements mapped to a structure section. ([#1240](https://github.com/craftcms/feed-me/pull/1240), [#1154](https://github.com/craftcms/feed-me/issues/1154)) - Fixed a PHP error that could occur when importing into a relational field inside of Matrix under certain circumstances. ([#1069](https://github.com/craftcms/feed-me/issues/1069)) +- Fixed an PHP error that would occur if you tried to import a new Asset with a filename > 255 characters. ## 4.5.4 - 2023-01-09 diff --git a/src/helpers/AssetHelper.php b/src/helpers/AssetHelper.php index e618e8b4..cddc26e1 100644 --- a/src/helpers/AssetHelper.php +++ b/src/helpers/AssetHelper.php @@ -280,7 +280,7 @@ private static function createTempFeedMePath() */ public static function getRemoteUrlFilename($url) { - // Function to extract a filename from a URL path. It does not query the actual URL however. + // Function to extract a filename from a URL path. It does not query the actual URL, however. // There are some tricky cases being tested again, and mostly revolves around query strings. We do our best to figure it out! // http://example.com/test.php // http://example.com/test.php?pubid=image.jpg @@ -305,9 +305,7 @@ public static function getRemoteUrlFilename($url) $filename .= '-' . $query; } - $filename = AssetsHelper::prepareAssetName($filename, false); - - return $filename . '.' . $extension; + return AssetsHelper::prepareAssetName("$filename.$extension"); } /** From 875fd32ff0c5ca2002321f052bc7854c606ae614 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Wed, 15 Mar 2023 20:44:40 -0700 Subject: [PATCH 45/49] https://github.com/craftcms/feed-me/pull/1237 --- CHANGELOG.md | 1 + src/helpers/DataHelper.php | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2981d30f..879846b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Fixed a bug where simple array comparisons might incorrectly return false on empty arrays during an import. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) - Fixed multiple issues that could occur when importing elements mapped to a structure section. ([#1240](https://github.com/craftcms/feed-me/pull/1240), [#1154](https://github.com/craftcms/feed-me/issues/1154)) - Fixed a PHP error that could occur when importing into a relational field inside of Matrix under certain circumstances. ([#1069](https://github.com/craftcms/feed-me/issues/1069)) +- Fixed a bug where simple array comparisons might return false if the values were identical, but the keys were mixed. ([#1237](https://github.com/craftcms/feed-me/pull/1237/)) - Fixed an PHP error that would occur if you tried to import a new Asset with a filename > 255 characters. ## 4.5.4 - 2023-01-09 diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 0c780f9c..a66f4cec 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -343,6 +343,19 @@ public static function arrayCompare($array1, $array2) */ private static function _compareSimpleValues($fields, $key, $firstValue, $secondValue): bool { + // When the values are arrays filled with numbers then they most likely represent references to elements. + // Unfortunately these arrays sometimes have non-matching keys, while the values are the same, i.e. reference + // the same elements. In this case, we should determine that the values are the same. + if (Hash::check($fields, $key) + && is_array($firstValue) + && is_array($secondValue) + && array_reduce($firstValue, static fn($carry, $item) => $carry && is_numeric($item), true) + && array_reduce($secondValue, static fn($carry, $item) => $carry && is_numeric($item), true) + && array_values($firstValue) == array_values($secondValue) + ) { + return true; + } + // When the values are empty arrays we do NOT use the Hash::check below because that will always return false if (is_array($firstValue) && is_array($secondValue) && count($firstValue) === 0 && count($secondValue) === 0) { return true; From cc44d42eff6774bc1b17ed80a1c498938fe384f8 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Wed, 15 Mar 2023 20:45:39 -0700 Subject: [PATCH 46/49] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 879846b9..a4b43517 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ - Fixed a bug where simple array comparisons might incorrectly return false on empty arrays during an import. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) - Fixed multiple issues that could occur when importing elements mapped to a structure section. ([#1240](https://github.com/craftcms/feed-me/pull/1240), [#1154](https://github.com/craftcms/feed-me/issues/1154)) - Fixed a PHP error that could occur when importing into a relational field inside of Matrix under certain circumstances. ([#1069](https://github.com/craftcms/feed-me/issues/1069)) -- Fixed a bug where simple array comparisons might return false if the values were identical, but the keys were mixed. ([#1237](https://github.com/craftcms/feed-me/pull/1237/)) +- Fixed a bug where simple array comparisons might return false if the values were identical, but the keys were mixed. ([#1237](https://github.com/craftcms/feed-me/pull/1237/), [#1238](https://github.com/craftcms/feed-me/issues/1238)) - Fixed an PHP error that would occur if you tried to import a new Asset with a filename > 255 characters. ## 4.5.4 - 2023-01-09 From 535db3b7741f392625a717f5473834865df790fb Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Wed, 15 Mar 2023 20:50:59 -0700 Subject: [PATCH 47/49] nope --- CHANGELOG.md | 1 - src/helpers/DataHelper.php | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4b43517..2981d30f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,6 @@ - Fixed a bug where simple array comparisons might incorrectly return false on empty arrays during an import. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) - Fixed multiple issues that could occur when importing elements mapped to a structure section. ([#1240](https://github.com/craftcms/feed-me/pull/1240), [#1154](https://github.com/craftcms/feed-me/issues/1154)) - Fixed a PHP error that could occur when importing into a relational field inside of Matrix under certain circumstances. ([#1069](https://github.com/craftcms/feed-me/issues/1069)) -- Fixed a bug where simple array comparisons might return false if the values were identical, but the keys were mixed. ([#1237](https://github.com/craftcms/feed-me/pull/1237/), [#1238](https://github.com/craftcms/feed-me/issues/1238)) - Fixed an PHP error that would occur if you tried to import a new Asset with a filename > 255 characters. ## 4.5.4 - 2023-01-09 diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index a66f4cec..0c780f9c 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -343,19 +343,6 @@ public static function arrayCompare($array1, $array2) */ private static function _compareSimpleValues($fields, $key, $firstValue, $secondValue): bool { - // When the values are arrays filled with numbers then they most likely represent references to elements. - // Unfortunately these arrays sometimes have non-matching keys, while the values are the same, i.e. reference - // the same elements. In this case, we should determine that the values are the same. - if (Hash::check($fields, $key) - && is_array($firstValue) - && is_array($secondValue) - && array_reduce($firstValue, static fn($carry, $item) => $carry && is_numeric($item), true) - && array_reduce($secondValue, static fn($carry, $item) => $carry && is_numeric($item), true) - && array_values($firstValue) == array_values($secondValue) - ) { - return true; - } - // When the values are empty arrays we do NOT use the Hash::check below because that will always return false if (is_array($firstValue) && is_array($secondValue) && count($firstValue) === 0 && count($secondValue) === 0) { return true; From 8f1cc55e75745e662213450ea3b723f20b43eb42 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Thu, 16 Mar 2023 11:55:54 -0700 Subject: [PATCH 48/49] Changelog tweaks --- CHANGELOG.md | 83 ++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2981d30f..53a1c668 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,20 +2,15 @@ ## Unreleased -### Added -- Added a feed setting that allows feeds to specify if they'd like empty values to used to overwrite existing data. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) - -### Changed -- Feed Me now won't disable already disabled elements when importing a feed, drastically improving the performance of some feeds. ([#1248](https://github.com/craftcms/feed-me/pull/1248), [#1241](https://github.com/craftcms/feed-me/issues/1241)) - -### Fixed +- Added the “Set Empty Values” feed setting, which determines whether empty values in the feed should be respected or ignored. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) +- Disabled elements are no longer redundantly re-disabled, drastically improving the performance of some feed imports. ([#1248](https://github.com/craftcms/feed-me/pull/1248), [#1241](https://github.com/craftcms/feed-me/issues/1241)) - Fixed a bug where some feed element data would be considered changed even if there were no changes. ([#1220](https://github.com/craftcms/feed-me/pull/1220), [#1219](https://github.com/craftcms/feed-me/issues/1219), [#1223](https://github.com/craftcms/feed-me/pull/1223/), [#1219](https://github.com/craftcms/feed-me/issues/1219)) -- Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources and not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) -- Fixed a PHP error that could occur when you map an assets field with a default value and there is an empty value in the feed. ([#1229](https://github.com/craftcms/feed-me/pull/1229), [#1195](https://github.com/craftcms/feed-me/issues/1195), [#1106](https://github.com/craftcms/feed-me/issues/1106), [#1154](https://github.com/craftcms/feed-me/issues/1154)) -- Fixed a bug where simple array comparisons might incorrectly return false on empty arrays during an import. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) -- Fixed multiple issues that could occur when importing elements mapped to a structure section. ([#1240](https://github.com/craftcms/feed-me/pull/1240), [#1154](https://github.com/craftcms/feed-me/issues/1154)) -- Fixed a PHP error that could occur when importing into a relational field inside of Matrix under certain circumstances. ([#1069](https://github.com/craftcms/feed-me/issues/1069)) -- Fixed an PHP error that would occur if you tried to import a new Asset with a filename > 255 characters. +- Fixed a bug where the default value modal for relational fields on the feed mapping page would show all available sources, not just the sources allowed for the field. ([#1234](https://github.com/craftcms/feed-me/pull/1234)) +- Fixed a PHP error that could occur when a feed contained an empty value that was mapped to an Assets field. ([#1229](https://github.com/craftcms/feed-me/pull/1229), [#1195](https://github.com/craftcms/feed-me/issues/1195), [#1106](https://github.com/craftcms/feed-me/issues/1106), [#1154](https://github.com/craftcms/feed-me/issues/1154)) +- Fixed a bug where empty arrays could be misinterpreted during feed imports. ([#1236](https://github.com/craftcms/feed-me/pull/1236)) +- Fixed several issues related to importing categories and Structure section entries. ([#1240](https://github.com/craftcms/feed-me/pull/1240), [#1154](https://github.com/craftcms/feed-me/issues/1154)) +- Fixed a PHP error that could occur when importing relational field data within a Matrix field. ([#1069](https://github.com/craftcms/feed-me/issues/1069)) +- Fixed a PHP error that occurred when importing an asset with a filename over 255 characters long. ## 4.5.4 - 2023-01-09 @@ -43,7 +38,7 @@ ## 4.5.0 - 2022-04-21 ### Changed -- Entries imported within sections whose Propagation Method is set to “Let each entry choose which sites it should be saved to” are no longer created for all of the section's supported sites. ([#1084](https://github.com/craftcms/feed-me/issues/1084)) +- Entries imported within sections whose Propagation Method is set to “Let each entry choose which sites it should be saved to” are no longer created for all of the section’s supported sites. ([#1084](https://github.com/craftcms/feed-me/issues/1084)) ## 4.4.3 - 2022-04-06 @@ -61,7 +56,7 @@ ### Fixed - Fixed a bug that would prevent relating products in Products field. ([#1058](https://github.com/craftcms/feed-me/issues/1058)) - Fixed a bug that would prevent changing element status on multisite when the target site was set to default. ([#606](https://github.com/craftcms/feed-me/issues/606)) -- Fixed a bug where mapping fields for an entry fieldtype wasn't showing the correct available fields. ([#1098](https://github.com/craftcms/feed-me/pull/1098), ([#692](https://github.com/craftcms/feed-me/issues/692)), ([#825](https://github.com/craftcms/feed-me/issues/825)) +- Fixed a bug where mapping fields for an entry fieldtype wasn’t showing the correct available fields. ([#1098](https://github.com/craftcms/feed-me/pull/1098), ([#692](https://github.com/craftcms/feed-me/issues/692)), ([#825](https://github.com/craftcms/feed-me/issues/825)) ## 4.4.1.1 - 2021-12-06 @@ -334,7 +329,7 @@ ## 3.1.12 - 2019-03-03 ### Fixed -- Ensure all complex fields don't process when none of their sub-fields are mapped. +- Ensure all complex fields don’t process when none of their sub-fields are mapped. ## 3.1.11 - 2019-03-02 @@ -342,7 +337,7 @@ - Added config option to run Garbage Collection before a feed starts. ### Fixed -- Ensure complex fields (Matrix, etc) don't process when none of their sub-fields are mapped. +- Ensure complex fields (Matrix, etc) don’t process when none of their sub-fields are mapped. ## 3.1.10 - 2019-02-26 @@ -432,14 +427,14 @@ ## 3.1.1 - 2019-02-01 ### Added -- Updates to asset element importing, including "URL or Path" field. +- Updates to asset element importing, including “URL or Path” field. - Added docs guide for asset element importing (finally, right). ### Changed - Add some more clarity around errors in help requests. - Update processing events to be cancelable and modify params. - Upgrades to nesbot/carbon ^2.10. -- Allow `getSelectOptions()` to modify the ‘none’ option. +- Allow `getSelectOptions()` to modify the `none` option. - Alphabetise help feeds. ### Fixed @@ -624,7 +619,7 @@ - Fix element fields in Matrix not mapping correctly. - Fix Twig parsing in default and feed data too early, resulting in empty values. - Matrix - fix block types with no fields messing things up. -- Fix ‘placeholder’ in products query causing PostgreSQL errors. +- Fix `placeholder` in products query causing PostgreSQL errors. - Fix error thrown on entry mapping screen when no sections are available. - Assets - fix filename matches not including subfolders. - Table - protect against array values importing into fields. @@ -656,7 +651,7 @@ ### Changed - Ensure element fields don’t throw fatal errors when unable to save - allowing owner element to continue. - Products - remove required attribute on unlimited stock. -- Change element field matching existing elements querying. Fixes the case where trying to match elements with the keyword 'not' in the value. +- Change element field matching existing elements querying. Fixes the case where trying to match elements with the keyword `not` in the value. ### Fixed - Fix primary element iterator when only one item in feed (in some cases). @@ -687,7 +682,7 @@ - Use registerTwigExtension(), otherwise may cause Twig to be loaded before it should be (thanks @brandonkelly) - Entry - Fix authors not being created when they should be. - CSV - fix for line breaks in headings causing issues. -- Fix for variants in that they can potentially move to another product type, or otherwise plucked from a product other than the one you're importing. +- Fix for variants in that they can potentially move to another product type, or otherwise plucked from a product other than the one you’re importing. - Fix incorrect variant custom field namespace. ## 3.0.0-beta.17 - 2018-07-19 @@ -801,7 +796,7 @@ - Fix matching existing elements with special characters - Improve handling of remote asset handling when `HEAD` requests fail - Fix help widget -- Improve date-helper to handle ‘0’ +- Improve date-helper to handle `0` - Table - ensure dates are parsed ## 3.0.0-beta.9 - 2018-04-28 @@ -879,7 +874,7 @@ ## 3.0.0-beta.1 - 2018-04-03 -> {warning} Feed Me 3.0.0 is a major release with significant, breaking changes. Be sure to back up your existing Feed Me 2.x.x settings. In most cases, you'll be required to re-map fields to your feed data, as this has been heavily changed and improved. +> {warning} Feed Me 3.0.0 is a major release with significant, breaking changes. Be sure to back up your existing Feed Me 2.x.x settings. In most cases, you’ll be required to re-map fields to your feed data, as this has been heavily changed and improved. ### Added - Support for Craft 3, and all that comes with it. @@ -898,11 +893,11 @@ - Better handling of default field values under the hood. - Lots of smaller improvements pathing the way to more major changes in 3.1.0. - Better support for uploading remote assets (a little faster too). -- When running from the command line (curl, wget, etc), feed processing will wait until it's finished before ending the request. +- When running from the command line (curl, wget, etc), feed processing will wait until it’s finished before ending the request. - Improved UI for mapping complex fields (Matrix, Table). Includes setting collapsed state for Matrix fields. - Improved UI for mapping sub-element fields. Fields are hidden by default and can be toggled to provide better visual clarity. -- Improved UI for logs, also shows log 'type' to easily pick up errors. -- When a feed fails or contains errors it will no longer show the red error symbol for the queue job. Errors are recorded in the logs, but it won't cause other queue jobs to prevent being run, and notifying clients of an error. +- Improved UI for logs, also shows log `type` to easily pick up errors. +- When a feed fails or contains errors it will no longer show the red error symbol for the queue job. Errors are recorded in the logs, but it won’t cause other queue jobs to prevent being run, and notifying clients of an error. - Logs now capture additional information of line/file when exceptions occur. - utilise Guzzle for all HTTP requests, rather than new instances of Curl. - Improved Help widget to utilise API for sending emails, not relying on local relay. Caused immeasurable amount of issues for people try to get support! @@ -958,7 +953,7 @@ - Date - Add date formatting options for date field. - Ensure each run of the feed uses a fresh criteria model. - Matrix - improvements for Super Table handling. -- Add extra truthy detections for ‘live’ and ‘enabled’. +- Add extra truthy detections for `live` and `enabled`. ### Fixed - Load custom (fixed) version of selectize to fix being unable to un-select defaults. @@ -970,7 +965,7 @@ - Fix regex for short-hand twig detection. - Fix for Table field not processing more than 10 rows. - Ensure more than just plain sub-element field are styed correctly. -- Elements - Ensure we properly escape ‘{‘ characters, and don’t assume they’re short-hand twig. +- Elements - Ensure we properly escape `{` characters, and don’t assume they’re short-hand twig. - Entries fieldtype - don’t rely on parent element being a section. - Assets - Fix folder-mapping from 2.0.7 (requires re-mapping). - Support for limitAutoSlugsToAscii for element slugs. @@ -1076,7 +1071,7 @@ ### Changed - Refactor remote asset uploading/handling. - Remote assets - Better support for dynamic paths set in asset fields (ie `{slug}`). -- Remote assets - When set to `Keep Original`, don't download it and then check if it exists in Craft - it can be skipped. +- Remote assets - When set to `Keep Original`, don’t download it and then check if it exists in Craft - it can be skipped. - Ensure all fields are bootstrapped with the owner element being imported. - Improve Commerce Products matching on existing elements (including better variant-field support). - Remove certain unique identifier options for Product Variants - the element criteria doesn’t support them anyway. @@ -1135,7 +1130,7 @@ - Added support for Categories, Users, Entries, Commerce Products - Support for third-party element types - Auto-upload Assets when mapping -- Support to map content to element's inner fields (think fields for assets) +- Support to map content to element’s inner fields (think fields for assets) - Added Assets ElementType - easily upload assets into Craft. - Direct access to mapping screen - Support attribute-mapping for XML feeds @@ -1144,9 +1139,9 @@ - Added debug icon to Feeds index. - Added Element ID mapping. *A word of warning - * do not use this for importing new data. [Read more](https://sgroup.com.au/plugins/feedme/feature-tour/field-mapping#element-iDs). - Added parent-mapping for Entry and Category. -- Elements can be created if they don't exist +- Elements can be created if they don’t exist - Assets can be uploaded automatically, with options for conflict handling -- Added support to map element fields' own custom fields (think fields for assets). Currently only supports simple fields. +- Added support to map element fields’ own custom fields (think fields for assets). Currently only supports simple fields. - Support for importing Categories, Users, Entries, Commerce Products - Support for third-party Element Types using `registerFeedMeElementTypes` - Added `onBeforeProcessFeed`, `onProcessFeed`, and `onStepProcessFeed` events @@ -1170,9 +1165,9 @@ - Feed mapping now looks at entire feed structure for nodes, rather than just the first node - Feed mapping is no longer case-insensitive - Proper confirmation screen when importing, with progress bar -- Feeds no longer die when an error occurs. It'll try to complete the rest of the feed, notifying you of errors at the end of processing. +- Feeds no longer die when an error occurs. It’ll try to complete the rest of the feed, notifying you of errors at the end of processing. - Sub-folders are now searched for existing assets. -- Improved handling of inconsistent, repeatable nodes (I'm looking at you XML). +- Improved handling of inconsistent, repeatable nodes (I’m looking at you XML). - Asterisks are now shown during mapping for required fields - a handy reminder. - User importing no longer requires a User Group set. - More modular handling by moving to separate classes @@ -1186,9 +1181,9 @@ - Remove database logging (no longer used) - Fix support for local feeds - Feed no longer lags when processing from the control panel -- Fix issue where task wouldn't fire asynchronously, locking up the CP -- Fixed issue where pending/disabled existing entries weren't being matched for updating/deleting -- Prevent feed from processing if there are no nodes to process. Fixes deletion when elements shouldn't be +- Fix issue where task wouldn’t fire asynchronously, locking up the CP +- Fixed issue where pending/disabled existing entries weren’t being matched for updating/deleting +- Prevent feed from processing if there are no nodes to process. Fixes deletion when elements shouldn’t be - Treat boolean-like values with the respect they deserve. - Added Shipping Category for Commerce Products. - Fixes to Help requests not validating - therefore unable to send @@ -1216,7 +1211,7 @@ ### Changed - FeedUrl attribute stored as `TEXT` column type to allow for longer URLs. -- Improved JSON parsing to use Yii's JsonHelper class, with better logging when failing. +- Improved JSON parsing to use Yii’s JsonHelper class, with better logging when failing. ## 1.4.9 - 2016-03-15 @@ -1308,7 +1303,7 @@ ## 1.3.3 - 2015-11-25 -- Minor fix for log reporting which wasn't displaying errors in a useful way. +- Minor fix for log reporting which wasn’t displaying errors in a useful way. ## 1.3.2 - 2015-11-25 @@ -1320,7 +1315,7 @@ ## 1.3.0 - 2015-11-25 -- Refactored direct processing to utalize Craft's tasks service, rather than using pure PHP processing. This greatly improves performance as PHP processing would run out of memory extremely quickly. +- Refactored direct processing to utalize Craft’s tasks service, rather than using pure PHP processing. This greatly improves performance as PHP processing would run out of memory extremely quickly. ## 1.2.9 - 2015-11-25 @@ -1329,7 +1324,7 @@ - Added help tab, allowing users to submit their feed info and setup for debugging/troubleshooting. - Fix for fields in Matrix blocks only succesfully mapping textual fields. Complex fields such as Assets, Entries, etc were not mapping correctly. - Fix for only one item being processed when Delete duplication handling was selected. -- Fix for Dropdown/RadioButtons causing a critical error when a provided value didn't exist in the field. +- Fix for Dropdown/RadioButtons causing a critical error when a provided value didn’t exist in the field. - Added credit and plugin url to footer. ## 1.2.8 - 2015-11-25 @@ -1357,7 +1352,7 @@ - Refactoring for performance improvements. - Remove database logging until a better performing option is figured out. Logging still occurs to the file system under `craft/storage/runtime/logs/`. - Added optional backup option per-feed (default to true). -- Minor fix so direct feed link doesn't use `siteUrl`. +- Minor fix so direct feed link doesn’t use `siteUrl`. ## 1.2.4 - 2015-11-25 @@ -1366,7 +1361,7 @@ ## 1.2.3 - 2015-11-25 - Primary Element is no longer required - important for JSON feeds. -- Fixes for when no primary element specified. It's pretty much optional now. +- Fixes for when no primary element specified. It’s pretty much optional now. - UI tidy for mapping table. - Fix for duplication handling not matching in some cases. Now uses element search. From 289ef9f45234c0662738f443583430506f04704d Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Thu, 16 Mar 2023 11:56:32 -0700 Subject: [PATCH 49/49] Finish 4.6.0 --- CHANGELOG.md | 2 +- composer.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53a1c668..6e6be630 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes for Feed Me 4.x -## Unreleased +## 4.6.0 - 2023-03-16 - Added the “Set Empty Values” feed setting, which determines whether empty values in the feed should be respected or ignored. ([#1228](https://github.com/craftcms/feed-me/pull/1228), [#797](https://github.com/craftcms/feed-me/issues/797), [#723](https://github.com/craftcms/feed-me/issues/723), [#854](https://github.com/craftcms/feed-me/issues/854), [#680](https://github.com/craftcms/feed-me/issues/680)) - Disabled elements are no longer redundantly re-disabled, drastically improving the performance of some feed imports. ([#1248](https://github.com/craftcms/feed-me/pull/1248), [#1241](https://github.com/craftcms/feed-me/issues/1241)) diff --git a/composer.json b/composer.json index a32319d8..9e5777f4 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,6 @@ "name": "craftcms/feed-me", "description": "Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.", "type": "craft-plugin", - "version": "4.5.4", "keywords": [ "craft", "cms",