Skip to content

Conversation

@loevgaard
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Dec 1, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@loevgaard loevgaard force-pushed the review branch 5 times, most recently from d550511 to f4b561c Compare December 1, 2025 12:57
{
public function check(OrderInterface $order): ReviewableOrderCheck
{
if ($order->getState() === OrderInterface::STATE_FULFILLED) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's add an array of 'reviewable states' in the contructor and make those configurable in the plugin configuration

{
public function __construct(
private readonly StoreReviewRepositoryInterface $storeReviewRepository,
private readonly string $editablePeriod = '+24 hours',
Copy link
Member Author

Choose a reason for hiding this comment

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

Make this configurable in the plugin configuration. Also make it possible to disable this functionality because some store owners might want to allow users to be able to edit forever

use Setono\SyliusReviewPlugin\Model\StoreReviewInterface;
use Sylius\Component\Review\Model\ReviewInterface;

final class ReviewAutoApprovalChecker implements ReviewAutoApprovalCheckerInterface
Copy link
Member Author

Choose a reason for hiding this comment

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

Rename to AutoApprovalCheckerInterface and make it use the composite pattern used elsewhere in this plugin to allow plugin users to define their own 'auto approval checker' functionality

use Setono\SyliusReviewPlugin\Workflow\StoreReviewWorkflow;
use Symfony\Component\Workflow\WorkflowInterface;

#[AsDoctrineListener(event: 'prePersist')]
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove this and use xml configuration instead

) {
}

public function prePersist(PrePersistEventArgs $args): void
Copy link
Member Author

Choose a reason for hiding this comment

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

We need to do the same on preUpdate

@loevgaard loevgaard force-pushed the review branch 4 times, most recently from 8474c91 to c329b4b Compare December 1, 2025 13:56
Comment on lines +13 to +14
<field name="createdAt" column="created_at" type="datetime"/>
<field name="updatedAt" column="updated_at" type="datetime" nullable="true"/>
Copy link
Member Author

Choose a reason for hiding this comment

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

Use gedmo doctrine extensions for these properties

Comment on lines +21 to +22
<field name="createdAt" column="created_at" type="datetime"/>
<field name="updatedAt" column="updated_at" type="datetime" nullable="true"/>
Copy link
Member Author

Choose a reason for hiding this comment

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

Use gedmo doctrine extensions for these properties

@loevgaard loevgaard force-pushed the review branch 3 times, most recently from 0e0be5f to 3b99cb6 Compare December 1, 2025 14:29
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