Skip to content

Commit

Permalink
Merge branch '5.x' into feature/link-nofollow
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell committed Mar 1, 2025
2 parents 83ea221 + dd8f37b commit d15aed9
Show file tree
Hide file tree
Showing 99 changed files with 1,496 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
php: [8.1, 8.2, 8.3, 8.4]
laravel: [10.*, 11.*]
laravel: [10.*, 11.*, 12.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
Expand All @@ -32,6 +32,8 @@ jobs:
exclude:
- php: 8.1
laravel: 11.*
- php: 8.1
laravel: 12.*
- php: 8.4
laravel: 10.*

Expand Down Expand Up @@ -103,7 +105,7 @@ jobs:
run: vendor/bin/phpunit

js-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

name: JavaScript tests
Expand Down
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
# Release Notes

## 5.49.0 (2025-02-25)

### What's new
- Laravel 12 support [#11433](https://github.com/statamic/cms/issues/11433) by @duncanmcclean

### What's fixed
- Asset Container returns relative url for same site [#11372](https://github.com/statamic/cms/issues/11372) by @marcorieser



## 5.48.1 (2025-02-25)

### What's fixed
- Fix session expiry component [#11501](https://github.com/statamic/cms/issues/11501) by @jasonvarga
- Include port in CSP for Live Preview [#11498](https://github.com/statamic/cms/issues/11498) by @dmxmo
- Remove duplicate translation line from `translator` command [#11494](https://github.com/statamic/cms/issues/11494) by @duncanmcclean
- Fix carbon integer casting [#11496](https://github.com/statamic/cms/issues/11496) by @jasonvarga
- Only show spatie/fork prompt when pcntl extension is loaded [#11493](https://github.com/statamic/cms/issues/11493) by @duncanmcclean
- French translations [#11488](https://github.com/statamic/cms/issues/11488) by @ebeauchamps



## 5.48.0 (2025-02-21)

### What's new
- Carbon 3 support [#11348](https://github.com/statamic/cms/issues/11348) by @duncanmcclean
- Allow custom asset container contents cache store [#11481](https://github.com/statamic/cms/issues/11481) by @ryanmitchell
- Add support for `$view` parameter closure with `Route::statamic()` [#11452](https://github.com/statamic/cms/issues/11452) by @jesseleite
- Add Unlink All action to relationship fields [#11475](https://github.com/statamic/cms/issues/11475) by @jacksleight

### What's fixed
- Fix handle dimensions of rotated videos [#11479](https://github.com/statamic/cms/issues/11479) by @grischaerbe
- Entries Fieldtype: Hide tree view when using query scopes [#11484](https://github.com/statamic/cms/issues/11484) by @duncanmcclean
- Fix issue with localization files named like handles [#11482](https://github.com/statamic/cms/issues/11482) by @ChristianPraiss
- Fix cannot use paginate/limit error when one is null [#11478](https://github.com/statamic/cms/issues/11478) by @jacksleight
- Fix primitive type hint handling in Statamic routes [#11476](https://github.com/statamic/cms/issues/11476) by @jesseleite



## 5.47.0 (2025-02-18)

### What's new
- Support Sections in form GraphQL queries [#11466](https://github.com/statamic/cms/issues/11466) by @ryanmitchell
- Add empty/not empty field filters [#11389](https://github.com/statamic/cms/issues/11389) by @jacksleight
- Support arguments in user can/cant tags [#11407](https://github.com/statamic/cms/issues/11407) by @jacksleight
- Add hook into the `multisite` command [#11458](https://github.com/statamic/cms/issues/11458) by @duncanmcclean
- Set the proper CSP headers for multi-domain iframe [#11447](https://github.com/statamic/cms/issues/11447) by @edalzell
- Allow custom render callback for overridden exceptions [#11408](https://github.com/statamic/cms/issues/11408) by @FrittenKeeZ
- Support the Group fieldtype in DataReferenceUpdater [#11410](https://github.com/statamic/cms/issues/11410) by @duncanmcclean

### What's fixed
- Fix emptiness check on Value properties [#11402](https://github.com/statamic/cms/issues/11402) by @godismyjudge95
- Change revision whereKey to return a collection [#11463](https://github.com/statamic/cms/issues/11463) by @ryanmitchell
- If nav:from references an invalid entry, ensure nothing is returned [#11464](https://github.com/statamic/cms/issues/11464) by @ryanmitchell
- Improve performance of the data reference updaters [#11442](https://github.com/statamic/cms/issues/11442) by @duncanmcclean
- Fix search results missing search_snippets [#11450](https://github.com/statamic/cms/issues/11450) by @ivang76
- Ensure consistent order of `get_content` results [#11429](https://github.com/statamic/cms/issues/11429) by @daun
- Fixes empty asset alt <td> element in AssetsFieldtype [#11460](https://github.com/statamic/cms/issues/11460) by @PatrickJunod
- Fix issue with AssetsFieldtype upload controls hidden on @sm size [#11459](https://github.com/statamic/cms/issues/11459) by @PatrickJunod
- Fix test state issues around sites cache [#11455](https://github.com/statamic/cms/issues/11455) by @jesseleite
- Fix InstallEloquentDriver command [#11425](https://github.com/statamic/cms/issues/11425) by @aerni
- Handle extra translation files in breadcrumbs [#11422](https://github.com/statamic/cms/issues/11422) by @jasonvarga
- Select specific repositories for Eloquent Driver install command [#11381](https://github.com/statamic/cms/issues/11381) by @kevinmeijer97
- Adjust video fit in asset editor [#11414](https://github.com/statamic/cms/issues/11414) by @daun
- Dutch translations [#11448](https://github.com/statamic/cms/issues/11448) by @daronspence
- Use `ubuntu-latest` in GitHub Actions workflows [#11443](https://github.com/statamic/cms/issues/11443) by @duncanmcclean



## 5.46.1 (2025-02-04)

### What's fixed
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
"composer/semver": "^3.4",
"guzzlehttp/guzzle": "^6.3 || ^7.0",
"james-heinrich/getid3": "^1.9.21",
"laravel/framework": "^10.40 || ^11.34",
"laravel/framework": "^10.40 || ^11.34 || ^12.0",
"laravel/prompts": "^0.1.16 || ^0.2.0 || ^0.3.0",
"league/commonmark": "^2.2",
"league/csv": "^9.0",
"league/glide": "^2.3",
"maennchen/zipstream-php": "^3.1",
"michelf/php-smartypants": "^1.8.1",
"nesbot/carbon": "^2.62.1",
"nesbot/carbon": "^2.62.1 || ^3.0",
"pixelfear/composer-dist-plugin": "^0.1.4",
"rebing/graphql-laravel": "^9.7",
"rebing/graphql-laravel": "^9.8",
"rhukster/dom-sanitizer": "^1.0.6",
"spatie/blink": "^1.3",
"spatie/ignition": "^1.15",
"spatie/ignition": "^1.15.1",
"statamic/stringy": "^3.1.2",
"stillat/blade-parser": "^1.10.1",
"stillat/blade-parser": "^1.10.1 || ^2.0",
"symfony/lock": "^6.4",
"symfony/var-exporter": "^6.0",
"symfony/yaml": "^6.0 || ^7.0",
Expand All @@ -42,8 +42,8 @@
"google/cloud-translate": "^1.6",
"laravel/pint": "1.16.0",
"mockery/mockery": "^1.6.10",
"orchestra/testbench": "^8.14 || ^9.2",
"phpunit/phpunit": "^10.5.35",
"orchestra/testbench": "^8.14 || ^9.2 || ^10.0",
"phpunit/phpunit": "^10.5.35 || ^11.5.3",
"spatie/laravel-ray": "^1.37"
},
"config": {
Expand Down
6 changes: 3 additions & 3 deletions resources/css/components/fieldtypes/assets.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
}

.assets-fieldtype .assets-fieldtype-picker {
@apply flex items-center px-4 py-2 bg-gray-200 dark:bg-dark-650 border dark:border-dark-900 rounded;
@apply flex flex-wrap items-center px-4 py-2 bg-gray-200 dark:bg-dark-650 border dark:border-dark-900 rounded;

&.is-expanded {
@apply border-b-0 rounded-b-none;
}

.asset-upload-control {
@apply mt-2 @sm:rtl:mr-4 @sm:ltr:ml-4 @sm:mt-0 text-xs text-gray-600 leading-tight;
@apply text-xs text-gray-600 leading-tight;
}

.upload-text-button {
Expand All @@ -30,7 +30,7 @@
}

.assets-fieldtype .asset-upload-control {
@apply hidden @xs:inline-block;
@apply inline-block;
}


Expand Down
1 change: 1 addition & 0 deletions resources/js/components/field-actions/DropdownActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<button
v-for="action in actions"
@click="run(action)"
:class="{ warning: action.dangerous }"
v-text="action.title" />
</div>
</template>
Expand Down
6 changes: 6 additions & 0 deletions resources/js/components/field-actions/FieldAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default class FieldAction {
#visibleWhenReadOnly;
#icon;
#quick;
#dangerous;
#confirm;

constructor(action, payload) {
Expand All @@ -17,6 +18,7 @@ export default class FieldAction {
this.#visibleWhenReadOnly = action.visibleWhenReadOnly ?? false;
this.#icon = action.icon ?? 'image';
this.#quick = action.quick ?? false;
this.#dangerous = action.dangerous ?? false;
this.title = action.title;
}

Expand All @@ -32,6 +34,10 @@ export default class FieldAction {
return typeof this.#quick === 'function' ? this.#quick(this.#payload) : this.#quick;
}

get dangerous() {
return typeof this.#dangerous === 'function' ? this.#dangerous(this.#payload) : this.#dangerous;
}

get icon() {
return typeof this.#icon === 'function' ? this.#icon(this.#payload) : this.#icon;
}
Expand Down
7 changes: 3 additions & 4 deletions resources/js/components/fieldtypes/assets/AssetRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@
>
{{ asset.basename }}
</button>
<div v-text="asset.size" class="hidden @xs:inline asset-filesize text-xs text-gray-600 px-2" />
</td>
<td class="w-24" v-if="showSetAlt">

<button
v-if="showSetAlt && needsAlt"
class="asset-set-alt text-blue dark:text-dark-blue-100 px-4 text-sm hover:text-black dark:hover:text-dark-100"
type="button"
@click="editOrOpen"
v-if="needsAlt"
>
{{ asset.values.alt ? "✅" : __("Set Alt") }}
</button>
<div v-text="asset.size" class="hidden @xs:inline asset-filesize text-xs text-gray-600 px-2" />
</td>
<td class="p-0 w-8 rtl:text-left ltr:text-right align-middle" v-if="!readOnly">
<button
Expand Down
22 changes: 20 additions & 2 deletions resources/js/components/fieldtypes/assets/AssetsFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<div
v-if="!isReadOnly && showPicker"
class="assets-fieldtype-picker space-x-4"
class="assets-fieldtype-picker gap-x-4 gap-y-2"
:class="{
'is-expanded': expanded,
'bard-drag-handle': isInBardField
Expand Down Expand Up @@ -442,7 +442,18 @@ export default {
return this.config.dynamic === 'id'
? __('statamic::fieldtypes.assets.dynamic_folder_pending_save')
: __('statamic::fieldtypes.assets.dynamic_folder_pending_field', {field: `<code>${this.config.dynamic}</code>`});
}
},
internalFieldActions() {
return [
{
title: __('Remove All'),
dangerous: true,
run: this.removeAll,
visible: this.assets.length > 0,
},
];
},
},
Expand Down Expand Up @@ -532,6 +543,13 @@ export default {
this.assets.splice(index, 1);
},
/**
* Remove all assets from the field.
*/
removeAll() {
this.assets = [];
},
/**
* When the uploader component has finished uploading a file.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,18 @@ export default {
const item = _.findWhere(this.meta.data, { id });
return item ? item.title : id;
});
}
},
internalFieldActions() {
return [
{
title: __('Unlink All'),
dangerous: true,
run: this.unlinkAll,
visible: this.value.length > 0,
},
];
},
},
Expand All @@ -162,7 +173,15 @@ export default {
linkExistingItem() {
this.$refs.input.$refs.existing.click();
}
},
unlinkAll() {
this.update([]);
this.updateMeta({
...this.meta,
data: [],
});
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
:search="search"
:exclusions="exclusions"
:type="config.type"
:tree="tree"
:tree="config.query_scopes?.length > 0 ? null : tree"
@selected="selectionsUpdated"
@closed="close"
/>
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"Icon": "İkon",
"ID": "ID",
"ID regenerated and Stache cleared": "ID yenidən yaradıldı və Stache təmizləndi",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Əgər \":actionText\" düyməsini tıklamaqda çətinlik çəkirsinizsə, aşağıdakı URL-ni kopyalayıb veb brauzerinizə yapışdırın:",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Əgər \":actionText\" düyməsini tıklamaqda çətinlik çəkirsinizsə, aşağıdakı URL-ni kopyalayıb veb brauzerinizə yapışdırın:",
"Image": "Şəkil",
"Image Cache": "Şəkil Keşi",
"Image cache cleared.": "Şəkil keşi təmizləndi.",
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"Icon": "Ikona",
"ID": "ID",
"ID regenerated and Stache cleared": "ID obnoveno a Stache vyprázdněno",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Pokud máte problém s kliknutím na tlačítko \":actionText\", zkopírujte a vložte URL níže do webového prohlížeče:",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Pokud máte problém s kliknutím na tlačítko \":actionText\", zkopírujte a vložte URL níže do webového prohlížeče:",
"Image": "Obrázek",
"Image Cache": "Cache obrázků",
"Image cache cleared.": "Cache obrázků smazána.",
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"Icon": "Ikon",
"ID": "ID",
"ID regenerated and Stache cleared": "ID regenereret og Stache ryddet",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Hvis du har problemer med at klikke på knappen \" :actionText \", skal du kopiere og indsætte nedenstående URL i din webbrowser:",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Hvis du har problemer med at klikke på knappen \" :actionText \", skal du kopiere og indsætte nedenstående URL i din webbrowser:",
"Image": "Billede",
"Image Cache": "Billedcache",
"Image cache cleared.": "Billedcache ryddet.",
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"Icon": "Icon",
"ID": "ID",
"ID regenerated and Stache cleared": "ID regeneriert und Stache gelöscht",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Wenn du beim Klicken auf den Button „:actionText“ Probleme hast, kopiere die folgende URL und füge sie in deinem Browser ein:",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Wenn du beim Klicken auf den Button „:actionText“ Probleme hast, kopiere die folgende URL und füge sie in deinem Browser ein:",
"Image": "Bild",
"Image Cache": "Bildercache",
"Image cache cleared.": "Der Bildercache wurde gelöscht.",
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/de_CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"Icon": "Icon",
"ID": "ID",
"ID regenerated and Stache cleared": "ID regeneriert und Stache gelöscht",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Wenn du beim Klicken auf den Button «:actionText» Probleme hast, kopiere die folgende URL und füge sie in deinem Browser ein:",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Wenn du beim Klicken auf den Button «:actionText» Probleme hast, kopiere die folgende URL und füge sie in deinem Browser ein:",
"Image": "Bild",
"Image Cache": "Bildercache",
"Image cache cleared.": "Der Bildercache wurde gelöscht.",
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"Icon": "Icono",
"ID": "IDENTIFICACIÓN",
"ID regenerated and Stache cleared": "ID regenerada y bigote limpiado",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si tienes problemas para hacer clic en el botón de \":actionText\", copia y pega el siguiente URL en tu navegador:",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si tienes problemas para hacer clic en el botón de \":actionText\", copia y pega el siguiente URL en tu navegador:",
"Image": "Imagen",
"Image Cache": "Caché de imágenes",
"Image cache cleared.": "Caché de imágenes borrado.",
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"Icon": "آیکون",
"ID": "شناسه",
"ID regenerated and Stache cleared": "شناسه با موفقیت از نو ساخته و کش خالی شد",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "اگر مشکلی در خصوص کلیلک روی دکمه‌ی \":actionText\" وجود دارد، می‌توانید آدرس زیر را کپی و در آدرس بار مرورگر پیست کنید:",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "اگر مشکلی در خصوص کلیلک روی دکمه‌ی \":actionText\" وجود دارد، می‌توانید آدرس زیر را کپی و در آدرس بار مرورگر پیست کنید:",
"Image": "تصویر",
"Image Cache": "کش تصویر",
"Image cache cleared.": "کش تصویر پاک شد",
Expand Down
Loading

0 comments on commit d15aed9

Please sign in to comment.