Skip to content

[7.x] Add $unique argument to Asset::move()#14364

Open
lwekuiper wants to merge 1 commit intostatamic:masterfrom
lwekuiper:feat/asset-move-unique-arg
Open

[7.x] Add $unique argument to Asset::move()#14364
lwekuiper wants to merge 1 commit intostatamic:masterfrom
lwekuiper:feat/asset-move-unique-arg

Conversation

@lwekuiper
Copy link
Copy Markdown
Contributor

@lwekuiper lwekuiper commented Mar 26, 2026

This is a follow-up to #14236, which added Asset::moveUnique() as a non-breaking addition for 6.x.

Since master allows breaking changes, this PR removes moveUnique() and adds a $unique parameter directly to Asset::move(), consistent with how Asset::rename() already works:

$asset->move('folder', 'filename', unique: true);

@lwekuiper lwekuiper changed the title [master] Add $unique argument to Asset::move() [7.x] Add $unique argument to Asset::move() Mar 26, 2026
Copy link
Copy Markdown
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

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

First v7 PR! 🎉

I've just brought master up to date with 6.x if you'd like to fix the conflicts and remove the moveUnique method. (or reopen the PR if that's easier for you)

@lwekuiper lwekuiper force-pushed the feat/asset-move-unique-arg branch from 53edf63 to 4b7a508 Compare March 26, 2026 14:28
@lwekuiper lwekuiper requested a review from jasonvarga March 26, 2026 14:58
@lwekuiper
Copy link
Copy Markdown
Contributor Author

First v7 PR! 🎉

That's actually pretty cool 🥳 The PR is now updated!

Copy link
Copy Markdown
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

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

There's a bunch of unnecessary formatting changes. (e.g. added newlines, renaming unrelated test methods with_events->withEvents).

The moveQuietly method also needs the $unique parameter. Technically it works because it forwards arguments but it should be added.

Remove moveUnique() in favor of a $unique parameter on move(),
consistent with how rename() already works. Add $unique parameter
to moveQuietly() signature for explicit API parity.
@lwekuiper lwekuiper force-pushed the feat/asset-move-unique-arg branch from 4b7a508 to 5c35199 Compare March 30, 2026 08:51
@lwekuiper
Copy link
Copy Markdown
Contributor Author

lwekuiper commented Mar 30, 2026

Right, that was my automatic Pint formatting, I'll make sure to skip this in future PRs.

This is now cleaned up and the $unique parameter is added to moveQuietly().

@lwekuiper lwekuiper requested a review from jasonvarga March 30, 2026 09:06
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.

2 participants