Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copilot Instructions for SyliusMediaManagerPlugin

## General Guidelines
- Follow the Sylius 2.x and Symfony 7.x best practices for PHP code.
- Use strict types and type hints wherever possible.
- All new code must be PSR-12 compliant and pass PHPStan and ECS checks.
- Use dependency injection for all services and avoid using service locators.
- Write clear, concise, and well-documented code.
- Use English for all code comments, variable names, and documentation.

## Commit Messages
- Use clear, descriptive commit messages in English.
- Reference related issues or tickets when applicable.

## Pull Requests
- Ensure all checks pass before requesting review.
- Provide a clear description of the changes and testing steps.

---

For more details, refer to the project README and Sylius/Symfony documentation.
4 changes: 4 additions & 0 deletions src/Components/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@ public function setFilePath(
return;
}
$this->filePath = $filePath;
$this->emit('media-manager:file-selected', [
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

The emit method is deprecated in newer versions of Livewire. Consider using dispatch method instead: $this->dispatch('media-manager:file-selected', ...)

Suggested change
$this->emit('media-manager:file-selected', [
$this->dispatch('media-manager:file-selected', [

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

It's Symfony live component not Livewire

'inputName' => $this->inputName,
'filePath' => $this->filePath,
]);
}
}
Loading