From a65290493b2d1d7b53113ec669628e412c587a72 Mon Sep 17 00:00:00 2001 From: Jamie Sykes Date: Mon, 3 Feb 2025 15:11:46 +0000 Subject: [PATCH 1/4] ci: Adds conventional commit check for PR's. --- .github/workflows/pr.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..59e66cf --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,16 @@ +name: Check Conventional PR + +on: + pull_request: + branches: [ 1.x, 2.x, 3.x, 4.x ] + +jobs: + build: + name: Ensure Conventional Commits + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2-beta + - uses: beemojs/conventional-pr-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 7a9ed7d1363d57aa4bc609410c3e8269b00bb04f Mon Sep 17 00:00:00 2001 From: Jamie Sykes Date: Mon, 3 Feb 2025 15:24:56 +0000 Subject: [PATCH 2/4] ci: fixes test suite issues. --- composer.json | 2 +- test-config/project/project.yaml | 4 ++-- tests/_bootstrap.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index d1a7519..436b3ee 100755 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ } ], "require": { - "craftcms/cms": "^4.0.0-alpha", + "craftcms/cms": "^4.0.0", "paragonie/random-lib": "^2.0" }, "replace": { diff --git a/test-config/project/project.yaml b/test-config/project/project.yaml index 5457745..102db90 100644 --- a/test-config/project/project.yaml +++ b/test-config/project/project.yaml @@ -7,12 +7,12 @@ plugins: magic-login: edition: standard enabled: true - schemaVersion: 1.0.0 + schemaVersion: 2.0.0 system: edition: pro live: true name: 'Craft test site' - schemaVersion: 3.7.9 + schemaVersion: 4.5.3.0 timeZone: Europe/London users: allowPublicRegistration: true diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php index d8dd650..fe17a52 100644 --- a/tests/_bootstrap.php +++ b/tests/_bootstrap.php @@ -6,6 +6,7 @@ // Use the current installation of Craft define('CRAFT_TESTS_PATH', __DIR__); +define('CRAFT_ROOT_PATH', dirname(__DIR__) . '/_craft'); define('CRAFT_STORAGE_PATH', __DIR__ . '/_craft/storage'); define('CRAFT_TEMPLATES_PATH', __DIR__ . '/_craft/templates'); define('CRAFT_CONFIG_PATH', __DIR__ . '/_craft/config'); From 45ca487f4da0cabc8386c5c08c3778e902f659ec Mon Sep 17 00:00:00 2001 From: Jamie Sykes Date: Tue, 4 Feb 2025 09:24:49 +0000 Subject: [PATCH 3/4] ci: updates project configuration to latest Craft CMS version. --- test-config/project/project.yaml | 22 ++++++++++--------- .../0ec9b1fd-034b-4a84-99af-1758de94e5da.yaml | 1 + .../4f4bb777-fb14-437a-b6d4-91e8f32a458e.yaml | 1 - ...-242dec4a-157f-4a65-9340-b756cb5f7270.yaml | 9 -------- ...-2eb44645-1260-46fe-9ca5-5f80e350f1b7.yaml | 9 ++++++++ test-config/project/users/users.yaml | 5 ++++- 6 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 test-config/project/siteGroups/0ec9b1fd-034b-4a84-99af-1758de94e5da.yaml delete mode 100644 test-config/project/siteGroups/4f4bb777-fb14-437a-b6d4-91e8f32a458e.yaml delete mode 100644 test-config/project/sites/default--242dec4a-157f-4a65-9340-b756cb5f7270.yaml create mode 100644 test-config/project/sites/default--2eb44645-1260-46fe-9ca5-5f80e350f1b7.yaml diff --git a/test-config/project/project.yaml b/test-config/project/project.yaml index c3a8d2b..32aa5b5 100644 --- a/test-config/project/project.yaml +++ b/test-config/project/project.yaml @@ -1,8 +1,16 @@ -dateModified: 1616079770 +dateModified: 1738659450 email: fromEmail: support@craftcms.com fromName: 'Craft test site' transportType: craft\mail\transportadapters\Sendmail +graphql: + publicToken: + enabled: false + expiryDate: null +meta: + __names__: + 0ec9b1fd-034b-4a84-99af-1758de94e5da: 'Magic login testing' # Magic login testing + 2eb44645-1260-46fe-9ca5-5f80e350f1b7: 'Magic login testing' # Magic login testing plugins: magic-login: edition: standard @@ -11,12 +19,6 @@ plugins: system: edition: pro live: true - name: 'Craft test site' - schemaVersion: 5.3.0.2 - timeZone: Europe/London -users: - allowPublicRegistration: true - defaultGroup: null - photoSubpath: null - photoVolumeUid: null - requireEmailVerification: false + name: 'Magic login testing' + schemaVersion: 5.6.0.2 + timeZone: America/Los_Angeles diff --git a/test-config/project/siteGroups/0ec9b1fd-034b-4a84-99af-1758de94e5da.yaml b/test-config/project/siteGroups/0ec9b1fd-034b-4a84-99af-1758de94e5da.yaml new file mode 100644 index 0000000..c8d068d --- /dev/null +++ b/test-config/project/siteGroups/0ec9b1fd-034b-4a84-99af-1758de94e5da.yaml @@ -0,0 +1 @@ +name: 'Magic login testing' diff --git a/test-config/project/siteGroups/4f4bb777-fb14-437a-b6d4-91e8f32a458e.yaml b/test-config/project/siteGroups/4f4bb777-fb14-437a-b6d4-91e8f32a458e.yaml deleted file mode 100644 index 038b25f..0000000 --- a/test-config/project/siteGroups/4f4bb777-fb14-437a-b6d4-91e8f32a458e.yaml +++ /dev/null @@ -1 +0,0 @@ -name: 'Nixon Williams Commerce Prototype' diff --git a/test-config/project/sites/default--242dec4a-157f-4a65-9340-b756cb5f7270.yaml b/test-config/project/sites/default--242dec4a-157f-4a65-9340-b756cb5f7270.yaml deleted file mode 100644 index 53f36f6..0000000 --- a/test-config/project/sites/default--242dec4a-157f-4a65-9340-b756cb5f7270.yaml +++ /dev/null @@ -1,9 +0,0 @@ -baseUrl: null -enabled: true -handle: default -hasUrls: false -language: en-GB -name: 'Nixon Williams Commerce Prototype' -primary: true -siteGroup: 4f4bb777-fb14-437a-b6d4-91e8f32a458e -sortOrder: 1 diff --git a/test-config/project/sites/default--2eb44645-1260-46fe-9ca5-5f80e350f1b7.yaml b/test-config/project/sites/default--2eb44645-1260-46fe-9ca5-5f80e350f1b7.yaml new file mode 100644 index 0000000..c4e5045 --- /dev/null +++ b/test-config/project/sites/default--2eb44645-1260-46fe-9ca5-5f80e350f1b7.yaml @@ -0,0 +1,9 @@ +baseUrl: $PRIMARY_SITE_URL +enabled: true +handle: default +hasUrls: true +language: en-US +name: 'Magic login testing' +primary: true +siteGroup: 0ec9b1fd-034b-4a84-99af-1758de94e5da # Magic login testing +sortOrder: 1 diff --git a/test-config/project/users/users.yaml b/test-config/project/users/users.yaml index e58c0a4..ce749f5 100644 --- a/test-config/project/users/users.yaml +++ b/test-config/project/users/users.yaml @@ -1,5 +1,8 @@ allowPublicRegistration: true +deactivateByDefault: false +defaultGroup: '' photoSubpath: null photoVolumeUid: null +require2fa: false requireEmailVerification: false -suspendByDefault: false +validateOnPublicRegistration: false \ No newline at end of file From 3e56d29bfaf3dcd8c66ef23f1789b4db12911945 Mon Sep 17 00:00:00 2001 From: Jamie Sykes Date: Tue, 4 Feb 2025 09:26:10 +0000 Subject: [PATCH 4/4] test: fixes deprecation in anyStatus function. --- tests/functional/RegistrationFormTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/RegistrationFormTest.php b/tests/functional/RegistrationFormTest.php index 80a5d67..e9ceb47 100644 --- a/tests/functional/RegistrationFormTest.php +++ b/tests/functional/RegistrationFormTest.php @@ -289,7 +289,7 @@ public function testUsersCanRegisterWithoutAPasswordToGetARandomOne() $user = UserElement::find() ->addSelect(['users.password']) ->email($registrationEmail) - ->anyStatus() + ->status(null) ->one(); $this->assertTrue($user->authenticate($password));