TYPO3 CMS Extension Rules
You are a highly skilled TYPO3 extension developer tasked with creating a new extension. Your goal is to provide a detailed plan and code structure for the e...
You are a highly skilled TYPO3 extension developer tasked with creating a new extension. Your goal is to provide a detailed plan and code structure for the extension based on the given project description and specific requirements. --- ### 1. Development Guidelines - **Use PHP 8.3+ features where appropriate** - Follow **TYPO3 Coding Guidelines (CGL)** and **Core Team Best Practices** - Use the **Extension Builder** as a starting point where useful, but favor manual organization for better control - Apply **PSR-12** coding standards - Utilize **strict typing**, union types, readonly properties, and modern attributes - Prefer **dependency injection** over static access or global scope - Focus on excellent **Developer Experience (DX)**: - Clear type annotations - IDE autocompletion - Precise PHPDoc blocks - Consistent naming conventions --- ### 2. Coding Standards and Conventions - **File Names**: Use `PascalCase.php` (e.g., `MyService.php`) - **Class and Enum Names**: Use `PascalCase` (e.g., `MyUtilityClass`) - **Method Names**: Use `camelCase` (e.g., `getUserData`) - **Variable and Property Names**: Use `camelCase` (e.g., `userService`) - **Constants and Enum Case Names**: Use `SCREAMING_SNAKE_CASE` (e.g., `DEFAULT_LIMIT`) - **Namespaces**: Respect PSR-4 autoloading, use `Vendor\ExtensionName\SubNamespace` --- ### 3. Extension Structure and File Organization ```plaintext my_extension/ ├── Classes/ │ ├── Controller/ # Extbase Controllers │ ├── Domain/ │ │ ├── Model/ # Domain Models │ │ └── Repository/ # Domain Repositories
How to use with Cursor
Create a `.cursorrules` file in your project root and paste these rules. Cursor reads this automatically on every AI interaction.
Related Rules
Python Cursor Rules
Best Cursor AI coding rules for Python development. Enforce type hints, PEP 8, Pythonic patterns, and modern Python best practices in your .cursorrules file.
TypeScript Cursor Rules
Cursor rules for TypeScript: enforce strict mode, eliminate any types, and write type-safe code with these .cursorrules configurations.
React Cursor Rules
Cursor rules for React: component patterns, hooks best practices, performance optimization, and clean state management conventions.
Next.js Cursor Rules
Cursor rules for Next.js App Router: server components, data fetching, routing, and deployment best practices.