/orocommerce-skills:oro-entityfrom orocommerce-skills
Use when creating OroCommerce v6.1 Doctrine entities, extending Oro core entities (Product, Order, Customer), writing schema migrations, configuring ownership (USER, BUSINESS_UNIT, ORGANIZATION, GLOBAL), ConfigField attributes, enum entities, ExtendEntity traits, or removing/hard-deleting extend fields and attributes (soft-delete, RemoveFieldQuery, dropColumn). Triggers on 'create entity', 'add field to Product', 'write migration', 'extend entity', 'custom field', 'remove field', 'delete attribute'.
Ships in orocommerce-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This is the reference pattern combining ExtendEntityInterface, ownership, security, and #[ConfigField]:
<?php
namespace Acme\Bundle\DemoBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Oro\Bundle\EntityConfigBundle\Metadata\Attribute\Config;
use Oro\Bundle\EntityConfigBundle\Metadata\Attribute\ConfigField;
use Oro\Bundle\EntityExtendBundle\Entity\ExtendEntityInterface;
use Oro\Bundle\EntityExtendBundle\Entity\ExtendEntityTrait;
use Oro\Bundle\OrganizationBundle\Entity\Organization;
use Oro\Bundle\UserBundle\Entity\User;
#[ORM\Entity]
#[ORM\Table(name: 'acme_demo_document')]
#[Config(
routeName: 'acme_demo_document_index',
routeView: 'acme_demo_document_view',
defaultValues: [
'entity' => ['icon' => 'fa-file', 'label' => 'Document', 'plural_label' => 'Documents'],
'ownership' => [
'owner_type' => 'USER',
'owner_field_name' => 'owner',
'owner_column_name' => 'user_owner_id',
'organization_field_name' => 'organization',
'organization_column_name' => 'organization_id',
],
'security' => ['type' => 'ACL', 'permissions' => 'VIEW;CREATE;EDIT;DELETE', 'group_name' => ''],
]
)]
class Document implements ExtendEntityInterface
{
use ExtendEntityTrait;
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\Column(type: 'string', length: 255)]
#[ConfigField(defaultValues: ['dataaudit' => ['auditable' => true]])]
private string $title;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(name: 'user_owner_id', referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?User $owner = null;
#[ORM\ManyToOne(targetEntity: Organization::class)]
#[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?Organization $organization = null;
// Getters/setters...
}
Use ExtendEntityInterface + ExtendEntityTrait only when admins add fields at runtime via System → Entity Management; the trait supplies the magic __get/__set/__isset/__call for them. Entities not extended at runtime do not need it.
CRITICAL: USER and BUSINESS_UNIT ownership both require an organization field. Missing it causes silent access control failures. See references/ownership-types.md for full config of all four types.
Migrations live in src/Acme/Bundle/DemoBundle/Migrations/Schema/, one subdirectory per version (v1_0/, v1_1/). A Migration implementation builds the table in up(Schema $schema, QueryBag $queries) — worked example, including the ownership columns a USER/BUSINESS_UNIT entity needs, in references/v6.1.md.
@ORM\ annotations instead of #[ORM\...] attributes — Doctrine won't recognize them in v6.1state = Deleted, column kept), which blocks re-creating a field with the same name; see references/removing-extend-fields.mdreferences/ownership-types.md — all four ownership types and their field requirementsreferences/entity-patterns.md — enum entities, ConfigField, extending core entities, repositories, commandsreferences/v6.1.md — v6.1 specifics, the migration example, common failuresreferences/removing-extend-fields.md — RemoveFieldQuery, attribute-family cleanup, POST_UP listeners, multi-host caveatsWhat SKILL.md sets; muted values are Claude Code's defaults
orocommerce@netresearch-claude-code-marketplace is listed by netresearch/claude-code-marketplace — review the source before installing
npx claudepluginhub netresearch/claude-code-marketplace --plugin orocommerce14 skills in this plugin
/oro-apiUse when exposing OroCommerce v6.1 entities via REST API, configuring api.yml or api_frontend.yml, creating custom API processors, setting up filters/sorters/subresources, or working with JSON:API endpoints. Relevant when the user mentions 'API endpoint', 'expose entity via API', 'api.yml', 'REST API', 'JSON:API', 'storefront API', or 'API processor'./oro-behat-ciUse when running Oro Commerce 6.1 Behat tests in CI/CD — Jenkins (Oro's canonical platform), GitLab CI (community territory per oroinc/platform#954), or any Docker pipeline. Covers compose fanout, headless Chrome, the formatter combo, consumer parallelisation maths, artifacts and init-image state transfer. Also on sight of .gitlab-ci.yml, Jenkinsfile, compose behat stages, compose-common.yaml. Triggers on 'behat ci', 'gitlab ci oro', 'jenkins oro', 'parallel behat', 'chrome headless', 'init-test image', 'behat hang'./oro-behat-debuggingUse when a Behat scenario in Oro Commerce 6.1 fails, hangs or flakes — element not found, intermittent runs, AJAX races, waitForAjax with fetch/XHR, step discovery (`-dl`/`-di`), snippets, verbosity, ScreenshotTrait, `And I wait for action` blocking CI, var/log forensics for hidden 500s, Xdebug across split CLI + PHP-FPM. Also without the word "behat": step definitions, feature files, Mink, Gherkin./oro-behat-testingUse when writing, configuring or running Behat integration tests for Oro Commerce 6.1 bundles against a LOCAL app — suites, contexts, elements, page objects, Alice fixtures, `bin/behat`. Covers auto-discovery vs `symfony_bundle` registration, `shared_contexts`, `behat.yml.dist` vs `behat.yml`, `--strict`/`--consumers`/`-s`, `@fixture-Bundle:file.yml`, `oro_behat_extension`, `OroMainContext`, feature-tag mocking, `config_behat_test.yml`, Mink, ChromeDriver, isolators. Triggers on "suite shows 0 features", "element not found", "step undefined", "fixture not loading"./oro-bundleUse when creating a new OroCommerce v6.1 bundle, registering bundles, setting up DependencyInjection extensions, configuring services.yml, adding translations, navigation menus, or system configuration. Also relevant for bundle-level boilerplate like compiler passes, event subscriber registration, and console commands. Also applies to 'create a bundle', 'scaffold', or 'new Oro module'./oro-datagridUse when creating new OroCommerce v6.1 datagrids, adding columns to existing grids, configuring filters, sorters, actions, mass actions, inline editing, or extending core grids (like product-grid, order-grid, customer-grid). Relevant when the user mentions 'create a grid', 'add column', 'grid filter', 'datagrid', 'data table', 'list view', or grid customization in OroCommerce.