Skip to content

[6.x] Group GraphQL, image, backup, queue, asset, template, and slug settings into config objects - #20930

Draft
riasvdv wants to merge 13 commits into
6.xfrom
config-objects
Draft

riasvdv wants to merge 13 commits into
6.xfrom
config-objects

Conversation

@riasvdv

@riasvdv riasvdv commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Groups related general config settings into config objects, the way mcp and anchors already work.

// Before
->enableGql(false)
->maxGraphqlDepth(10)
->imageDriver('imagick')
->maxUploadFileSize('25M')

// After
->gql(GqlConfig::create()->enabled(false)->maxDepth(10))
->images(ImagesConfig::create()->driver('imagick'))
->assets(AssetsConfig::create()->maxUploadFileSize('25M'))
GeneralConfig
├── gql        GqlConfig        11 settings  (enableGql → gql.enabled, maxGraphqlDepth → gql.maxDepth, …)
├── images     ImagesConfig     12 settings  (imageDriver → images.driver, upscaleImages → images.upscale, …)
├── backups    BackupsConfig     5 settings  (backupCommand → backups.command, maxBackups → backups.max, …)
├── queue      QueueConfig       4 settings  (queueName → queue.name, runQueueAutomatically → queue.runAutomatically, …)
├── assets     AssetsConfig     15 settings  (maxUploadFileSize, uploadSessionDisk, revAssetUrls → assets.revUrls, …)
├── templates  TemplatesConfig   6 settings  (defaultTemplateExtensions → templates.defaultExtensions, …)
└── slugs      SlugsConfig       4 settings  (slugWordSeparator → slugs.wordSeparator, …)

Each object can be set fluently, as JSON (CRAFT_GQL='{"maxDepth":10}'), or one setting at a time (CRAFT_GQL_MAX_DEPTH=10).

The old names keep working without the Yii adapter, and log a deprecation warning. BaseConfig::$renamedSettings now accepts dotted targets such as 'enableGql' => 'gql.enabled', and forwards:

  • property reads and writes ($config->maxGraphqlDepth)
  • array configs ('maxGraphqlDepth' => 10)
  • fluent calls (->maxGraphqlDepth(10)), through __call
  • CRAFT_ variables under the old names (CRAFT_MAX_GRAPHQL_DEPTH). Variables for the new names win, and a variable that's named after both, such as CRAFT_QUEUE_NAME, is applied as the new setting only.

Values set under an old name go through the new setting's fluent method, so maxUploadFileSize is still converted to bytes and extraAllowedFileExtensions still merges into allowedFileExtensions.

Also:

  • fromConfig() moved to BaseConfig, shared by every config object.
  • GeneralConfig::getBackupOnUpdate(), getTempAssetUploadDisk(), getUploadSessionDisk(), getTrashedAssetDisk(), and the IMAGE_DRIVER_* constants are deprecated in favor of methods and constants on the new objects.
  • The adapter's renamed settings (backupDbOnUpdate, enableGraphQlCaching, tempAssetUploadFs) point to the new paths, and the Yii2 Loose Ends utility lists the new renames.

Evidence

// tests/Unit/Config/ConfigServiceProviderTest.php
general.php: ['enableGql' => false, 'upscaleImages' => false, 'maxUploadFileSize' => '2M', 'privateTemplateTrigger' => '']
env:         CRAFT_MAX_GRAPHQL_DEPTH=7, CRAFT_EXTRA_ALLOWED_FILE_EXTENSIONS=MBOX,xml, CRAFT_QUEUE_NAME=craft
fluent:      ->enableGraphqlIntrospection(false)->runQueueAutomatically(false)

expect gql.enabled = false, gql.maxDepth = 7, images.upscale = false,
       assets.maxUploadFileSize = 2097152, assets.allowedFileExtensions ⊇ [mbox, xml],
       queue.name = 'craft' (no deprecation logged), templates.privateTrigger = ''
  • Before: with the rename map emptied, or with __set assigning properties directly, these tests fail.
    After: they pass, along with the existing config, GraphQL, asset, image, queue, backup, template, and element suites, and the adapter's Laravel suite.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

📚 Storybook previews

@craftcms/ui — open Storybook

No changed components detected in this Storybook.

resources/js — open Storybook

No changed components detected in this Storybook.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Renamed configuration handling violates environment-variable precedence, mutates shared nested configuration during loads, and breaks existing array-style property updates.

3 open issues
What changed in this PR

Groups related Craft CMS settings into seven typed configuration objects, extending the existing mcp and anchors pattern while retaining compatibility with legacy setting names.

Changes:

  • Adds grouped configuration objects and shared array/JSON initialization.
  • Forwards legacy settings and environment variables to nested settings, with deprecation handling.
  • Migrates core and Yii adapter consumers, updates tests, and documents the new configuration paths.
File Description
yii2-adapter/​tests/​unit/​web/​ViewTest.php Uses nested template settings.
yii2-adapter/​tests/​unit/​helpers/​AssetsHelperTest.php Uses nested asset settings.
yii2-adapter/​tests/​unit/​gql/​ScalarTypesTest.php Uses nested GraphQL timezone settings.
yii2-adapter/​tests/​unit/​gql/​ArgumentHandlerTest.php Uses nested GraphQL caching settings.
yii2-adapter/​tests-laravel/​Legacy/​ConfigCompatibilityTest.php Adds legacy GraphQL mapping coverage.
yii2-adapter/​tests-laravel/​Gql/​LegacySettingsQueriesTest.php Updates GraphQL configuration setup.
yii2-adapter/​tests-laravel/​Gql/​LegacyGqlCompatibilityTest.php Updates GraphQL configuration setup.
yii2-adapter/​src/​Asset/​LegacyAssetTransforms.php Reads nested image transform settings.
yii2-adapter/​legacy/​web/​UrlRule.php Reads the nested slug separator.
yii2-adapter/​legacy/​validators/​SlugValidator.php Reads nested ASCII slug settings.
yii2-adapter/​legacy/​validators/​AssetLocationValidator.php Reads nested allowed extensions.
yii2-adapter/​legacy/​services/​Assets.php Uses the asset config disk helper.
yii2-adapter/​legacy/​queue/​QueueComponent.php Reads nested queue names.
yii2-adapter/​legacy/​queue/​Queue.php Reads nested automatic queue settings.
yii2-adapter/​legacy/​queue/​LegacyJobWrapper.php Uses the nested default queue name.
yii2-adapter/​legacy/​imagetransforms/​FallbackTransformer.php Reads nested image transform settings.
yii2-adapter/​legacy/​helpers/​Queue.php Uses nested queue priorities.
yii2-adapter/​legacy/​helpers/​Assets.php Reads grouped URL and image settings.
yii2-adapter/​legacy/​elements/​Asset.php Reads nested transform permissions.
yii2-adapter/​legacy/​db/​pgsql/​Schema.php Reads grouped backup settings.
yii2-adapter/​legacy/​db/​mysql/​Schema.php Reads grouped backup commands.
yii2-adapter/​legacy/​db/​Connection.php Updates backup-setting documentation only.
yii2-adapter/​legacy/​config/​GeneralConfig.php Updates rename mappings and normalization.
tests/​Unit/​View/​TemplateModeTest.php Updates template configuration assertions.
tests/​Unit/​Twig/​TemplateResolverTest.php Uses grouped template settings.
tests/​Unit/​Support/​TypecastTest.php Tests upload-size casting on AssetsConfig.
tests/​Unit/​Filesystem/​UploadersTest.php Uses grouped uploader settings.
tests/​Unit/​Element/​ElementHelperTest.php Uses grouped slug settings.
tests/​Unit/​Cp/​NavigationTest.php Configures GraphQL through GqlConfig.
tests/​Unit/​Config/​GeneralConfigTest.php Exercises grouped setters and disk helpers.
tests/​Unit/​Config/​ConfigServiceProviderTest.php Adds grouped and legacy configuration coverage.
tests/​Unit/​Asset/​AssetsHelperTest.php Uses grouped asset settings.
tests/​Feature/​Utility/​UtilitiesTest.php Uses grouped backup availability settings.
tests/​Feature/​Support/​PathTest.php Uses the nested compiled-template path.
tests/​Feature/​Queue/​QueueServiceProviderTest.php Uses nested queue names.
tests/​Feature/​Queue/​Middleware/​RunQueueMiddlewareTest.php Uses nested automatic queue settings.
tests/​Feature/​Queue/​JobTest.php Checks the nested default queue name.
tests/​Feature/​Queue/​JobProgressServiceTest.php Configures grouped queue names.
tests/​Feature/​Mcp/​ElementLifecycleTest.php Uses the nested asset trash disk.
tests/​Feature/​Mcp/​AssetsTest.php Uses grouped upload settings.
tests/​Feature/​Mcp/​ActivityTest.php Configures queue names and tracking together.
tests/​Feature/​Image/​RasterTest.php Uses the nested image driver.
tests/​Feature/​Image/​ImageTransformHelperTest.php Uses nested cloud-image cache settings.
tests/​Feature/​Image/​ImageTransformerTest.php Uses grouped transform and URL settings.
tests/​Feature/​Image/​ImagesTest.php Uses grouped sanitization and transform settings.
tests/​Feature/​Image/​ImageHelperTest.php Uses grouped sanitization and metadata settings.
tests/​Feature/​Image/​ImageDriversTest.php Uses the nested image driver.
tests/​Feature/​Http/​Controllers/​Utilities/​DbBackupControllerTest.php Configures nested backup commands.
tests/​Feature/​Http/​Controllers/​User/​SaveUserController/​PublicRegistrationTest.php Uses nested upload limits.
tests/​Feature/​Http/​Controllers/​User/​PhotoControllerTest.php Uses grouped photo upload settings.
tests/​Feature/​Http/​Controllers/​User/​PersonalAccessTokensControllerTest.php Uses nested GraphQL enablement.
tests/​Feature/​Http/​Controllers/​QueueControllerTest.php Uses grouped queue configuration.
tests/​Feature/​Http/​Controllers/​Gql/​AuthenticatedRequestsTest.php Uses nested GraphQL caching settings.
tests/​Feature/​Http/​Controllers/​Gql/​ApiControllerTest.php Uses the nested GraphQL batch limit.
tests/​Feature/​Http/​Controllers/​Elements/​ElementRedirectControllerTest.php Uses the nested temporary asset disk.
tests/​Feature/​Http/​Controllers/​Assets/​UploadSessionControllerTest.php Uses grouped upload configuration.
tests/​Feature/​Gql/​TypeManagerTest.php Updates GraphQL caching setup.
tests/​Feature/​Gql/​SettingsTest.php Updates GraphQL caching setup.
tests/​Feature/​Gql/​ReleasesTest.php Updates GraphQL caching setup.
tests/​Feature/​Gql/​GqlTest.php Uses nested GraphQL caching settings.
tests/​Feature/​Gql/​GqlHelperTest.php Updates GraphQL caching setup.
tests/​Feature/​Gql/​ElementQueryConditionBuilderTest.php Updates GraphQL caching setup.
tests/​Feature/​Gql/​AuthenticatedFieldConditionsTest.php Updates GraphQL caching setup.
tests/​Feature/​GarbageCollection/​Actions/​DeleteTrashedAssetFilesTest.php Uses the nested asset trash disk.
tests/​Feature/​Field/​TableRelationColumnTest.php Uses nested GraphQL limits and caching.
tests/​Feature/​Field/​AssetsUploadTest.php Uses grouped asset upload settings.
tests/​Feature/​Element/​ElementHelperTest.php Uses the nested slug increment limit.
tests/​Feature/​Database/​BackupsTest.php Uses grouped backup configuration.
tests/​Feature/​Console/​Commands/​Gql/​GraphqlCommandTestHelpers.php Updates GraphQL caching setup.
tests/​Feature/​Asset/​VolumeValidationTest.php Uses the nested temporary asset disk.
tests/​Feature/​Asset/​VolumeFilesystemResolutionTest.php Uses the nested temporary asset disk.
tests/​Feature/​Asset/​AssetTrashTest.php Uses the nested asset trash disk.
src/​Workflow/​UserReview/​UserReviewNotification.php Uses the nested notification queue name.
src/​View/​TemplateResolver.php Updates template configuration examples only.
src/​View/​TemplateMode.php Reads grouped template defaults.
src/​View/​TemplateCaches.php Reads nested template caching enablement.
src/​Utility/​UtilityTypes.php Reads nested backup availability.
src/​Utility/​Utilities/​ClearCaches.php Reads nested GraphQL enablement.
src/​User/​Notifications/​VerifyEmailNotification.php Uses the nested queue name.
src/​User/​Notifications/​ResetPasswordNotification.php Uses the nested queue name.
src/​User/​Notifications/​ActivityMentionNotification.php Uses the nested queue name.
src/​User/​Notifications/​ActivationNotification.php Uses the nested queue name.
src/​Support/​Path.php Reads the nested compiled-template path.
src/​Search/​Search.php Uses the nested low-priority queue name.
src/​Route/​RedirectRule.php Reads the nested slug separator.
src/​Queue/​Listeners/​ProgressListener.php Reads grouped queue tracking settings.
src/​Queue/​JobProgress.php Reads grouped queue names for cleanup.
src/​Queue/​Job.php Uses the nested default queue name.
src/​Mcp/​Capabilities/​Utilities.php Reads grouped queue worker names.
src/​Mcp/​Capabilities/​Assets.php Reads nested upload session duration.
src/​Image/​Raster.php Reads grouped image processing settings.
src/​Image/​ImageTransformHelper.php Reads grouped image cache and quality settings.
src/​Image/​ImageTransformer.php Reads grouped transform and queue settings.
src/​Image/​Images.php Uses ImagesConfig constants and grouped settings.
src/​Image/​ImageMetadataReader.php Updates metadata-setting documentation only.
src/​Image/​ImageHelper.php Reads grouped image processing settings.
src/​Http/​Middleware/​RunQueue.php Reads nested automatic queue enablement.
src/​Http/​Middleware/​HandleTemplateRequest.php Reads the nested private template trigger.
src/​Http/​Controllers/​Updates/​UpdaterController.php Uses the grouped backup decision helper.
src/​Http/​Controllers/​QueueController.php Reads grouped queue settings.
src/​Http/​Controllers/​MigrateController.php Uses the grouped backup decision helper.
src/​Http/​Controllers/​Gql/​GqlController.php Reads nested GraphQL enablement.
src/​Http/​Controllers/​Gql/​ApiController.php Reads grouped GraphQL batch and caching settings.
src/​Http/​Controllers/​Assets/​ImageEditorController.php Uses nested image upscaling settings.
src/​Gql/​Resolvers/​Mutations/​Asset.php Reads nested allowed upload extensions.
src/​Gql/​Resolvers/​ElementResolver.php Reads the nested GraphQL result limit.
src/​Gql/​GqlServiceProvider.php Reads nested GraphQL enablement.
src/​Gql/​GqlEntityRegistry.php Reads grouped GraphQL type-prefix settings.
src/​Gql/​Gql.php Reads grouped GraphQL execution settings.
src/​Gql/​Directives/​FormatDateTime.php Reads nested GraphQL timezone settings.
src/​GarbageCollection/​Actions/​DeleteTrashedAssetFiles.php Uses the asset config trash-disk helper.
src/​Filesystem/​Uploads.php Reads grouped upload session settings.
src/​Filesystem/​Uploaders/​TusUploader.php Reads grouped upload size limits.
src/​Filesystem/​Uploaders.php Uses grouped uploader and disk settings.
src/​Field/​TableCells/​BaseRelationCell.php Reads the nested GraphQL result limit.
src/​Field/​Link.php Reads nested GraphQL enablement.
src/​Field/​Icon.php Reads nested GraphQL enablement.
src/​Field/​Color.php Reads nested GraphQL enablement.
src/​Entry/​Elements/​Entry.php Reads the nested partial-template path.
src/​Element/​Validation/​ElementRules.php Reads nested ASCII slug settings.
src/​Element/​Revisions.php Uses the nested low-priority queue name.
src/​Element/​ElementHelper.php Reads grouped slug generation settings.
src/​Element/​ElementAttributeRenderer.php Reads the nested slug separator.
src/​Element/​Concerns/​Renderable.php Reads the nested partial-template path.
src/​Database/​Commands/​Concerns/​BackupTrait.php Uses the grouped backup decision helper.
src/​Database/​Backups.php Reads grouped backup and restore settings.
src/​Database/​BackupCommands/​PostgresBackupCommand.php Reads the nested backup format.
src/​Cp/​Navigation.php Reads nested GraphQL enablement.
src/​Cp/​Cp.php Sources existing client data from grouped settings.
src/​Console/​Commands/​Utils/​AsciiFilenamesCommand.php Reads nested filename conversion settings.
src/​Config/​TemplatesConfig.php Adds the template configuration object.
src/​Config/​SlugsConfig.php Adds the slug configuration object.
src/​Config/​QueueConfig.php Adds the queue configuration object.
src/​Config/​McpConfig.php Inherits shared configuration initialization.
src/​Config/​ImagesConfig.php Adds image settings and driver constants.
src/​Config/​GqlConfig.php Adds the GraphQL configuration object.
src/​Config/​ConfigServiceProvider.php Adds legacy environment-variable forwarding.
src/​Config/​BaseConfig.php Adds shared initialization and dotted rename forwarding.
src/​Config/​BackupsConfig.php Adds backup settings and update decision helper.
src/​Config/​AssetsConfig.php Adds asset settings, normalization, and disk helpers.
src/​Config/​AnchorsConfig.php Inherits shared configuration initialization.
src/​Asset/​Volumes.php Uses the asset config temporary-disk helper.
src/​Asset/​Validation/​VolumeRules.php Uses the grouped temporary-disk setting.
src/​Asset/​Validation/​Rules/​AssetLocationRule.php Reads nested allowed extensions.
src/​Asset/​Elements/​Asset.php Uses grouped image, sanitization, and trash settings.
src/​Asset/​Data/​Volume.php Uses the grouped temporary-disk setting.
src/​Asset/​AssetUploads.php Reads nested allowed extensions.
src/​Asset/​AssetUploadHandler.php Reads nested image sanitization settings.
src/​Asset/​AssetsHelper.php Reads grouped asset settings.
src/​Asset/​Assets.php Uses the asset config temporary-disk helper.
src/​Asset/​AssetIndexer.php Reads grouped extension and image cache settings.
src/​Asset/​AssetFileKinds.php Reads nested custom file kinds.
src/​Asset/​Analysis/​ImageAnalyzer.php Uses the nested low-priority queue name.
docs/​uploads.md Documents grouped upload configuration.
docs/​blade.md Documents nested template extension configuration.
CHANGELOG.md Records grouped settings and deprecations.
CHANGELOG-WIP.md Documents configuration migration for upgraders.

Review effort: Balanced

Comment thread src/Config/BaseConfig.php Resolved
Comment thread src/Config/ConfigServiceProvider.php Resolved
Comment thread src/Config/ConfigServiceProvider.php Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

String-valued backup retention overrides crash configuration loading, while the shared factory silently drops renamed settings and deferred deprecation logs report incorrect call sites.

1 open issue
2 previously missed issues

In code that hasn't changed since last review

Medium severity Apply renamed settings through the shared factory

src/​Config/​BaseConfig.php:57

The new shared factory silently drops renamed settings because they no longer satisfy property_exists() or method_exists(). For example, returning GeneralConfig::fromConfig(['enableGql' => false]) from general.php leaves GraphQL enabled, whereas returning the same array directly correctly disables it through __set(). Please route keys in the rename map through __set() here as well, preserving normalization and deprecation logging.

Medium severity Capture the original caller for deferred deprecation logs

src/​Config/​BaseConfig.php:204

When an old setting is used before application boot, the deferred log records the boot callback’s location instead of the caller in config/craft/general.php. This points users to the wrong file and line and merges separate uses of the same setting into one deprecation fingerprint. Capture the caller’s backtrace before deferring, then resolve its origin and pass the file and line to Deprecator::log().

3 resolved since last review

Review effort: Balanced

Comment thread src/Config/BackupsConfig.php Resolved
riasvdv and others added 7 commits November 20, 2026 18:45
Adds `GqlConfig` and the `gql` general config setting, which replaces the
eleven flat GraphQL settings. The old names, including their fluent
methods and `CRAFT_` environment variables, forward to `gql` through
`BaseConfig`'s renamed settings, which now accept dotted targets, and log
a deprecation warning.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>
Adds `ImagesConfig`, `BackupsConfig`, and `QueueConfig`, and the `images`,
`backups`, and `queue` general config settings, which replace 21 flat
settings. The old names forward to them through `RENAMED_SETTINGS`, and
log a deprecation warning. A `CRAFT_` variable that's named after both
an old and a new setting, such as `CRAFT_QUEUE_NAME`, is applied as the
new setting only.

`fromConfig()` moves to `BaseConfig`, which every config object shares.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>
Adds `AssetsConfig` and the `assets` general config setting, which
replaces the 15 settings in the Assets group, including the file
extension merging and upload size conversion they did. The old names
forward to it through `RENAMED_SETTINGS`, and log a deprecation warning.

Renamed settings now forward through the new setting's fluent method,
when it has one, so values set under an old name are normalized the same
way.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>
Adds `TemplatesConfig` and `SlugsConfig`, and the `templates` and `slugs`
general config settings, which replace ten flat settings. The old names
forward to them through `RENAMED_SETTINGS`, and log a deprecation
warning.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>
`Stub::make()` stubs the `gql()` fluent method instead of setting the
`gql` property, and skips the constructor, so writing `gqlTypePrefix`
reached an uninitialized `gql` object.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>
- Renamed settings are returned by reference, so writes such as
  `$config->allowedFileExtensions[] = 'mbox'` reach the new setting.
- `CRAFT_` variables named after renamed settings are applied before
  the variables for the new settings, including whole-object ones such
  as `CRAFT_GQL`, so the new names always win.
- Those variables now change a clone of the nested config object, so a
  cached config's objects aren't changed.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>
- `Typecast` converts `int|false` settings, so `CRAFT_BACKUPS_MAX=5` and
  `CRAFT_MAX_BACKUPS=5` no longer throw a `TypeError`.
- `BaseConfig::fromConfig()` forwards renamed settings, such as
  `GeneralConfig::fromConfig(['enableGql' => false])`.
- Deprecation logs for renamed settings capture the caller before they're
  deferred, so they point at the file and line that used the old name.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The renamed setter forwards string values without normalization from a strictly typed file, causing a TypeError that prevents startup for configurations such as maxGraphqlDepth(env('MAX_DEPTH')).

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread src/Config/BaseConfig.php Resolved
`BaseConfig::__call()` forwards calls from a strictly typed file, so a
non-strict `general.php` calling `->maxGraphqlDepth('10')` threw a
`TypeError` instead of getting the coercion a direct call had. The value
is now typecast for the new setting first, as `__set()` does.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed to evaluate a named-argument coercion regression and incorrect restore-command placeholder documentation identified in unpublished findings.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

`brokenImagePath` is now `images.brokenPath`. The old setting and its
`CRAFT_BROKEN_IMAGE_PATH` environment variable still work and log a
deprecation warning.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>
riasvdv and others added 2 commits November 20, 2026 21:26
…nfig objects

Adds `RoutingConfig`, `SecurityConfig`, `UsersConfig`, and
`GarbageCollectionConfig`, and the `routing`, `security`, `users`, and
`garbageCollection` general config settings, which replace 43 flat
settings. `rememberUsernameDuration` moves to `security`. The old names
forward to them through `RENAMED_SETTINGS`, and log a deprecation
warning. The path, page trigger, and auth getters move with their
settings; the `GeneralConfig` ones are deprecated and delegate to them.

A renamed setting that keeps its name and has an `#[EnvName]` attribute,
such as `disable2fa`, now keeps its old environment variable name
(`CRAFT_DISABLE_2FA`).

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The supplied review evidence identifies no active issues blocking approval of the grouped-configuration migration.

No open issues 🎉

Review effort: Balanced

The guard and password broker getters moved there from GeneralConfig, so
the architecture test's allowlist moves with them, and GeneralConfig drops
its unused Auth and Password imports.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>
timkelty added a commit that referenced this pull request Nov 22, 2026
…ltTransformer()

addTransformer() pairs with transformers() the way addAlias() pairs with
aliases(), and doesn't read like a getter. defaultTransformer() keeps its
name when these settings move into the assets config object from #20930.
The env override is now CRAFT_ASSET_TRANSFORMERS_DEFAULT_TRANSFORMER.

Amp-Thread-ID: https://ampcode.com/threads/T-7e5890db-fcff-466b-96f7-c1b06efaa5df
Co-authored-by: Amp <amp@ampcode.com>

Copy link
Copy Markdown
Contributor

Heads-up: #21018 merged, deprecating CRAFT_ general config overrides. For this PR:

  • Expect conflicts in GeneralConfig.php docblocks; drop the new CRAFT_* examples and show env() instead.
  • The renamed-variable path (CRAFT_ENABLE_GQL → gql.enabled) should log the same deprecation. It already has $envName, so log with that; deprecateEnvironmentOverrides() reflects on properties and won't find renamed ones.

Takes #21018's docblocks, which drop the `CRAFT_*` environment override
examples, and drops them from the new config objects' docblocks too.
Environment variables named after renamed settings, such as
`CRAFT_ENABLE_GQL`, now log #21018's environment override deprecation as
well as the renamed setting one.

`maxCachedCloudSize` is removed from `ImagesConfig`, since 6.x removed
`maxCachedCloudImageSize`, and new 6.x code reads the moved settings from
their config objects.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1f9b3-3d39-7447-bc6d-a85c563eee0d
Co-authored-by: Amp <amp@ampcode.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants