Skip to content

Commit

Permalink
Merge branch '4.11' into patch-64
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Aug 3, 2024
2 parents 1bb837d + d337b0c commit 6745ffb
Show file tree
Hide file tree
Showing 89 changed files with 1,139 additions and 609 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- 4.x
- '4.10'
- '4.11'
pull_request:
permissions:
contents: read
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Release notes for Craft CMS 4.11 (WIP)

### Content Management
- Entry and category conditions now have a “Has Descendants” rule. ([#15276](https://github.com/craftcms/cms/discussions/15276))
- “Replace file” actions now display success notices on complete. ([#15217](https://github.com/craftcms/cms/issues/15217))
- Double-clicking on folders within asset indexes and folder selection modals now navigates the index/modal into the folder. ([#15238](https://github.com/craftcms/cms/discussions/15238))

### Administration
- Added the `env`, `env/set`, and `env/remove` commands. ([#15431](https://github.com/craftcms/cms/pull/15431))
- New sites’ Base URL settings now default to an environment variable name based on the site name. ([#15347](https://github.com/craftcms/cms/pull/15347))
- Craft now warns against using the `@web` alias for URL settings, regardless of whether it was explicitly defined. ([#15347](https://github.com/craftcms/cms/pull/15347))

### Development
- Added the `withCustomFields` element query param.
- Added support for application-type based `general` and `db` configs (e.g. `config/general.web.php`). ([#15346](https://github.com/craftcms/cms/pull/15346))
- `general` and `db` config files can now return a callable that modifies an existing config object. ([#15346](https://github.com/craftcms/cms/pull/15346))
- Added the `lazyGqlTypes` config setting. ([#15429](https://github.com/craftcms/cms/issues/15429))
- The `allowedGraphqlOrigins` config setting is now deprecated. `craft\filters\Cors` should be used instead. ([#15397](https://github.com/craftcms/cms/pull/15397))
- The `permissionsPolicyHeader` config settings is now deprecated. `craft\filters\Headers` should be used instead. ([#15397](https://github.com/craftcms/cms/pull/15397))
- `{% cache %}` tags now cache any asset bundles registered within them.
- Country field values are now set to `CommerceGuys\Addressing\Country\Country` objects. ([#15455](https://github.com/craftcms/cms/issues/15455), [#15463](https://github.com/craftcms/cms/pull/15463))
- Auto-populated section and category group Template settings are now suffixed with `.twig`.
- `x-craft-preview`/`x-craft-live-preview` URL query string params are now added to generated URLs for Live Preview requests, so `craft\web\Request::getIsPreview()` continues to return `true` on subsequent pages loaded within the iframe. ([#15447](https://github.com/craftcms/cms/discussions/15447))

### Extensibility
- Added `craft\config\GeneralConfig::addAlias()`. ([#15346](https://github.com/craftcms/cms/pull/15346))
- Added `craft\elements\Address::getCountry()`. ([#15463](https://github.com/craftcms/cms/pull/15463))
- Added `craft\elements\Asset::$sanitizeOnUpload`. ([#15430](https://github.com/craftcms/cms/discussions/15430))
- Added `craft\filters\Cors`. ([#15397](https://github.com/craftcms/cms/pull/15397))
- Added `craft\filters\Headers`. ([#15397](https://github.com/craftcms/cms/pull/15397))
- Added `craft\helpers\App::configure()`.
- Added `craft\web\View::clearAssetBundleBuffer()`.
- Added `craft\web\View::startAssetBundleBuffer()`.
- Added `Craft.EnvVarGenerator`.
- `craft\helpers\UrlHelper::cpUrl()` now returns URLs based on the primary site’s base URL (if it has one), for console requests if the `baseCpUrl` config setting isn’t set, and the `@web` alias wasn’t explicitly defined. ([#15374](https://github.com/craftcms/cms/issues/15374))
- `craft\services\Config::setDotEnvVar()` now accepts `false` for its `value` argument, which removes the environment variable from the `.env` file.
- Deprecated `craft\web\assets\elementresizedetector\ElementResizeDetectorAsset`.

### System
- Improved the performance of element indexes in structure view.
- The control panel now displays Ajax response-defined error messages when provided, rather than a generic “server error” message. ([#15292](https://github.com/craftcms/cms/issues/15292))
- Craft no longer sets the `Permissions-Policy` header on control panel responses. ([#15348](https://github.com/craftcms/cms/issues/15348))
- Control panel `resize` events now use ResizeObserver.
- Craft no longer ensures that the `cpresources` folder is writable.
- Front-end queue runner scripts are now injected before the `</body>` tag, rather than at the end of the response HTML.
- `graphql/api` requests no longer update the schema’s `lastUsed` timestamp if it was already updated within the last minute. ([#15464](https://github.com/craftcms/cms/issues/15464))
- Updated Yii to 2.0.51.
- Updated yii2-debug to 2.1.25.
- Updated svg-sanitizer to 0.19.
- Updated Axios to 0.28.1. ([#15448](https://github.com/craftcms/cms/issues/15448))
- Fixed a bug where error messages returned by the `users/send-password-reset-email` action weren’t accounting for the `useEmailAsUsername` config setting. ([#15425](https://github.com/craftcms/cms/issues/15425))
20 changes: 8 additions & 12 deletions bootstrap/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,17 @@
// -----------------------------------------------------------------------------

$configService = new Config();
$configService->appType = $appType;
$configService->env = $environment;
$configService->configDir = $configPath;
$configService->appDefaultsDir = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'defaults';
$generalConfig = $configService->getConfigFromFile('general');
$generalConfig = $configService->getGeneral();

// Validation
// -----------------------------------------------------------------------------

$createFolder = function($path) use ($generalConfig) {
if (!is_dir($path)) {
FileHelper::createDirectory($path, $generalConfig['defaultDirMode'] ?? 0775);
}
FileHelper::createDirectory($path, $generalConfig->defaultDirMode ?? 0775);
};

$ensureFolderIsReadable = function($path, $writableToo = false) {
Expand Down Expand Up @@ -160,7 +159,7 @@
// Determine if Craft is running in Dev Mode
// -----------------------------------------------------------------------------

$devMode = App::env('CRAFT_DEV_MODE') ?? $generalConfig['devMode'] ?? false;
$devMode = App::env('CRAFT_DEV_MODE') ?? $generalConfig->devMode;

if ($devMode) {
ini_set('display_errors', '1');
Expand Down Expand Up @@ -215,12 +214,9 @@
}

// Set any custom aliases
$customAliases = $generalConfig['aliases'] ?? $generalConfig['environmentVariables'] ?? null;
if (is_array($customAliases)) {
foreach ($customAliases as $name => $value) {
if (is_string($value)) {
Craft::setAlias($name, $value);
}
foreach ($generalConfig->aliases as $name => $value) {
if (is_string($value)) {
Craft::setAlias($name, $value);
}
}

Expand All @@ -244,7 +240,7 @@
$configService->getConfigFromFile("app.{$appType}")
);

$safeMode = App::env('CRAFT_SAFE_MODE') ?? $generalConfig['safeMode'] ?? false;
$safeMode = App::env('CRAFT_SAFE_MODE') ?? $generalConfig->safeMode;

if ($safeMode) {
ArrayHelper::remove($localConfig, 'bootstrap');
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"craftcms/server-check": "~2.1.2",
"creocoder/yii2-nested-sets": "~0.9.0",
"elvanto/litemoji": "~4.3.0",
"enshrined/svg-sanitize": "~0.16.0",
"enshrined/svg-sanitize": "~0.19.0",
"guzzlehttp/guzzle": "^7.2.0",
"illuminate/collections": "^9.1.0",
"mikehaertl/php-shellcommand": "^1.6.3",
Expand All @@ -56,8 +56,8 @@
"twig/twig": "~3.8.0",
"voku/stringy": "^6.4.0",
"webonyx/graphql-php": "~14.11.5",
"yiisoft/yii2": "~2.0.50.0",
"yiisoft/yii2-debug": "~2.1.22.0",
"yiisoft/yii2": "~2.0.51.0",
"yiisoft/yii2-debug": "~2.1.25.0",
"yiisoft/yii2-queue": "~2.3.2",
"yiisoft/yii2-symfonymailer": "^2.0.0"
},
Expand Down
35 changes: 17 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 23 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@
"@selectize/selectize": "selectize/selectize.js#master",
"@types/jquery": "^3.5.7",
"accounting": "^0.4.1",
"axios": "^0.27.2",
"axios": "^0.28.1",
"blueimp-file-upload": "^10.31.0",
"d3": "^4.11.0",
"d3-format": "^1.4.4",
"d3-time-format": "^2.2.3",
"element-resize-detector": "^1.2.4",
"event-stream": "3.3.5",
"fabric": "^1.7.19",
"graphiql": "~1.7.2",
Expand Down
Loading

0 comments on commit 6745ffb

Please sign in to comment.