Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Attempt to support Statamic v4 #59

Merged
merged 6 commits into from
May 10, 2023

Conversation

grantholle
Copy link
Contributor

Here's a half-attempt to support Statamic v4.

I've got the tests somewhat passing, admittedly jumping a few versions of testbench. Statamic's APIs seem to have changed too, so I did my best to get things working. I'm not familiar enough with it to get much further.

When I try to perform the action in Statamic, the following error occurs:

Call to undefined method Statamic\\Structures\\CollectionTree::page() at duplicator/src/Actions/DuplicateEntryAction.php:115)

I see that in the Tree class there is a pages() function, but indeed no page(). I think it's close? Not sure.

@duncanmcclean duncanmcclean self-assigned this May 10, 2023
@duncanmcclean
Copy link
Owner

Thanks! I'll take a look at fixing the tests & the bug you spotted when I have some time (likely not until tomorrow).

Copy link
Owner

@duncanmcclean duncanmcclean left a comment

Choose a reason for hiding this comment

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

Thanks for this!

I've fixed the test & copied across changes made in the Core version of this action (the one used for non-multi-sites).

@duncanmcclean duncanmcclean merged commit 8a2766f into duncanmcclean:main May 10, 2023
@duncanmcclean
Copy link
Owner

Released as part of v4.0.0.

@dominikfoeger
Copy link

Thanks for the super fast update! Is there a reason php >=8.2 is required?
Laravel 10 supports php >=8.1, would that be fine too?

@duncanmcclean
Copy link
Owner

Ah, didn't realise this PR removed PHP 8.1 support. I've added it back in v4.0.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants