From ec983eaa2224896b0dec01cc5abd66bb2338fb53 Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 17:47:02 -0400 Subject: [PATCH 1/8] add additional versions to test --- .github/workflows/php.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 8af361b..198a61f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -20,10 +20,18 @@ jobs: config: 4 - constraint: ~4.6.0 config: 4 - - constraint: ~4.7.0 + - constraint: ~4.7.0 config: 4 - constraint: ~5.0.0 config: 5 + - constraint: ~5.1.0 + config: 5 + - constraint: ~5.2.0 + config: 5 + - constraint: ~5.3.0 + config: 5 + - constraint: ~5.4.0 + config: 5 env: CRAFT_APP_ID: pest From 217bba95c16dc9d7795db07d80cb2398007122fd Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 17:56:25 -0400 Subject: [PATCH 2/8] pushing correct project config for 5.2 --- .github/workflows/php.yml | 4 +- ...-b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml | 80 +++++++++++++ ...-0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml | 110 ++++++++++++++++++ ...-17685ada-d64c-459c-b9fc-678d43e4bee8.yaml | 32 +++++ ...-c148dfb3-a122-49ed-8538-de26d0482663.yaml | 22 ++++ ...-c05f8773-60a8-4f5e-9925-3cc36a064793.yaml | 16 +++ ...-10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml | 16 +++ ...-c7529b61-60cd-4e18-a272-3084aee7fa89.yaml | 19 +++ ...-7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml | 16 +++ stubs/config/project-5.2/graphql/graphql.yaml | 3 + .../184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml | 2 + ...-b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml | 78 +++++++++++++ stubs/config/project-5.2/project.yaml | 36 ++++++ ...-ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml | 29 +++++ .../b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml | 1 + .../bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml | 1 + ...-99c2747f-1049-46bc-93e0-424bad0544e5.yaml | 9 ++ ...-bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml | 9 ++ .../4ea4c761-9214-4e32-b594-58e906282652.yaml | 110 ++++++++++++++++++ stubs/config/project-5.2/users/users.yaml | 5 + ...-3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml | 47 ++++++++ 21 files changed, 643 insertions(+), 2 deletions(-) create mode 100644 stubs/config/project-5.2/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml create mode 100644 stubs/config/project-5.2/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml create mode 100644 stubs/config/project-5.2/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml create mode 100644 stubs/config/project-5.2/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml create mode 100644 stubs/config/project-5.2/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml create mode 100644 stubs/config/project-5.2/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml create mode 100644 stubs/config/project-5.2/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml create mode 100644 stubs/config/project-5.2/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml create mode 100644 stubs/config/project-5.2/graphql/graphql.yaml create mode 100644 stubs/config/project-5.2/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml create mode 100644 stubs/config/project-5.2/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml create mode 100644 stubs/config/project-5.2/project.yaml create mode 100644 stubs/config/project-5.2/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml create mode 100644 stubs/config/project-5.2/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml create mode 100644 stubs/config/project-5.2/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml create mode 100644 stubs/config/project-5.2/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml create mode 100644 stubs/config/project-5.2/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml create mode 100644 stubs/config/project-5.2/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml create mode 100644 stubs/config/project-5.2/users/users.yaml create mode 100644 stubs/config/project-5.2/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 198a61f..3533474 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -29,9 +29,9 @@ jobs: - constraint: ~5.2.0 config: 5 - constraint: ~5.3.0 - config: 5 + config: 5.2 - constraint: ~5.4.0 - config: 5 + config: 5.2 env: CRAFT_APP_ID: pest diff --git a/stubs/config/project-5.2/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml b/stubs/config/project-5.2/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml new file mode 100644 index 0000000..d8d2701 --- /dev/null +++ b/stubs/config/project-5.2/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml @@ -0,0 +1,80 @@ +color: null +fieldLayouts: + 2f77cf1c-a3db-4396-8d2f-efff2172466e: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\entries\EntryTitleField + uid: 463de371-8db2-4f1d-b9b1-b9aca58b5c86 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c05f8773-60a8-4f5e-9925-3cc36a064793 # Field One + handle: null + includeInCards: true + instructions: null + label: 'Field One' + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 6a242257-5d04-4ffb-8afb-f0b091472335 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 10199d0e-57f0-4724-aefb-1ef4ed73b408 # Field Two + handle: null + includeInCards: false + instructions: null + label: 'Field Two' + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 4b8f210d-545c-4d57-9777-08cdb93862df + userCondition: null + warning: null + width: 100 + name: Content + uid: aad92478-a4a8-49e5-b88b-5fff4734eb2c + userCondition: null +handle: blockTypeOne +hasTitleField: false +icon: null +name: 'Block Type One' +showSlugField: true +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site +titleFormat: null +titleTranslationKeyFormat: null +titleTranslationMethod: site diff --git a/stubs/config/project-5.2/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml b/stubs/config/project-5.2/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml new file mode 100644 index 0000000..df084dd --- /dev/null +++ b/stubs/config/project-5.2/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml @@ -0,0 +1,110 @@ +color: null +fieldLayouts: + 50cdf242-1476-44dc-ab8b-e3ad70ef3163: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\entries\EntryTitleField + uid: 880e50a3-79fb-4456-836b-89c970af40b9 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c7529b61-60cd-4e18-a272-3084aee7fa89 # Matrix Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 90a7fa0d-77cd-4612-92f9-4fafd4c1a66d + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c148dfb3-a122-49ed-8538-de26d0482663 # Entries Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: efbdd2ca-b829-4604-bd1e-f66fad9093e2 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e # Text Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 189519d9-7809-47fc-bc54-d2441a85ae9d + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 17685ada-d64c-459c-b9fc-678d43e4bee8 # Dropdown Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 1440d116-5fe9-45a3-8031-7f3c9b71ef9d + userCondition: null + warning: null + width: 100 + name: Content + uid: a914e695-0910-4b04-841b-cbe6f689856b + userCondition: null +handle: default +hasTitleField: true +icon: null +name: Default +showSlugField: true +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site +titleFormat: null +titleTranslationKeyFormat: null +titleTranslationMethod: site diff --git a/stubs/config/project-5.2/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml b/stubs/config/project-5.2/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml new file mode 100644 index 0000000..54c1fe3 --- /dev/null +++ b/stubs/config/project-5.2/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml @@ -0,0 +1,32 @@ +columnSuffix: vqczhrcp +handle: dropdownField +instructions: null +name: 'Dropdown Field' +searchable: false +settings: + options: + - + __assoc__: + - + - label + - One + - + - value + - one + - + - default + - '' + - + __assoc__: + - + - label + - Two + - + - value + - two + - + - default + - '' +translationKeyFormat: null +translationMethod: none +type: craft\fields\Dropdown diff --git a/stubs/config/project-5.2/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml b/stubs/config/project-5.2/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml new file mode 100644 index 0000000..b186836 --- /dev/null +++ b/stubs/config/project-5.2/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml @@ -0,0 +1,22 @@ +columnSuffix: null +handle: entriesField +instructions: null +name: 'Entries Field' +searchable: false +settings: + allowSelfRelations: false + branchLimit: null + localizeRelations: false + maintainHierarchy: false + maxRelations: null + minRelations: null + selectionLabel: null + showCardsInGrid: false + showSiteMenu: false + sources: '*' + targetSiteId: null + validateRelatedElements: false + viewMode: null +translationKeyFormat: null +translationMethod: site +type: craft\fields\Entries diff --git a/stubs/config/project-5.2/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml b/stubs/config/project-5.2/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml new file mode 100644 index 0000000..a079266 --- /dev/null +++ b/stubs/config/project-5.2/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml @@ -0,0 +1,16 @@ +columnSuffix: jnvscjst +handle: fieldOne +instructions: null +name: 'Matrix Field - Block Type One - Field One' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.2/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml b/stubs/config/project-5.2/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml new file mode 100644 index 0000000..3417eed --- /dev/null +++ b/stubs/config/project-5.2/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml @@ -0,0 +1,16 @@ +columnSuffix: swmzeype +handle: fieldTwo +instructions: null +name: 'Matrix Field - Block Type One - Field Two' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.2/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml b/stubs/config/project-5.2/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml new file mode 100644 index 0000000..df84700 --- /dev/null +++ b/stubs/config/project-5.2/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml @@ -0,0 +1,19 @@ +columnSuffix: null +handle: matrixField +instructions: null +name: 'Matrix Field' +searchable: false +settings: + entryTypes: + - b5c238dd-588f-4f0a-b9e4-8a988f0e7468 # Block Type One + includeTableView: false + maxEntries: null + minEntries: null + pageSize: null + propagationKeyFormat: null + propagationMethod: all + showCardsInGrid: false + viewMode: blocks +translationKeyFormat: null +translationMethod: site +type: craft\fields\Matrix diff --git a/stubs/config/project-5.2/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml b/stubs/config/project-5.2/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml new file mode 100644 index 0000000..04c6255 --- /dev/null +++ b/stubs/config/project-5.2/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml @@ -0,0 +1,16 @@ +columnSuffix: irlrybem +handle: textField +instructions: null +name: 'Text Field' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.2/graphql/graphql.yaml b/stubs/config/project-5.2/graphql/graphql.yaml new file mode 100644 index 0000000..fd4ca55 --- /dev/null +++ b/stubs/config/project-5.2/graphql/graphql.yaml @@ -0,0 +1,3 @@ +publicToken: + enabled: false + expiryDate: null diff --git a/stubs/config/project-5.2/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml b/stubs/config/project-5.2/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml new file mode 100644 index 0000000..6288789 --- /dev/null +++ b/stubs/config/project-5.2/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml @@ -0,0 +1,2 @@ +isPublic: true +name: 'Public Schema' diff --git a/stubs/config/project-5.2/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml b/stubs/config/project-5.2/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml new file mode 100644 index 0000000..a95c29e --- /dev/null +++ b/stubs/config/project-5.2/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml @@ -0,0 +1,78 @@ +field: c7529b61-60cd-4e18-a272-3084aee7fa89 # Matrix Field +fieldLayouts: + 2f77cf1c-a3db-4396-8d2f-efff2172466e: + tabs: + - + elementCondition: null + elements: + - + elementCondition: null + fieldUid: c05f8773-60a8-4f5e-9925-3cc36a064793 # Field One + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 6a242257-5d04-4ffb-8afb-f0b091472335 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 10199d0e-57f0-4724-aefb-1ef4ed73b408 # Field Two + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 4b8f210d-545c-4d57-9777-08cdb93862df + userCondition: null + warning: null + width: 100 + name: Content + uid: aad92478-a4a8-49e5-b88b-5fff4734eb2c + userCondition: null +fields: + 10199d0e-57f0-4724-aefb-1ef4ed73b408: # Field Two + columnSuffix: swmzeype + contentColumnType: text + fieldGroup: null + handle: fieldTwo + instructions: null + name: 'Field Two' + searchable: false + settings: + byteLimit: null + charLimit: null + code: false + columnType: null + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText + c05f8773-60a8-4f5e-9925-3cc36a064793: # Field One + columnSuffix: jnvscjst + contentColumnType: text + fieldGroup: null + handle: fieldOne + instructions: null + name: 'Field One' + searchable: false + settings: + byteLimit: null + charLimit: null + code: false + columnType: null + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText +handle: blockTypeOne +name: 'Block Type One' +sortOrder: 1 diff --git a/stubs/config/project-5.2/project.yaml b/stubs/config/project-5.2/project.yaml new file mode 100644 index 0000000..4a02359 --- /dev/null +++ b/stubs/config/project-5.2/project.yaml @@ -0,0 +1,36 @@ +dateModified: 1727733290 +email: + fromEmail: michael@bluth.com + fromName: Pest + transportType: craft\mail\transportadapters\Sendmail +fs: + local: + hasUrls: true + name: Local + settings: + path: /workspaces/craft-pest-core/web/volumes/local + type: craft\fs\Local + url: 'http://localhost:8080/volumes/local/' +meta: + __names__: + 3b2c4b24-e463-46ca-be26-7285804ecbb1: Local # Local + 7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e: 'Text Field' # Text Field + 99c2747f-1049-46bc-93e0-424bad0544e5: Pest # Pest + 184fa66e-14cd-4045-853d-9a69ecf44e4e: 'Public Schema' # Public Schema + 0193fbbc-6912-4ff6-a3d5-e60ea03c8590: Default # Default + 10199d0e-57f0-4724-aefb-1ef4ed73b408: 'Field Two' # Field Two + 17685ada-d64c-459c-b9fc-678d43e4bee8: 'Dropdown Field' # Dropdown Field + ae919370-04f6-4e2d-8d42-f255cc1b6a75: Posts # Posts + b5c238dd-588f-4f0a-b9e4-8a988f0e7468: 'Block Type One' # Block Type One + b11e9b16-d6b0-4771-86bb-3fe962b4596d: Pest # Pest + bda4d299-4f91-43c1-91d1-48abd1dd5fb4: Pest # Pest + bdde35b2-daab-45e7-aef7-43fd8b221aa2: Pest # Pest + c05f8773-60a8-4f5e-9925-3cc36a064793: 'Field One' # Field One + c148dfb3-a122-49ed-8538-de26d0482663: 'Entries Field' # Entries Field + c7529b61-60cd-4e18-a272-3084aee7fa89: 'Matrix Field' # Matrix Field +system: + edition: pro + live: true + name: Pest + schemaVersion: 5.0.0.21 + timeZone: America/Los_Angeles diff --git a/stubs/config/project-5.2/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml b/stubs/config/project-5.2/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml new file mode 100644 index 0000000..54728c7 --- /dev/null +++ b/stubs/config/project-5.2/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml @@ -0,0 +1,29 @@ +defaultPlacement: end +enableVersioning: true +entryTypes: + - 0193fbbc-6912-4ff6-a3d5-e60ea03c8590 # Default +handle: posts +maxAuthors: 1 +name: Posts +previewTargets: + - + __assoc__: + - + - label + - 'Primary entry page' + - + - urlFormat + - '{url}' +propagationMethod: all +siteSettings: + 99c2747f-1049-46bc-93e0-424bad0544e5: # Pest + enabledByDefault: true + hasUrls: true + template: posts/_entry + uriFormat: 'posts/{slug}' + bda4d299-4f91-43c1-91d1-48abd1dd5fb4: # Pest + enabledByDefault: true + hasUrls: true + template: posts/_entry + uriFormat: 'posts/{slug}' +type: channel diff --git a/stubs/config/project-5.2/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml b/stubs/config/project-5.2/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml new file mode 100644 index 0000000..ed2ddb7 --- /dev/null +++ b/stubs/config/project-5.2/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml @@ -0,0 +1 @@ +name: Pest diff --git a/stubs/config/project-5.2/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml b/stubs/config/project-5.2/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml new file mode 100644 index 0000000..ed2ddb7 --- /dev/null +++ b/stubs/config/project-5.2/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml @@ -0,0 +1 @@ +name: Pest diff --git a/stubs/config/project-5.2/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml b/stubs/config/project-5.2/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml new file mode 100644 index 0000000..063150f --- /dev/null +++ b/stubs/config/project-5.2/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml @@ -0,0 +1,9 @@ +baseUrl: $PRIMARY_SITE_URL +enabled: true +handle: default +hasUrls: true +language: en-US +name: Pest +primary: true +siteGroup: bdde35b2-daab-45e7-aef7-43fd8b221aa2 # Pest +sortOrder: 1 diff --git a/stubs/config/project-5.2/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml b/stubs/config/project-5.2/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml new file mode 100644 index 0000000..dda612b --- /dev/null +++ b/stubs/config/project-5.2/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml @@ -0,0 +1,9 @@ +baseUrl: $PRIMARY_SITE_URL +enabled: '1' +handle: default +hasUrls: true +language: en-US +name: Pest +primary: false +siteGroup: b11e9b16-d6b0-4771-86bb-3fe962b4596d # Pest +sortOrder: 1 diff --git a/stubs/config/project-5.2/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml b/stubs/config/project-5.2/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml new file mode 100644 index 0000000..757ccce --- /dev/null +++ b/stubs/config/project-5.2/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml @@ -0,0 +1,110 @@ +tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\UsernameField + uid: 8d4db13b-bf33-4fcb-a4b3-465419ff6554 + userCondition: null + warning: null + width: 100 + - + attribute: fullName + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: true + required: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\FullNameField + uid: 40cd1617-0f35-489c-bc2a-508347941659 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + id: null + includeInCards: false + instructions: null + label: null + orientation: null + providesThumbs: false + requirable: false + tip: null + type: craft\fieldlayoutelements\users\PhotoField + uid: 1e08b8ec-6f86-482b-89fe-8ec91608e9a2 + userCondition: null + warning: null + width: 100 + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\EmailField + uid: 54368c30-4e82-4caa-b568-ea6d72ac8e1c + userCondition: null + width: 100 + name: Content + uid: 5d3a7ac6-f14a-453a-9ac9-9f6cda4c594e + userCondition: null diff --git a/stubs/config/project-5.2/users/users.yaml b/stubs/config/project-5.2/users/users.yaml new file mode 100644 index 0000000..5ffedb3 --- /dev/null +++ b/stubs/config/project-5.2/users/users.yaml @@ -0,0 +1,5 @@ +allowPublicRegistration: false +defaultGroup: null +photoSubpath: null +photoVolumeUid: null +requireEmailVerification: true diff --git a/stubs/config/project-5.2/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml b/stubs/config/project-5.2/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml new file mode 100644 index 0000000..72ba152 --- /dev/null +++ b/stubs/config/project-5.2/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml @@ -0,0 +1,47 @@ +fieldLayouts: + 7948cc32-6d40-46b7-af5d-39b77f566df7: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\assets\AssetTitleField + uid: 8c8df736-809a-41c5-a4f1-e48f3392078d + userCondition: null + warning: null + width: 100 + name: Content + uid: 1e2b784c-d10c-4014-831d-d78877cf8580 + userCondition: null +fs: local +handle: local +name: Local +sortOrder: 1 +subpath: '' +titleTranslationKeyFormat: null +titleTranslationMethod: site +transformFs: null +transformSubpath: '' From 57892ad040d5171306f04d8608736469880e3277 Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 17:56:44 -0400 Subject: [PATCH 3/8] pushing correct project config for 5.2 --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 3533474..8a15083 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -27,7 +27,7 @@ jobs: - constraint: ~5.1.0 config: 5 - constraint: ~5.2.0 - config: 5 + config: 5.2 - constraint: ~5.3.0 config: 5.2 - constraint: ~5.4.0 From 76528eab8ea399cbd690559b3cc4877ba581fb6b Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 18:22:45 -0400 Subject: [PATCH 4/8] fixing cookie expiration math --- src/behaviors/TestableResponseBehavior.php | 19 ++++++++++++++++--- src/http/RequestBuilder.php | 3 ++- src/test/CookieState.php | 5 ++++- tests/CookieTest.php | 5 +++++ tests/templates/responses/expired-cookie.twig | 6 ++++++ 5 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 tests/templates/responses/expired-cookie.twig diff --git a/src/behaviors/TestableResponseBehavior.php b/src/behaviors/TestableResponseBehavior.php index 97e2c87..b921adb 100644 --- a/src/behaviors/TestableResponseBehavior.php +++ b/src/behaviors/TestableResponseBehavior.php @@ -2,6 +2,7 @@ namespace markhuot\craftpest\behaviors; +use Carbon\Carbon; use Illuminate\Support\Arr; use markhuot\craftpest\dom\Form; use markhuot\craftpest\dom\NodeList; @@ -267,7 +268,13 @@ public function assertCookieExpired(string $name) // Then check the expiration of it $cookie = $this->response->cookies->get($name); - if ($cookie->expire === 0 || $cookie->expire >= time()) { + + if ($cookie->expire === null) { + Assert::fail('Cookie `'.$name.'` does not have an expiration date.'); + } + + $expiration = Carbon::parse($cookie->expire); + if ($expiration->isAfter(Carbon::now())) { Assert::fail('Cookie `'.$name.'` does not have an expiration in the past.'); } @@ -288,8 +295,14 @@ public function assertCookieNotExpired(string $name) // Then check the expiration of it $cookie = $this->response->cookies->get($name); - if ($cookie->expire !== 0 && $cookie->expire < time()) { - Assert::fail('Cookie `'.$name.'` does not have an expiration in the future.'); + + if ($cookie->expire === null) { + Assert::fail('Cookie `'.$name.'` does not have an expiration date.'); + } + + $expiration = Carbon::parse($cookie->expire); + if ($expiration->isAfter(Carbon::now())) { + Assert::fail('Cookie `'.$name.'` does not have an expiration in the past.'); } return $this->response; diff --git a/src/http/RequestBuilder.php b/src/http/RequestBuilder.php index 9296c4e..83c9446 100644 --- a/src/http/RequestBuilder.php +++ b/src/http/RequestBuilder.php @@ -42,11 +42,12 @@ public function addHeader(string $name, $value): self return $this; } - public function addCookie(string $key, $value): self + public function addCookie(string $key, $value, $expire=0): self { $this->request->cookies->add(new Cookie([ 'name' => $key, 'value' => $value, + 'expire' => $expire, ])); return $this; diff --git a/src/test/CookieState.php b/src/test/CookieState.php index 403a97b..c7ecab3 100644 --- a/src/test/CookieState.php +++ b/src/test/CookieState.php @@ -2,6 +2,7 @@ namespace markhuot\craftpest\test; +use Carbon\Carbon; use yii\web\Cookie; use yii\web\CookieCollection; @@ -94,7 +95,9 @@ public function storeCookieCollection(?CookieCollection $cookies) // We have to manually clear our expired cookies because this is normally handled // by the browser for us foreach ($this->cookies as $cookie) { - if ($cookie->expire !== 0 && $cookie->expire < time()) { + $expiration = Carbon::parse($cookie->expire); + + if ($cookie->expire !== 0 && $expiration->isBefore(Carbon::now())) { $this->cookies->remove($cookie, false); } } diff --git a/tests/CookieTest.php b/tests/CookieTest.php index c9b1bd2..4553dcd 100644 --- a/tests/CookieTest.php +++ b/tests/CookieTest.php @@ -13,6 +13,11 @@ expect(trim($content))->toBe(json_encode(['theName' => 'theValue'])); }); +it('tests expired cookies', function () { + $this->get('responses/expired-cookie') + ->assertCookieExpired('cookieName'); +}); + it('retains cookies', function () { $this->get('response-test') ->assertOk() diff --git a/tests/templates/responses/expired-cookie.twig b/tests/templates/responses/expired-cookie.twig new file mode 100644 index 0000000..537ca82 --- /dev/null +++ b/tests/templates/responses/expired-cookie.twig @@ -0,0 +1,6 @@ +{% set cookie = create('yii\\web\\Cookie', {config: { + name: 'cookieName', + value: 'cookieValue', + expire: 0, +}}) %} +{% do craft.app.response.cookies.add(cookie) %} From b9ce630d4ef69229a12306bafac0a74492f7bf49 Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 18:24:04 -0400 Subject: [PATCH 5/8] pint --- src/http/RequestBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/RequestBuilder.php b/src/http/RequestBuilder.php index 83c9446..21f1783 100644 --- a/src/http/RequestBuilder.php +++ b/src/http/RequestBuilder.php @@ -42,7 +42,7 @@ public function addHeader(string $name, $value): self return $this; } - public function addCookie(string $key, $value, $expire=0): self + public function addCookie(string $key, $value, $expire = 0): self { $this->request->cookies->add(new Cookie([ 'name' => $key, From d63383493fe60ba394dba634fee75376a0fe0912 Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 18:27:35 -0400 Subject: [PATCH 6/8] adding 5.3 configuration --- .github/workflows/php.yml | 2 +- ...-b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml | 80 +++++++++++++ ...-0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml | 110 ++++++++++++++++++ ...-17685ada-d64c-459c-b9fc-678d43e4bee8.yaml | 32 +++++ ...-c148dfb3-a122-49ed-8538-de26d0482663.yaml | 22 ++++ ...-c05f8773-60a8-4f5e-9925-3cc36a064793.yaml | 16 +++ ...-10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml | 16 +++ ...-c7529b61-60cd-4e18-a272-3084aee7fa89.yaml | 19 +++ ...-7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml | 16 +++ stubs/config/project-5.3/graphql/graphql.yaml | 3 + .../184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml | 2 + ...-b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml | 78 +++++++++++++ stubs/config/project-5.3/project.yaml | 36 ++++++ ...-ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml | 29 +++++ .../b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml | 1 + .../bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml | 1 + ...-99c2747f-1049-46bc-93e0-424bad0544e5.yaml | 9 ++ ...-bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml | 9 ++ .../4ea4c761-9214-4e32-b594-58e906282652.yaml | 110 ++++++++++++++++++ stubs/config/project-5.3/users/users.yaml | 5 + ...-3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml | 47 ++++++++ 21 files changed, 642 insertions(+), 1 deletion(-) create mode 100644 stubs/config/project-5.3/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml create mode 100644 stubs/config/project-5.3/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml create mode 100644 stubs/config/project-5.3/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml create mode 100644 stubs/config/project-5.3/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml create mode 100644 stubs/config/project-5.3/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml create mode 100644 stubs/config/project-5.3/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml create mode 100644 stubs/config/project-5.3/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml create mode 100644 stubs/config/project-5.3/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml create mode 100644 stubs/config/project-5.3/graphql/graphql.yaml create mode 100644 stubs/config/project-5.3/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml create mode 100644 stubs/config/project-5.3/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml create mode 100644 stubs/config/project-5.3/project.yaml create mode 100644 stubs/config/project-5.3/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml create mode 100644 stubs/config/project-5.3/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml create mode 100644 stubs/config/project-5.3/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml create mode 100644 stubs/config/project-5.3/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml create mode 100644 stubs/config/project-5.3/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml create mode 100644 stubs/config/project-5.3/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml create mode 100644 stubs/config/project-5.3/users/users.yaml create mode 100644 stubs/config/project-5.3/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 8a15083..d82b957 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -29,7 +29,7 @@ jobs: - constraint: ~5.2.0 config: 5.2 - constraint: ~5.3.0 - config: 5.2 + config: 5.3 - constraint: ~5.4.0 config: 5.2 diff --git a/stubs/config/project-5.3/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml b/stubs/config/project-5.3/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml new file mode 100644 index 0000000..d8d2701 --- /dev/null +++ b/stubs/config/project-5.3/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml @@ -0,0 +1,80 @@ +color: null +fieldLayouts: + 2f77cf1c-a3db-4396-8d2f-efff2172466e: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\entries\EntryTitleField + uid: 463de371-8db2-4f1d-b9b1-b9aca58b5c86 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c05f8773-60a8-4f5e-9925-3cc36a064793 # Field One + handle: null + includeInCards: true + instructions: null + label: 'Field One' + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 6a242257-5d04-4ffb-8afb-f0b091472335 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 10199d0e-57f0-4724-aefb-1ef4ed73b408 # Field Two + handle: null + includeInCards: false + instructions: null + label: 'Field Two' + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 4b8f210d-545c-4d57-9777-08cdb93862df + userCondition: null + warning: null + width: 100 + name: Content + uid: aad92478-a4a8-49e5-b88b-5fff4734eb2c + userCondition: null +handle: blockTypeOne +hasTitleField: false +icon: null +name: 'Block Type One' +showSlugField: true +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site +titleFormat: null +titleTranslationKeyFormat: null +titleTranslationMethod: site diff --git a/stubs/config/project-5.3/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml b/stubs/config/project-5.3/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml new file mode 100644 index 0000000..df084dd --- /dev/null +++ b/stubs/config/project-5.3/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml @@ -0,0 +1,110 @@ +color: null +fieldLayouts: + 50cdf242-1476-44dc-ab8b-e3ad70ef3163: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\entries\EntryTitleField + uid: 880e50a3-79fb-4456-836b-89c970af40b9 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c7529b61-60cd-4e18-a272-3084aee7fa89 # Matrix Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 90a7fa0d-77cd-4612-92f9-4fafd4c1a66d + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c148dfb3-a122-49ed-8538-de26d0482663 # Entries Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: efbdd2ca-b829-4604-bd1e-f66fad9093e2 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e # Text Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 189519d9-7809-47fc-bc54-d2441a85ae9d + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 17685ada-d64c-459c-b9fc-678d43e4bee8 # Dropdown Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 1440d116-5fe9-45a3-8031-7f3c9b71ef9d + userCondition: null + warning: null + width: 100 + name: Content + uid: a914e695-0910-4b04-841b-cbe6f689856b + userCondition: null +handle: default +hasTitleField: true +icon: null +name: Default +showSlugField: true +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site +titleFormat: null +titleTranslationKeyFormat: null +titleTranslationMethod: site diff --git a/stubs/config/project-5.3/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml b/stubs/config/project-5.3/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml new file mode 100644 index 0000000..54c1fe3 --- /dev/null +++ b/stubs/config/project-5.3/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml @@ -0,0 +1,32 @@ +columnSuffix: vqczhrcp +handle: dropdownField +instructions: null +name: 'Dropdown Field' +searchable: false +settings: + options: + - + __assoc__: + - + - label + - One + - + - value + - one + - + - default + - '' + - + __assoc__: + - + - label + - Two + - + - value + - two + - + - default + - '' +translationKeyFormat: null +translationMethod: none +type: craft\fields\Dropdown diff --git a/stubs/config/project-5.3/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml b/stubs/config/project-5.3/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml new file mode 100644 index 0000000..b186836 --- /dev/null +++ b/stubs/config/project-5.3/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml @@ -0,0 +1,22 @@ +columnSuffix: null +handle: entriesField +instructions: null +name: 'Entries Field' +searchable: false +settings: + allowSelfRelations: false + branchLimit: null + localizeRelations: false + maintainHierarchy: false + maxRelations: null + minRelations: null + selectionLabel: null + showCardsInGrid: false + showSiteMenu: false + sources: '*' + targetSiteId: null + validateRelatedElements: false + viewMode: null +translationKeyFormat: null +translationMethod: site +type: craft\fields\Entries diff --git a/stubs/config/project-5.3/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml b/stubs/config/project-5.3/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml new file mode 100644 index 0000000..a079266 --- /dev/null +++ b/stubs/config/project-5.3/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml @@ -0,0 +1,16 @@ +columnSuffix: jnvscjst +handle: fieldOne +instructions: null +name: 'Matrix Field - Block Type One - Field One' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.3/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml b/stubs/config/project-5.3/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml new file mode 100644 index 0000000..3417eed --- /dev/null +++ b/stubs/config/project-5.3/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml @@ -0,0 +1,16 @@ +columnSuffix: swmzeype +handle: fieldTwo +instructions: null +name: 'Matrix Field - Block Type One - Field Two' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.3/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml b/stubs/config/project-5.3/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml new file mode 100644 index 0000000..df84700 --- /dev/null +++ b/stubs/config/project-5.3/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml @@ -0,0 +1,19 @@ +columnSuffix: null +handle: matrixField +instructions: null +name: 'Matrix Field' +searchable: false +settings: + entryTypes: + - b5c238dd-588f-4f0a-b9e4-8a988f0e7468 # Block Type One + includeTableView: false + maxEntries: null + minEntries: null + pageSize: null + propagationKeyFormat: null + propagationMethod: all + showCardsInGrid: false + viewMode: blocks +translationKeyFormat: null +translationMethod: site +type: craft\fields\Matrix diff --git a/stubs/config/project-5.3/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml b/stubs/config/project-5.3/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml new file mode 100644 index 0000000..04c6255 --- /dev/null +++ b/stubs/config/project-5.3/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml @@ -0,0 +1,16 @@ +columnSuffix: irlrybem +handle: textField +instructions: null +name: 'Text Field' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.3/graphql/graphql.yaml b/stubs/config/project-5.3/graphql/graphql.yaml new file mode 100644 index 0000000..fd4ca55 --- /dev/null +++ b/stubs/config/project-5.3/graphql/graphql.yaml @@ -0,0 +1,3 @@ +publicToken: + enabled: false + expiryDate: null diff --git a/stubs/config/project-5.3/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml b/stubs/config/project-5.3/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml new file mode 100644 index 0000000..6288789 --- /dev/null +++ b/stubs/config/project-5.3/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml @@ -0,0 +1,2 @@ +isPublic: true +name: 'Public Schema' diff --git a/stubs/config/project-5.3/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml b/stubs/config/project-5.3/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml new file mode 100644 index 0000000..a95c29e --- /dev/null +++ b/stubs/config/project-5.3/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml @@ -0,0 +1,78 @@ +field: c7529b61-60cd-4e18-a272-3084aee7fa89 # Matrix Field +fieldLayouts: + 2f77cf1c-a3db-4396-8d2f-efff2172466e: + tabs: + - + elementCondition: null + elements: + - + elementCondition: null + fieldUid: c05f8773-60a8-4f5e-9925-3cc36a064793 # Field One + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 6a242257-5d04-4ffb-8afb-f0b091472335 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 10199d0e-57f0-4724-aefb-1ef4ed73b408 # Field Two + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 4b8f210d-545c-4d57-9777-08cdb93862df + userCondition: null + warning: null + width: 100 + name: Content + uid: aad92478-a4a8-49e5-b88b-5fff4734eb2c + userCondition: null +fields: + 10199d0e-57f0-4724-aefb-1ef4ed73b408: # Field Two + columnSuffix: swmzeype + contentColumnType: text + fieldGroup: null + handle: fieldTwo + instructions: null + name: 'Field Two' + searchable: false + settings: + byteLimit: null + charLimit: null + code: false + columnType: null + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText + c05f8773-60a8-4f5e-9925-3cc36a064793: # Field One + columnSuffix: jnvscjst + contentColumnType: text + fieldGroup: null + handle: fieldOne + instructions: null + name: 'Field One' + searchable: false + settings: + byteLimit: null + charLimit: null + code: false + columnType: null + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText +handle: blockTypeOne +name: 'Block Type One' +sortOrder: 1 diff --git a/stubs/config/project-5.3/project.yaml b/stubs/config/project-5.3/project.yaml new file mode 100644 index 0000000..89079aa --- /dev/null +++ b/stubs/config/project-5.3/project.yaml @@ -0,0 +1,36 @@ +dateModified: 1727735180 +email: + fromEmail: michael@bluth.com + fromName: Pest + transportType: craft\mail\transportadapters\Sendmail +fs: + local: + hasUrls: true + name: Local + settings: + path: /workspaces/craft-pest-core/web/volumes/local + type: craft\fs\Local + url: 'http://localhost:8080/volumes/local/' +meta: + __names__: + 3b2c4b24-e463-46ca-be26-7285804ecbb1: Local # Local + 7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e: 'Text Field' # Text Field + 99c2747f-1049-46bc-93e0-424bad0544e5: Pest # Pest + 184fa66e-14cd-4045-853d-9a69ecf44e4e: 'Public Schema' # Public Schema + 0193fbbc-6912-4ff6-a3d5-e60ea03c8590: Default # Default + 10199d0e-57f0-4724-aefb-1ef4ed73b408: 'Field Two' # Field Two + 17685ada-d64c-459c-b9fc-678d43e4bee8: 'Dropdown Field' # Dropdown Field + ae919370-04f6-4e2d-8d42-f255cc1b6a75: Posts # Posts + b5c238dd-588f-4f0a-b9e4-8a988f0e7468: 'Block Type One' # Block Type One + b11e9b16-d6b0-4771-86bb-3fe962b4596d: Pest # Pest + bda4d299-4f91-43c1-91d1-48abd1dd5fb4: Pest # Pest + bdde35b2-daab-45e7-aef7-43fd8b221aa2: Pest # Pest + c05f8773-60a8-4f5e-9925-3cc36a064793: 'Field One' # Field One + c148dfb3-a122-49ed-8538-de26d0482663: 'Entries Field' # Entries Field + c7529b61-60cd-4e18-a272-3084aee7fa89: 'Matrix Field' # Matrix Field +system: + edition: pro + live: true + name: Pest + schemaVersion: 5.3.0.2 + timeZone: America/Los_Angeles diff --git a/stubs/config/project-5.3/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml b/stubs/config/project-5.3/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml new file mode 100644 index 0000000..54728c7 --- /dev/null +++ b/stubs/config/project-5.3/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml @@ -0,0 +1,29 @@ +defaultPlacement: end +enableVersioning: true +entryTypes: + - 0193fbbc-6912-4ff6-a3d5-e60ea03c8590 # Default +handle: posts +maxAuthors: 1 +name: Posts +previewTargets: + - + __assoc__: + - + - label + - 'Primary entry page' + - + - urlFormat + - '{url}' +propagationMethod: all +siteSettings: + 99c2747f-1049-46bc-93e0-424bad0544e5: # Pest + enabledByDefault: true + hasUrls: true + template: posts/_entry + uriFormat: 'posts/{slug}' + bda4d299-4f91-43c1-91d1-48abd1dd5fb4: # Pest + enabledByDefault: true + hasUrls: true + template: posts/_entry + uriFormat: 'posts/{slug}' +type: channel diff --git a/stubs/config/project-5.3/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml b/stubs/config/project-5.3/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml new file mode 100644 index 0000000..ed2ddb7 --- /dev/null +++ b/stubs/config/project-5.3/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml @@ -0,0 +1 @@ +name: Pest diff --git a/stubs/config/project-5.3/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml b/stubs/config/project-5.3/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml new file mode 100644 index 0000000..ed2ddb7 --- /dev/null +++ b/stubs/config/project-5.3/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml @@ -0,0 +1 @@ +name: Pest diff --git a/stubs/config/project-5.3/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml b/stubs/config/project-5.3/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml new file mode 100644 index 0000000..063150f --- /dev/null +++ b/stubs/config/project-5.3/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml @@ -0,0 +1,9 @@ +baseUrl: $PRIMARY_SITE_URL +enabled: true +handle: default +hasUrls: true +language: en-US +name: Pest +primary: true +siteGroup: bdde35b2-daab-45e7-aef7-43fd8b221aa2 # Pest +sortOrder: 1 diff --git a/stubs/config/project-5.3/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml b/stubs/config/project-5.3/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml new file mode 100644 index 0000000..dda612b --- /dev/null +++ b/stubs/config/project-5.3/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml @@ -0,0 +1,9 @@ +baseUrl: $PRIMARY_SITE_URL +enabled: '1' +handle: default +hasUrls: true +language: en-US +name: Pest +primary: false +siteGroup: b11e9b16-d6b0-4771-86bb-3fe962b4596d # Pest +sortOrder: 1 diff --git a/stubs/config/project-5.3/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml b/stubs/config/project-5.3/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml new file mode 100644 index 0000000..757ccce --- /dev/null +++ b/stubs/config/project-5.3/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml @@ -0,0 +1,110 @@ +tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\UsernameField + uid: 8d4db13b-bf33-4fcb-a4b3-465419ff6554 + userCondition: null + warning: null + width: 100 + - + attribute: fullName + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: true + required: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\FullNameField + uid: 40cd1617-0f35-489c-bc2a-508347941659 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + id: null + includeInCards: false + instructions: null + label: null + orientation: null + providesThumbs: false + requirable: false + tip: null + type: craft\fieldlayoutelements\users\PhotoField + uid: 1e08b8ec-6f86-482b-89fe-8ec91608e9a2 + userCondition: null + warning: null + width: 100 + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\EmailField + uid: 54368c30-4e82-4caa-b568-ea6d72ac8e1c + userCondition: null + width: 100 + name: Content + uid: 5d3a7ac6-f14a-453a-9ac9-9f6cda4c594e + userCondition: null diff --git a/stubs/config/project-5.3/users/users.yaml b/stubs/config/project-5.3/users/users.yaml new file mode 100644 index 0000000..5ffedb3 --- /dev/null +++ b/stubs/config/project-5.3/users/users.yaml @@ -0,0 +1,5 @@ +allowPublicRegistration: false +defaultGroup: null +photoSubpath: null +photoVolumeUid: null +requireEmailVerification: true diff --git a/stubs/config/project-5.3/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml b/stubs/config/project-5.3/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml new file mode 100644 index 0000000..72ba152 --- /dev/null +++ b/stubs/config/project-5.3/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml @@ -0,0 +1,47 @@ +fieldLayouts: + 7948cc32-6d40-46b7-af5d-39b77f566df7: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\assets\AssetTitleField + uid: 8c8df736-809a-41c5-a4f1-e48f3392078d + userCondition: null + warning: null + width: 100 + name: Content + uid: 1e2b784c-d10c-4014-831d-d78877cf8580 + userCondition: null +fs: local +handle: local +name: Local +sortOrder: 1 +subpath: '' +titleTranslationKeyFormat: null +titleTranslationMethod: site +transformFs: null +transformSubpath: '' From 477d32b3e4a8c020ac81dfce29c5a807c0dc6394 Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 18:30:22 -0400 Subject: [PATCH 7/8] last configuration update --- .github/workflows/php.yml | 2 +- ...-b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml | 80 +++++++++++++ ...-0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml | 110 ++++++++++++++++++ ...-17685ada-d64c-459c-b9fc-678d43e4bee8.yaml | 32 +++++ ...-c148dfb3-a122-49ed-8538-de26d0482663.yaml | 22 ++++ ...-c05f8773-60a8-4f5e-9925-3cc36a064793.yaml | 16 +++ ...-10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml | 16 +++ ...-c7529b61-60cd-4e18-a272-3084aee7fa89.yaml | 19 +++ ...-7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml | 16 +++ stubs/config/project-5.4/graphql/graphql.yaml | 3 + .../184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml | 2 + ...-b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml | 78 +++++++++++++ stubs/config/project-5.4/project.yaml | 36 ++++++ ...-ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml | 29 +++++ .../b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml | 1 + .../bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml | 1 + ...-99c2747f-1049-46bc-93e0-424bad0544e5.yaml | 9 ++ ...-bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml | 9 ++ .../4ea4c761-9214-4e32-b594-58e906282652.yaml | 110 ++++++++++++++++++ stubs/config/project-5.4/users/users.yaml | 5 + ...-3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml | 47 ++++++++ 21 files changed, 642 insertions(+), 1 deletion(-) create mode 100644 stubs/config/project-5.4/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml create mode 100644 stubs/config/project-5.4/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml create mode 100644 stubs/config/project-5.4/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml create mode 100644 stubs/config/project-5.4/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml create mode 100644 stubs/config/project-5.4/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml create mode 100644 stubs/config/project-5.4/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml create mode 100644 stubs/config/project-5.4/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml create mode 100644 stubs/config/project-5.4/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml create mode 100644 stubs/config/project-5.4/graphql/graphql.yaml create mode 100644 stubs/config/project-5.4/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml create mode 100644 stubs/config/project-5.4/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml create mode 100644 stubs/config/project-5.4/project.yaml create mode 100644 stubs/config/project-5.4/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml create mode 100644 stubs/config/project-5.4/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml create mode 100644 stubs/config/project-5.4/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml create mode 100644 stubs/config/project-5.4/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml create mode 100644 stubs/config/project-5.4/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml create mode 100644 stubs/config/project-5.4/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml create mode 100644 stubs/config/project-5.4/users/users.yaml create mode 100644 stubs/config/project-5.4/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index d82b957..7622f38 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -31,7 +31,7 @@ jobs: - constraint: ~5.3.0 config: 5.3 - constraint: ~5.4.0 - config: 5.2 + config: 5.4 env: CRAFT_APP_ID: pest diff --git a/stubs/config/project-5.4/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml b/stubs/config/project-5.4/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml new file mode 100644 index 0000000..d8d2701 --- /dev/null +++ b/stubs/config/project-5.4/entryTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml @@ -0,0 +1,80 @@ +color: null +fieldLayouts: + 2f77cf1c-a3db-4396-8d2f-efff2172466e: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\entries\EntryTitleField + uid: 463de371-8db2-4f1d-b9b1-b9aca58b5c86 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c05f8773-60a8-4f5e-9925-3cc36a064793 # Field One + handle: null + includeInCards: true + instructions: null + label: 'Field One' + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 6a242257-5d04-4ffb-8afb-f0b091472335 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 10199d0e-57f0-4724-aefb-1ef4ed73b408 # Field Two + handle: null + includeInCards: false + instructions: null + label: 'Field Two' + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 4b8f210d-545c-4d57-9777-08cdb93862df + userCondition: null + warning: null + width: 100 + name: Content + uid: aad92478-a4a8-49e5-b88b-5fff4734eb2c + userCondition: null +handle: blockTypeOne +hasTitleField: false +icon: null +name: 'Block Type One' +showSlugField: true +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site +titleFormat: null +titleTranslationKeyFormat: null +titleTranslationMethod: site diff --git a/stubs/config/project-5.4/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml b/stubs/config/project-5.4/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml new file mode 100644 index 0000000..df084dd --- /dev/null +++ b/stubs/config/project-5.4/entryTypes/default--0193fbbc-6912-4ff6-a3d5-e60ea03c8590.yaml @@ -0,0 +1,110 @@ +color: null +fieldLayouts: + 50cdf242-1476-44dc-ab8b-e3ad70ef3163: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\entries\EntryTitleField + uid: 880e50a3-79fb-4456-836b-89c970af40b9 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c7529b61-60cd-4e18-a272-3084aee7fa89 # Matrix Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 90a7fa0d-77cd-4612-92f9-4fafd4c1a66d + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: c148dfb3-a122-49ed-8538-de26d0482663 # Entries Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: efbdd2ca-b829-4604-bd1e-f66fad9093e2 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e # Text Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 189519d9-7809-47fc-bc54-d2441a85ae9d + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 17685ada-d64c-459c-b9fc-678d43e4bee8 # Dropdown Field + handle: null + includeInCards: false + instructions: null + label: null + providesThumbs: false + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 1440d116-5fe9-45a3-8031-7f3c9b71ef9d + userCondition: null + warning: null + width: 100 + name: Content + uid: a914e695-0910-4b04-841b-cbe6f689856b + userCondition: null +handle: default +hasTitleField: true +icon: null +name: Default +showSlugField: true +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site +titleFormat: null +titleTranslationKeyFormat: null +titleTranslationMethod: site diff --git a/stubs/config/project-5.4/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml b/stubs/config/project-5.4/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml new file mode 100644 index 0000000..54c1fe3 --- /dev/null +++ b/stubs/config/project-5.4/fields/dropdownField--17685ada-d64c-459c-b9fc-678d43e4bee8.yaml @@ -0,0 +1,32 @@ +columnSuffix: vqczhrcp +handle: dropdownField +instructions: null +name: 'Dropdown Field' +searchable: false +settings: + options: + - + __assoc__: + - + - label + - One + - + - value + - one + - + - default + - '' + - + __assoc__: + - + - label + - Two + - + - value + - two + - + - default + - '' +translationKeyFormat: null +translationMethod: none +type: craft\fields\Dropdown diff --git a/stubs/config/project-5.4/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml b/stubs/config/project-5.4/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml new file mode 100644 index 0000000..b186836 --- /dev/null +++ b/stubs/config/project-5.4/fields/entriesField--c148dfb3-a122-49ed-8538-de26d0482663.yaml @@ -0,0 +1,22 @@ +columnSuffix: null +handle: entriesField +instructions: null +name: 'Entries Field' +searchable: false +settings: + allowSelfRelations: false + branchLimit: null + localizeRelations: false + maintainHierarchy: false + maxRelations: null + minRelations: null + selectionLabel: null + showCardsInGrid: false + showSiteMenu: false + sources: '*' + targetSiteId: null + validateRelatedElements: false + viewMode: null +translationKeyFormat: null +translationMethod: site +type: craft\fields\Entries diff --git a/stubs/config/project-5.4/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml b/stubs/config/project-5.4/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml new file mode 100644 index 0000000..a079266 --- /dev/null +++ b/stubs/config/project-5.4/fields/fieldOne--c05f8773-60a8-4f5e-9925-3cc36a064793.yaml @@ -0,0 +1,16 @@ +columnSuffix: jnvscjst +handle: fieldOne +instructions: null +name: 'Matrix Field - Block Type One - Field One' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.4/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml b/stubs/config/project-5.4/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml new file mode 100644 index 0000000..3417eed --- /dev/null +++ b/stubs/config/project-5.4/fields/fieldTwo--10199d0e-57f0-4724-aefb-1ef4ed73b408.yaml @@ -0,0 +1,16 @@ +columnSuffix: swmzeype +handle: fieldTwo +instructions: null +name: 'Matrix Field - Block Type One - Field Two' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.4/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml b/stubs/config/project-5.4/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml new file mode 100644 index 0000000..df84700 --- /dev/null +++ b/stubs/config/project-5.4/fields/matrixField--c7529b61-60cd-4e18-a272-3084aee7fa89.yaml @@ -0,0 +1,19 @@ +columnSuffix: null +handle: matrixField +instructions: null +name: 'Matrix Field' +searchable: false +settings: + entryTypes: + - b5c238dd-588f-4f0a-b9e4-8a988f0e7468 # Block Type One + includeTableView: false + maxEntries: null + minEntries: null + pageSize: null + propagationKeyFormat: null + propagationMethod: all + showCardsInGrid: false + viewMode: blocks +translationKeyFormat: null +translationMethod: site +type: craft\fields\Matrix diff --git a/stubs/config/project-5.4/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml b/stubs/config/project-5.4/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml new file mode 100644 index 0000000..04c6255 --- /dev/null +++ b/stubs/config/project-5.4/fields/textField--7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e.yaml @@ -0,0 +1,16 @@ +columnSuffix: irlrybem +handle: textField +instructions: null +name: 'Text Field' +searchable: false +settings: + byteLimit: null + charLimit: null + code: false + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal +translationKeyFormat: null +translationMethod: none +type: craft\fields\PlainText diff --git a/stubs/config/project-5.4/graphql/graphql.yaml b/stubs/config/project-5.4/graphql/graphql.yaml new file mode 100644 index 0000000..fd4ca55 --- /dev/null +++ b/stubs/config/project-5.4/graphql/graphql.yaml @@ -0,0 +1,3 @@ +publicToken: + enabled: false + expiryDate: null diff --git a/stubs/config/project-5.4/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml b/stubs/config/project-5.4/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml new file mode 100644 index 0000000..6288789 --- /dev/null +++ b/stubs/config/project-5.4/graphql/schemas/184fa66e-14cd-4045-853d-9a69ecf44e4e.yaml @@ -0,0 +1,2 @@ +isPublic: true +name: 'Public Schema' diff --git a/stubs/config/project-5.4/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml b/stubs/config/project-5.4/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml new file mode 100644 index 0000000..a95c29e --- /dev/null +++ b/stubs/config/project-5.4/matrixBlockTypes/blockTypeOne--b5c238dd-588f-4f0a-b9e4-8a988f0e7468.yaml @@ -0,0 +1,78 @@ +field: c7529b61-60cd-4e18-a272-3084aee7fa89 # Matrix Field +fieldLayouts: + 2f77cf1c-a3db-4396-8d2f-efff2172466e: + tabs: + - + elementCondition: null + elements: + - + elementCondition: null + fieldUid: c05f8773-60a8-4f5e-9925-3cc36a064793 # Field One + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 6a242257-5d04-4ffb-8afb-f0b091472335 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + fieldUid: 10199d0e-57f0-4724-aefb-1ef4ed73b408 # Field Two + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 4b8f210d-545c-4d57-9777-08cdb93862df + userCondition: null + warning: null + width: 100 + name: Content + uid: aad92478-a4a8-49e5-b88b-5fff4734eb2c + userCondition: null +fields: + 10199d0e-57f0-4724-aefb-1ef4ed73b408: # Field Two + columnSuffix: swmzeype + contentColumnType: text + fieldGroup: null + handle: fieldTwo + instructions: null + name: 'Field Two' + searchable: false + settings: + byteLimit: null + charLimit: null + code: false + columnType: null + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText + c05f8773-60a8-4f5e-9925-3cc36a064793: # Field One + columnSuffix: jnvscjst + contentColumnType: text + fieldGroup: null + handle: fieldOne + instructions: null + name: 'Field One' + searchable: false + settings: + byteLimit: null + charLimit: null + code: false + columnType: null + initialRows: 4 + multiline: false + placeholder: null + uiMode: normal + translationKeyFormat: null + translationMethod: none + type: craft\fields\PlainText +handle: blockTypeOne +name: 'Block Type One' +sortOrder: 1 diff --git a/stubs/config/project-5.4/project.yaml b/stubs/config/project-5.4/project.yaml new file mode 100644 index 0000000..89079aa --- /dev/null +++ b/stubs/config/project-5.4/project.yaml @@ -0,0 +1,36 @@ +dateModified: 1727735180 +email: + fromEmail: michael@bluth.com + fromName: Pest + transportType: craft\mail\transportadapters\Sendmail +fs: + local: + hasUrls: true + name: Local + settings: + path: /workspaces/craft-pest-core/web/volumes/local + type: craft\fs\Local + url: 'http://localhost:8080/volumes/local/' +meta: + __names__: + 3b2c4b24-e463-46ca-be26-7285804ecbb1: Local # Local + 7d1a7bf3-c346-48bc-bb77-f7d76fcacf2e: 'Text Field' # Text Field + 99c2747f-1049-46bc-93e0-424bad0544e5: Pest # Pest + 184fa66e-14cd-4045-853d-9a69ecf44e4e: 'Public Schema' # Public Schema + 0193fbbc-6912-4ff6-a3d5-e60ea03c8590: Default # Default + 10199d0e-57f0-4724-aefb-1ef4ed73b408: 'Field Two' # Field Two + 17685ada-d64c-459c-b9fc-678d43e4bee8: 'Dropdown Field' # Dropdown Field + ae919370-04f6-4e2d-8d42-f255cc1b6a75: Posts # Posts + b5c238dd-588f-4f0a-b9e4-8a988f0e7468: 'Block Type One' # Block Type One + b11e9b16-d6b0-4771-86bb-3fe962b4596d: Pest # Pest + bda4d299-4f91-43c1-91d1-48abd1dd5fb4: Pest # Pest + bdde35b2-daab-45e7-aef7-43fd8b221aa2: Pest # Pest + c05f8773-60a8-4f5e-9925-3cc36a064793: 'Field One' # Field One + c148dfb3-a122-49ed-8538-de26d0482663: 'Entries Field' # Entries Field + c7529b61-60cd-4e18-a272-3084aee7fa89: 'Matrix Field' # Matrix Field +system: + edition: pro + live: true + name: Pest + schemaVersion: 5.3.0.2 + timeZone: America/Los_Angeles diff --git a/stubs/config/project-5.4/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml b/stubs/config/project-5.4/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml new file mode 100644 index 0000000..54728c7 --- /dev/null +++ b/stubs/config/project-5.4/sections/posts--ae919370-04f6-4e2d-8d42-f255cc1b6a75.yaml @@ -0,0 +1,29 @@ +defaultPlacement: end +enableVersioning: true +entryTypes: + - 0193fbbc-6912-4ff6-a3d5-e60ea03c8590 # Default +handle: posts +maxAuthors: 1 +name: Posts +previewTargets: + - + __assoc__: + - + - label + - 'Primary entry page' + - + - urlFormat + - '{url}' +propagationMethod: all +siteSettings: + 99c2747f-1049-46bc-93e0-424bad0544e5: # Pest + enabledByDefault: true + hasUrls: true + template: posts/_entry + uriFormat: 'posts/{slug}' + bda4d299-4f91-43c1-91d1-48abd1dd5fb4: # Pest + enabledByDefault: true + hasUrls: true + template: posts/_entry + uriFormat: 'posts/{slug}' +type: channel diff --git a/stubs/config/project-5.4/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml b/stubs/config/project-5.4/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml new file mode 100644 index 0000000..ed2ddb7 --- /dev/null +++ b/stubs/config/project-5.4/siteGroups/b11e9b16-d6b0-4771-86bb-3fe962b4596d.yaml @@ -0,0 +1 @@ +name: Pest diff --git a/stubs/config/project-5.4/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml b/stubs/config/project-5.4/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml new file mode 100644 index 0000000..ed2ddb7 --- /dev/null +++ b/stubs/config/project-5.4/siteGroups/bdde35b2-daab-45e7-aef7-43fd8b221aa2.yaml @@ -0,0 +1 @@ +name: Pest diff --git a/stubs/config/project-5.4/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml b/stubs/config/project-5.4/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml new file mode 100644 index 0000000..063150f --- /dev/null +++ b/stubs/config/project-5.4/sites/default--99c2747f-1049-46bc-93e0-424bad0544e5.yaml @@ -0,0 +1,9 @@ +baseUrl: $PRIMARY_SITE_URL +enabled: true +handle: default +hasUrls: true +language: en-US +name: Pest +primary: true +siteGroup: bdde35b2-daab-45e7-aef7-43fd8b221aa2 # Pest +sortOrder: 1 diff --git a/stubs/config/project-5.4/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml b/stubs/config/project-5.4/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml new file mode 100644 index 0000000..dda612b --- /dev/null +++ b/stubs/config/project-5.4/sites/default--bda4d299-4f91-43c1-91d1-48abd1dd5fb4.yaml @@ -0,0 +1,9 @@ +baseUrl: $PRIMARY_SITE_URL +enabled: '1' +handle: default +hasUrls: true +language: en-US +name: Pest +primary: false +siteGroup: b11e9b16-d6b0-4771-86bb-3fe962b4596d # Pest +sortOrder: 1 diff --git a/stubs/config/project-5.4/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml b/stubs/config/project-5.4/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml new file mode 100644 index 0000000..757ccce --- /dev/null +++ b/stubs/config/project-5.4/users/fieldLayouts/4ea4c761-9214-4e32-b594-58e906282652.yaml @@ -0,0 +1,110 @@ +tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\UsernameField + uid: 8d4db13b-bf33-4fcb-a4b3-465419ff6554 + userCondition: null + warning: null + width: 100 + - + attribute: fullName + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: true + required: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\FullNameField + uid: 40cd1617-0f35-489c-bc2a-508347941659 + userCondition: null + warning: null + width: 100 + - + elementCondition: null + id: null + includeInCards: false + instructions: null + label: null + orientation: null + providesThumbs: false + requirable: false + tip: null + type: craft\fieldlayoutelements\users\PhotoField + uid: 1e08b8ec-6f86-482b-89fe-8ec91608e9a2 + userCondition: null + warning: null + width: 100 + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\users\EmailField + uid: 54368c30-4e82-4caa-b568-ea6d72ac8e1c + userCondition: null + width: 100 + name: Content + uid: 5d3a7ac6-f14a-453a-9ac9-9f6cda4c594e + userCondition: null diff --git a/stubs/config/project-5.4/users/users.yaml b/stubs/config/project-5.4/users/users.yaml new file mode 100644 index 0000000..5ffedb3 --- /dev/null +++ b/stubs/config/project-5.4/users/users.yaml @@ -0,0 +1,5 @@ +allowPublicRegistration: false +defaultGroup: null +photoSubpath: null +photoVolumeUid: null +requireEmailVerification: true diff --git a/stubs/config/project-5.4/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml b/stubs/config/project-5.4/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml new file mode 100644 index 0000000..72ba152 --- /dev/null +++ b/stubs/config/project-5.4/volumes/local--3b2c4b24-e463-46ca-be26-7285804ecbb1.yaml @@ -0,0 +1,47 @@ +fieldLayouts: + 7948cc32-6d40-46b7-af5d-39b77f566df7: + tabs: + - + elementCondition: null + elements: + - + autocapitalize: true + autocomplete: false + autocorrect: true + class: null + disabled: false + elementCondition: null + id: null + includeInCards: false + inputType: null + instructions: null + label: null + max: null + min: null + name: null + orientation: null + placeholder: null + providesThumbs: false + readonly: false + requirable: false + size: null + step: null + tip: null + title: null + type: craft\fieldlayoutelements\assets\AssetTitleField + uid: 8c8df736-809a-41c5-a4f1-e48f3392078d + userCondition: null + warning: null + width: 100 + name: Content + uid: 1e2b784c-d10c-4014-831d-d78877cf8580 + userCondition: null +fs: local +handle: local +name: Local +sortOrder: 1 +subpath: '' +titleTranslationKeyFormat: null +titleTranslationMethod: site +transformFs: null +transformSubpath: '' From a47b0f801ef5d1bf909551357a60e2d065724767 Mon Sep 17 00:00:00 2001 From: markhuot Date: Tue, 1 Oct 2024 11:52:33 -0400 Subject: [PATCH 8/8] workaround for a change to isNewForSite https://github.com/craftcms/cms/issues/15517 --- ...ludes_postDate_in_snapshot_assertions.snap | 2 +- .../it_includes_postDate_in_snapshots.snap | 2 +- .../it_matches_entry_snapshots.snap | 2 +- tests/SnapshotTest.php | 69 +++++++++++-------- 4 files changed, 43 insertions(+), 32 deletions(-) diff --git a/tests/.pest/snapshots/SnapshotTest/it_includes_postDate_in_snapshot_assertions.snap b/tests/.pest/snapshots/SnapshotTest/it_includes_postDate_in_snapshot_assertions.snap index bbcf481..9dc4c50 100644 --- a/tests/.pest/snapshots/SnapshotTest/it_includes_postDate_in_snapshot_assertions.snap +++ b/tests/.pest/snapshots/SnapshotTest/it_includes_postDate_in_snapshot_assertions.snap @@ -3,7 +3,7 @@ "slug": "foo-bar", "isDraft": false, "isRevision": false, - "isNewForSite": true, + "isNewForSite": false, "isUnpublishedDraft": false, "enabled": true, "archived": false, diff --git a/tests/.pest/snapshots/SnapshotTest/it_includes_postDate_in_snapshots.snap b/tests/.pest/snapshots/SnapshotTest/it_includes_postDate_in_snapshots.snap index bbcf481..9dc4c50 100644 --- a/tests/.pest/snapshots/SnapshotTest/it_includes_postDate_in_snapshots.snap +++ b/tests/.pest/snapshots/SnapshotTest/it_includes_postDate_in_snapshots.snap @@ -3,7 +3,7 @@ "slug": "foo-bar", "isDraft": false, "isRevision": false, - "isNewForSite": true, + "isNewForSite": false, "isUnpublishedDraft": false, "enabled": true, "archived": false, diff --git a/tests/.pest/snapshots/SnapshotTest/it_matches_entry_snapshots.snap b/tests/.pest/snapshots/SnapshotTest/it_matches_entry_snapshots.snap index 4a730f4..d76066d 100644 --- a/tests/.pest/snapshots/SnapshotTest/it_matches_entry_snapshots.snap +++ b/tests/.pest/snapshots/SnapshotTest/it_matches_entry_snapshots.snap @@ -3,7 +3,7 @@ "slug": "foo-bar", "isDraft": false, "isRevision": false, - "isNewForSite": true, + "isNewForSite": false, "isUnpublishedDraft": false, "enabled": true, "archived": false, diff --git a/tests/SnapshotTest.php b/tests/SnapshotTest.php index a5279b1..dde23e3 100644 --- a/tests/SnapshotTest.php +++ b/tests/SnapshotTest.php @@ -39,35 +39,6 @@ ->renderTemplate('variable', ['foo' => 'bar']) ->assertMatchesSnapshot(); -it('includes postDate in snapshots') - ->expect(fn () => Entry::factory() - ->section('posts') - ->postDate('2022-01-01 00:00:00') - ->title('foo bar') - ->create()) - ->toSnapshot(['postDate'])->toMatchSnapshot(); - -it('includes postDate in snapshot assertions', function () { - $entry = Entry::factory() - ->section('posts') - ->postDate('2022-01-01 00:00:00') - ->title('foo bar') - ->create(); - - $entry->assertMatchesSnapshot(['postDate']); -}); - -it('matches entry snapshots', function () { - $entry = Entry::factory() - ->section('posts') - ->title('foo bar') - ->textField('foo') - ->dropdownField('one') - ->create(); - - expect($entry)->toMatchSnapshot(); -}); - it('matches nested entry snapshots', function () { $child = Entry::factory() ->section('posts') @@ -91,3 +62,43 @@ $snapshots = collect($entries->map->toSnapshotArray())->sortBy('title')->values()->all(); expect(json_encode($snapshots))->toMatchSnapshot(); }); + +// Before 5.3.3 Craft reported isNewForSite as `true` after a save but thanks to +// https://github.com/craftcms/cms/issues/15517 it switched to `false. So, to avoid splitting our +// tests we don't actually check snapshots on newly created elements. We re-fetch them from +// the database to be sure we're not running in to differences with isNewForSite between +// Craft versions +it('includes postDate in snapshots', function () { + $entry = Entry::factory() + ->section('posts') + ->postDate('2022-01-01 00:00:00') + ->title('foo bar') + ->create(); + + expect(\craft\elements\Entry::find()->id($entry->id)->one()) + ->toSnapshot(['postDate']) + ->toMatchSnapshot(); +}); + +it('includes postDate in snapshot assertions', function () { + $entry = Entry::factory() + ->section('posts') + ->postDate('2022-01-01 00:00:00') + ->title('foo bar') + ->create(); + + expect(\craft\elements\Entry::find()->id($entry->id)->one()) + ->assertMatchesSnapshot(['postDate']); +}); + +it('matches entry snapshots', function () { + $entry = Entry::factory() + ->section('posts') + ->title('foo bar') + ->textField('foo') + ->dropdownField('one') + ->create(); + + expect(\craft\elements\Entry::find()->id($entry->id)->one()) + ->toMatchSnapshot(); +});