diff --git a/CHANGELOG.md b/CHANGELOG.md index 7beee5e66e7..ce86a49fd08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Release Notes +## Unreleased + +### What's new +- Generate a `STATAMIC_SITE_KEY` on install to identify a project across environments. A site key is not a license — attach one with `php please license` or the Control Panel. Sites with a `STATAMIC_LICENSE_KEY` are left alone. +- Add `php please site:fresh-key` for cloned templates, plus a matching "Generate new key" action in the Licensing utility for when someone else linked your key first. +- Generate a missing site key from the Control Panel Licensing utility. +- Clarify Licensing purchase actions with a checkout summary modal. +- Drive the Licensing utility from a single primary action (generate / link / buy / add domain) based on whether the site is linked to a statamic.com account. + ## 6.31.0 (2026-09-01) ### What's new @@ -37,7 +46,6 @@ - French translations [#15303](https://github.com/statamic/cms/issues/15303) by @ebeauchamps - ## 6.30.0 (2026-08-28) ### What's new diff --git a/config/system.php b/config/system.php index 58b05476185..19083d18fbf 100644 --- a/config/system.php +++ b/config/system.php @@ -2,6 +2,20 @@ return [ + /* + |-------------------------------------------------------------------------- + | Site Key + |-------------------------------------------------------------------------- + | + | Identifies this project across environments. Generated on install. + | A site key is not a license — attach a license on statamic.com. + | + | https://statamic.dev/licensing + | + */ + + 'site_key' => env('STATAMIC_SITE_KEY'), + /* |-------------------------------------------------------------------------- | License Key @@ -9,6 +23,7 @@ | | The license key for the corresponding domain from your Statamic account. | Without a key entered, your app will be considered to be in Trial Mode. + | Legacy alias for site_key — still accepted. | | https://statamic.dev/licensing#trial-mode | @@ -16,6 +31,19 @@ 'license_key' => env('STATAMIC_LICENSE_KEY'), + /* + |-------------------------------------------------------------------------- + | Licensing Endpoints + |-------------------------------------------------------------------------- + | + | Override these in local/dev to point at a statamic.com worktree. + | + */ + + 'licensing_url' => env('STATAMIC_LICENSING_URL', 'https://statamic.com'), + + 'outpost_url' => env('STATAMIC_OUTPOST_URL', 'https://outpost.statamic.com/v3/query'), + /* |-------------------------------------------------------------------------- | Enable Multi-site diff --git a/lang/en/messages.php b/lang/en/messages.php index 19d1cdad492..90c1510465a 100644 --- a/lang/en/messages.php +++ b/lang/en/messages.php @@ -164,16 +164,33 @@ 'licensing_error_invalid_domain' => 'Invalid domain', 'licensing_error_invalid_edition' => 'License is for :edition edition', 'licensing_error_no_domains' => 'No domains defined', - 'licensing_error_no_site_key' => 'No site license key', + 'licensing_error_no_site_key' => 'No site key', 'licensing_error_outside_license_range' => 'License valid for versions :start and :end', - 'licensing_error_unknown_site' => 'Unknown site', + 'licensing_error_unknown_site' => 'Site key not recognized', 'licensing_error_unlicensed' => 'Unlicensed', - 'licensing_incorrect_key_format_body' => 'Your site key format is incorrect. Site keys are 16-character alphanumeric strings. Get your current key from your account at statamic.com. Do not use legacy UUID license keys.', + 'licensing_incorrect_key_format_body' => 'Your site key format is incorrect. Site keys look like site_ followed by 26 characters, or a legacy 16-character alphanumeric key. Get your current key from your account at statamic.com. Do not use UUID license keys.', 'licensing_incorrect_key_format_heading' => 'Incorrect site key format', 'licensing_production_alert' => 'This site is running Statamic Pro and commercial addons on a production domain. To continue using these features, please ensure you have valid licenses.', 'licensing_production_alert_addons' => 'This site is using commercial addons on a production domain. To continue using these features, please ensure you have valid licenses.', 'licensing_production_alert_renew_statamic' => 'Your Statamic Pro license needs to be renewed to use this version. Please update your license or downgrade your Statamic version to continue.', 'licensing_production_alert_statamic' => 'This site is running Statamic Pro on a production domain. To continue using Pro features, please ensure you have a valid license.', + 'licensing_site_key_already_exists' => 'This site already has a key.', + 'licensing_site_key_found' => 'Site key found — no license attached yet. Run `php please license` to attach one.', + 'licensing_site_key_generated' => 'Site key generated. Commit .env.example so other environments pick it up.', + 'licensing_site_key_missing' => 'This site does not have a site key yet. Generate one from the Licensing utility.', + 'licensing_fresh_key_unavailable' => 'A new site key can only be generated before this key has been linked to an account.', + 'licensing_fresh_key_prompt' => 'This site key is already linked to a different account. Generate a new key so this project gets its own identity.', + 'licensing_fresh_key_confirm' => 'Generate a new site key? Any other environment using the old key will need to be updated.', + 'licensing_not_connected' => 'This site key isn\'t linked to a statamic.com account yet.', + 'licensing_connected_unlicensed' => 'This site is linked to a statamic.com account but has no license attached.', + 'licensing_connected_needs_renewal' => 'This site\'s Statamic Pro license needs to be renewed.', + 'licensing_renew_pro_description' => 'Your Statamic Pro license does not cover this version. Renew to keep using it, or downgrade to a version in range.', + 'licensing_refresh_instructions' => 'License data refreshes from statamic.com hourly. Use Refresh after you make changes there.', + 'licensing_buy_addon_detail' => ':author', + 'licensing_buy_addons_description' => 'These commercial addons need a license for :site.', + 'licensing_buy_mixed_description' => ':site needs Statamic Pro and commercial addon licenses.', + 'licensing_buy_pro_description' => 'Statamic Pro unlocks users, revisions, Git, multi-site, and more. One license per production site.', + 'licensing_buy_pro_detail' => 'Per site. First year, then $99/year to renew.', 'licensing_sync_instructions' => 'License data syncs from statamic.com hourly. Use the sync button to check for any recent changes you\'ve made.', 'licensing_trial_mode_alert' => 'This site is using Statamic Pro and commercial addons in trial mode. Valid licenses will be required when you\'re ready to launch.', 'licensing_trial_mode_alert_addons' => 'This site is using commercial addons in trial mode. Valid licenses will be required when you\'re ready to launch.', diff --git a/resources/js/components/LicensingAlert.vue b/resources/js/components/LicensingAlert.vue index 8518c9e7888..a205d9950cd 100644 --- a/resources/js/components/LicensingAlert.vue +++ b/resources/js/components/LicensingAlert.vue @@ -1,19 +1,41 @@