Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into utc-dates
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Providers/ExtensionServiceProvider.php
  • Loading branch information
duncanmcclean committed Feb 27, 2025
2 parents 1459821 + d255f5f commit a139181
Show file tree
Hide file tree
Showing 88 changed files with 1,111 additions and 226 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,14 @@ jobs:
strategy:
matrix:
php: [8.2, 8.3, 8.4]
laravel: [11.*]
laravel: [11.*, 12.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
- os: windows-latest
php: 8.3
laravel: 11.*
stability: prefer-stable
exclude:
- php: 8.1
laravel: 11.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
41 changes: 40 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
# Release Notes

## 5.47.0 (2025-03-18)
## 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
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": "^11.34",
"laravel/framework": "^11.34 || ^12.0",
"laravel/prompts": "^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": "^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": "^2.0",
"symfony/lock": "^7.0.3",
"symfony/var-exporter": "^7.0.3",
"symfony/yaml": "^7.0.3",
Expand All @@ -42,8 +42,8 @@
"google/cloud-translate": "^1.6",
"laravel/pint": "1.16.0",
"mockery/mockery": "^1.6.10",
"orchestra/testbench": "^9.2",
"phpunit/phpunit": "^10.5.35",
"orchestra/testbench": "^9.2 || ^10.0",
"phpunit/phpunit": "^11.5.3",
"spatie/laravel-ray": "^1.37"
},
"config": {
Expand Down
2 changes: 2 additions & 0 deletions resources/js/components/entries/BaseCreateForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
:revisions-enabled="revisions"
:breadcrumbs="breadcrumbs"
:initial-site="site"
:parent="parent"
:can-manage-publish-state="canManagePublishState"
:create-another-url="createAnotherUrl"
:initial-listing-url="listingUrl"
Expand All @@ -41,6 +42,7 @@ export default {
'revisions',
'breadcrumbs',
'site',
'parent',
'canManagePublishState',
'createAnotherUrl',
'listingUrl',
Expand Down
2 changes: 2 additions & 0 deletions resources/js/components/entries/PublishForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ export default {
collectionHasRoutes: Boolean,
previewTargets: Array,
autosaveInterval: Number,
parent: String,
},
data() {
Expand Down Expand Up @@ -620,6 +621,7 @@ export default {
...{
_blueprint: this.fieldset.handle,
_localized: this.localizedFields,
_parent: this.parent,
},
};
Expand Down
7 changes: 6 additions & 1 deletion resources/js/components/field-actions/DropdownActions.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<div>
<button v-for="action in actions" @click="run(action)" v-text="action.title" />
<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
18 changes: 18 additions & 0 deletions resources/js/components/fieldtypes/assets/AssetsFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,17 @@ export default {
field: `<code>${this.config.dynamic}</code>`,
});
},
internalFieldActions() {
return [
{
title: __('Remove All'),
dangerous: true,
run: this.removeAll,
visible: this.assets.length > 0,
},
];
},
},
events: {
Expand Down Expand Up @@ -496,6 +507,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 @@ -145,6 +145,17 @@ export default {
return item ? item.title : id;
});
},
internalFieldActions() {
return [
{
title: __('Unlink All'),
dangerous: true,
run: this.unlinkAll,
visible: this.value.length > 0,
},
];
},
},
methods: {
Expand All @@ -157,6 +168,14 @@ export default {
linkExistingItem() {
this.$refs.input.$refs.existing.click();
},
unlinkAll() {
this.update([]);
this.updateMeta({
...this.meta,
data: [],
});
},
},
};
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,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/js/components/structures/Branch.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="flex">
<div class="page-tree-branch flex">
<slot name="branch-action" :branch="page">
<div v-if="editable" class="page-move w-6" />
</slot>
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
5 changes: 4 additions & 1 deletion resources/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
"Icon": "Icône",
"ID": "ID",
"ID regenerated and Stache cleared": "ID regénéré et Stache effacé",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si vous ne parvenez pas à cliquer sur le bouton \":actionText\", copiez et collez l'URL ci-dessous dans votre navigateur Web :",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Si vous ne parvenez pas à cliquer sur le bouton \":actionText\", copiez et collez l'URL ci-dessous dans votre navigateur Web :",
"Image": "Image",
"Image Cache": "Cache des images",
"Image cache cleared.": "Cache des images effacé.",
Expand Down Expand Up @@ -768,6 +768,7 @@
"Released on :date": "Publiée le :date",
"Remember me": "Se souvenir de moi",
"Remove": "Enlever",
"Remove All": "Tout enlever",
"Remove all empty nodes": "Enlever tous les noeuds vides",
"Remove Asset": "Enlever la ressource",
"Remove child page|Remove :count child pages": "Enlever la page enfant|Enlever :count pages enfants",
Expand Down Expand Up @@ -950,6 +951,7 @@
"Taxonomy saved": "Taxonomie enregistrée",
"Template": "Modèle",
"Templates": "Modèles",
"Term": "Terme",
"Term created": "Terme créé",
"Term deleted": "Terme supprimé",
"Term references updated": "Références des termes mises à jour",
Expand Down Expand Up @@ -1010,6 +1012,7 @@
"Uncheck All": "Décocher tout",
"Underline": "Souligner",
"Unlink": "Dissocier",
"Unlink All": "Tout dissocier",
"Unlisted Addons": "Addons non répertoriés",
"Unordered List": "Liste non ordonnée",
"Unpin from Favorites": "Supprimer des favoris",
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/hu.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 újragenerálva, Stache törölve",
"If youre having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Ha nem tudja megkattintani a(z) \":actionText\" gombot, másolja ki és illessze be az alábbi URL-t a böngészőjébe:",
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Ha nem tudja megkattintani a(z) \":actionText\" gombot, másolja ki és illessze be az alábbi URL-t a böngészőjébe:",
"Image": "Kép",
"Image Cache": "Képgyorsítótár",
"Image cache cleared.": "A képgyorsítótár törölve.",
Expand Down
1 change: 1 addition & 0 deletions resources/views/entries/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
:revisions="{{ Statamic\Support\Str::bool($revisionsEnabled) }}"
:breadcrumbs="{{ $breadcrumbs->toJson() }}"
site="{{ $locale }}"
parent="{{ $parent }}"
create-another-url="{{ cp_route('collections.entries.create', [$collection, $locale, 'blueprint' => $blueprint['handle'], 'parent' => $values['parent'] ?? null]) }}"
listing-url="{{ cp_route('collections.show', $collection) }}"
:can-manage-publish-state="{{ Statamic\Support\Str::bool($canManagePublishState) }}"
Expand Down
2 changes: 1 addition & 1 deletion src/API/AbstractCacher.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ protected function normalizeKey($key)
*/
public function cacheExpiry()
{
return Carbon::now()->addMinutes($this->config('expiry'));
return Carbon::now()->addMinutes((int) $this->config('expiry'));
}
}
2 changes: 1 addition & 1 deletion src/Assets/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ public function mimeType()
*/
public function lastModified()
{
return Carbon::createFromTimestamp($this->meta('last_modified'));
return Carbon::createFromTimestamp($this->meta('last_modified'), config('app.timezone'));
}

/**
Expand Down
Loading

0 comments on commit a139181

Please sign in to comment.