Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughTwo new documentation files have been added: "AI Contribution Guidelines" (AGENTS.md), detailing standards and practices for AI assistants contributing to the Sylius project, and "CLAUDE.md," which references the AGENTS.md file. No code or exported entities were modified. Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (8)
CLAUDE.md (1)
1-1: Use proper Markdown link syntax for referencing guidelinesInstead of using
@AGENTS.md, link directly with descriptive text:- See @AGENTS.md + See [AI Contribution Guidelines](AGENTS.md)AGENTS.md (7)
1-4: Refine welcome message and heading clarityChange "contributing to this Sylius:" to remove "this" and the trailing colon for a cleaner introduction:
- Welcome, 🤖 AI assistant! Please follow these guidelines when contributing to this Sylius: + Welcome, 🤖 AI assistant! Please follow these guidelines when contributing to Sylius.
9-16: Consolidate and improve project structure bulletsCombine the first two bullets for brevity and clarity, and maintain consistent wording:
- This is Sylius: e-commerce framework - Sylius is built on top of **Symfony** + Sylius is an e-commerce framework built on **Symfony**, designed to be extendable, modular, and efficient.
19-22: Clarify terminology in security practicesReplace the shorthand "auth bypasses" with the full term for better clarity:
- Follow secure coding practices to prevent XSS, CSRF, injections, auth bypasses, etc. + Follow secure coding practices to prevent XSS, CSRF, injections, authentication bypasses, etc.
25-31: Spell out acronyms for readabilityConsider expanding ECS and CI on first use to aid understanding:
- Use **ECS** to ensure consistent code style + Use **Easy Coding Standard (ECS)** to ensure consistent code style - Use **CI** to run all tests and checks automatically + Use **Continuous Integration (CI)** to run all tests and checks automatically
43-61: Clarifystrict_typesdirective and trailing comma supportRecommend explicitly noting the syntax and PHP version support for trailing commas:
- Declare `strict_types=1` in all PHP files + Include `declare(strict_types=1);` at the top of all PHP files - Use trailing commas in multi-line arrays and argument lists + Use trailing commas in multi-line arrays and argument lists (supported since PHP 7.3)
74-78: Remove colon before series introduced by a prepositionAdjust the serialization groups bullet to fix typographical issue:
- Use serialization groups for: `index`, `show`, `create`, `update` + Use serialization groups for `index`, `show`, `create`, and `update`🧰 Tools
🪛 LanguageTool
[typographical] ~77-~77: Do not use a colon (:) before a series that is introduced by a preposition (‘for’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...ion/folder - Use serialization groups for:index,show,create,update` - U...(RP_COLON)
80-87: Address empty sections or remove placeholdersThe sections for PHPUnit, Behat, JavaScript, and CSS are empty. Either populate them with relevant guidance or remove these headings until ready.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
AGENTS.md(1 hunks)CLAUDE.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
AGENTS.md
[typographical] ~77-~77: Do not use a colon (:) before a series that is introduced by a preposition (‘for’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...ion/folder - Use serialization groups for:index, show, create, update` - U...
(RP_COLON)
🔇 Additional comments (2)
AGENTS.md (2)
34-40: Commands section is clear and comprehensiveThe listed commands cover all necessary steps for setup, style, analysis, testing, and asset compilation.
64-71: Templates section aligns with project practicesThe guidelines for HTML5, Twig, icon usage, naming conventions, directory structure, and translations are well-defined.
| - Declare `strict_types=1` in all PHP files | ||
| - Follow the **Sylius Coding Standard** | ||
| - Do not use deprecated features from PHP, Symfony, or Sylius | ||
| - Use `final` for all classes, except entities and repositories |
There was a problem hiding this comment.
There could be probably more exceptions like components, etc, but we can add it later 👌🏻
There was a problem hiding this comment.
Maybe they should read rules in ecs etc to know rules by itself
789f8d8 to
052340f
Compare
|
The base of this pull-request was changed, you need fetch and reset your local branch Unless you added new commits (to this branch) locally that you did not push yet, Feel free to ask for assistance when you get stuck 👍 |
❌ Preview Environment deleted from BunnyshellAvailable commands:
|
|
|
||
| ### Compatibility & Security | ||
|
|
||
| - Ensure compatibility with **Symfony 6.4 and 7.x**, and **PHP 8.2 or higher** |
There was a problem hiding this comment.
@mpysiak This will have to be updated for each version bump, can we tell it that it's supporting the last 2 available version of Symfony? And more globally can we avoid setting version number in this file?
There was a problem hiding this comment.
We should instruct to read composer.json.
There was a problem hiding this comment.
This PR was just for initial AGENTS.md creation. Feel free to open new PRs with changes. I think this will need some iterations to make it look good
There was a problem hiding this comment.
If it's possible good idea
| - Use trailing commas in multi-line arrays and argument lists | ||
| - Order array keys alphabetically where applicable | ||
| - Use PHPDoc only when necessary (e.g. `@var Collection<ProductInterface>`) | ||
| - Group class elements in this order: constants, properties, constructor, public methods, protected methods, private methods |
There was a problem hiding this comment.
Should group getter,setter methods for the same properties together as well. getter first like
getProduct()
setProduct()
getTaxon()
setTaxon()| ## API | ||
|
|
||
| - Define resources in `admin/` and `shop/` folders accordingly | ||
| - Define operations in the following order: `get collection`, `get item`, `post`, `put`, `delete` |
| Q | A |-----------------|----- | Branch? | 2.0 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | #18156 | License | MIT <!-- - Bug fixes must be submitted against the 1.14 or 2.0 branch - Features and deprecations must be submitted against the 2.1 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html -->
I've added an initial AGENTS.md template — a guide for AI assistants like ChatGPT, Copilot, Codex, etc. to follow when contributing code to Sylius.
It’s meant to keep AI-generated code clean and aligned with how we build things
Feel free to review and suggest improvements. Let’s show the bots how we do things in Sylius 😎🤖
Summary by CodeRabbit