Files
Veranstaltungen/.continue/rules/entity-directory-structure-with-php-attributes.md
T
jens 788ddcd0b5 feat: Implement comprehensive architectural guidelines and clean code standards
- Establish feature-based architecture with clear separation between Logic, Data, and Shared layers
- Define directory structure conventions for controllers, entities, DTOs, managers, mappers, models, processors, providers, repositories, and services
- Implement Symfony 7.4+ compliance with proper Request handling (UI layer only)
- Enforce PHP 8+ attributes usage instead of annotations
- Set up proper DTO usage in UseCases with immutable properties
- Configure repository pattern with interfaces in Logic layer and implementations in Data layer
- Implement strict separation of concerns with UI layer handling Request objects exclusively
- Define clear naming conventions (PascalCase for feature names)
- Add shared components directory for reusable elements across features
- Establish HTTP status code constants usage instead of magic numbers
- Configure proper file placement for controllers in UI/Frontend, UI/Api, and UI/CLI subdirectories
- Enforce modern PHP practices with explicit return types and strict typing

This commit lays the foundation for a maintainable, scalable Symfony 7.4+ application following clean architecture principles and modern coding standards.
2026-06-02 22:05:40 +02:00

11 lines
814 B
Markdown

---
globs: src/Data/*/Entity/*.php
description: This rule enforces proper entity organization in the Data layer
with clear separation by feature. It mandates usage of modern PHP attributes
for Doctrine mappings instead of annotations to align with contemporary PHP
standards and Symfony best practices. When feature names cannot be determined,
explicit developer decisions are required rather than automatic defaults.
alwaysApply: true
---
All entities must be placed in /src/Data/[FeatureName]/Entity directory, where [FeatureName] represents a valid feature-specific subdirectory. Entities must use modern PHP attributes (not annotations) for Doctrine mapping. When the FeatureName is unknown or ambiguous, developers must actively select an appropriate feature name rather than defaulting to 'Unknown'.