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.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: UI/Controller/**/*.php
|
||||
description: When creating new controllers in the UI/Controller directory, a
|
||||
corresponding feature subfolder should be created to organize related
|
||||
controller files
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All controllers in the UI/Controller directory must be placed within feature-specific subdirectories
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Data/**
|
||||
description: This rule ensures that all implementation files belonging to the
|
||||
Data layer are consistently organized under the /src/Data directory structure,
|
||||
maintaining clear separation between Logic and Data layers.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All files in the Data layer must be placed within the /src/Data directory
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/Logic/**/DTO/*
|
||||
description: This rule ensures that all DTO (Data Transfer Object) files are
|
||||
correctly placed within the Logic layer according to the feature-based
|
||||
architecture, with proper naming conventions for feature directories and clear
|
||||
separation of data transfer objects.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All DTO files in the Logic layer must be placed within /src/Logic/[FeatureName]/DTO directory, where [FeatureName] is a valid feature-specific subdirectory. If the FeatureName is unknown or ambiguous, developers must actively provide a proper feature name rather than defaulting to 'Unknown'.
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
globs: src/Data/*/Entity/*.php
|
||||
description: This rule enforces that entities are placed in feature-specific
|
||||
directories under /src/Data/[FeatureName]/Entity. When [FeatureName] is
|
||||
unknown or ambiguous, the developer must select an appropriate feature name
|
||||
instead of automatically using a default 'Unknown' directory to maintain
|
||||
proper architecture and code organization.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All entities must be located in /src/Data/[FeatureName]/Entity directory, where [FeatureName] is a valid feature-specific subdirectory. If the feature name cannot be determined, developers must actively provide a proper feature name rather than defaulting to 'Unknown'. This ensures consistent architectural separation.
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
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'.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/Data/*/Entity/*.php
|
||||
description: This rule ensures consistent entity placement within the
|
||||
feature-based architecture by requiring entities to be stored in a specific
|
||||
directory structure under /src/Data/[FeatureName]/Entity, with proper Doctrine
|
||||
configuration for each directory.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All entities must be located in /src/Data/[FeatureName]/Entity directory, where [FeatureName] is the feature-specific subdirectory. If [FeatureName] is unknown, use "Unknown" as the directory name.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/**/*.php
|
||||
description: Enforce architectural rules for Feature-Based Development including
|
||||
repository interface definition in Logic layer, implementations in Data layer,
|
||||
and proper data flow through Services using DTOs.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Follow feature-based architecture with clear separation between Logic, Data, and Shared layers
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/Data/*/Entity/*.php
|
||||
description: This rule requires that when entities are created and the feature
|
||||
name cannot be determined, instead of defaulting to an 'Unknown' directory,
|
||||
developers must actively select or define a proper feature name to maintain
|
||||
clean architectural separation.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
When creating entities, if [FeatureName] is unknown, prompt the user to provide a feature name rather than automatically using 'Unknown'. This ensures proper categorization of entities within the feature-based architecture.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Logic/**
|
||||
description: This rule ensures that all implementation files belonging to the
|
||||
Logic layer are consistently organized under the /src/Logic directory
|
||||
structure, maintaining clear separation between Logic and other layers.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All files in the Logic layer must be placed within the /src/Logic directory
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
globs: src/Logic/**/Manager/*
|
||||
description: This rule ensures that all manager implementations are correctly
|
||||
placed within the Logic layer according to the feature-based architecture,
|
||||
with proper naming conventions for feature directories. Managers serve as
|
||||
orchestration layers that expose Provider and Processor methods while
|
||||
implementing caching.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All manager implementations must be located in the Logic layer under feature-specific subdirectories: /src/Logic/[FeatureName]/Manager. Feature names must be properly capitalized and follow the PascalCase convention. Managers expose methods from Providers and Processors and implement caching functionality.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Data/**/Mapper/*
|
||||
description: This rule ensures that all mapper implementations are correctly
|
||||
placed within the Data layer according to the feature-based architecture, with
|
||||
proper naming conventions for feature directories.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All mapper implementations must be located in the Data layer under feature-specific subdirectories: /src/Data/[FeatureName]/Mapper. Feature names must be properly capitalized and follow the PascalCase convention.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: "**/*.php"
|
||||
description: Comments should only be used for complex logic, business rules,
|
||||
non-obvious decisions, or explanations of why something is done (not what is
|
||||
done). Code should be readable without comments. Remove all unnecessary
|
||||
comments that don't add value to understanding the code.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Only add comments when they provide essential clarification that the code itself cannot convey. Avoid redundant or obvious comments; let code be self-documenting through clear naming and structure.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/Logic/**/Models/*.php
|
||||
description: This rule ensures consistent architectural separation by placing
|
||||
all model files in their respective feature-specific directories within the
|
||||
Logic layer. It prevents improper placement of models and enforces clear
|
||||
organization based on features.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All model files in the Logic layer must be placed within /src/Logic/[FeatureName]/Models directory, where [FeatureName] is a valid feature-specific subdirectory. If the FeatureName is unknown or ambiguous, developers must actively provide a proper feature name rather than defaulting to 'Unknown'.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/Logic/**/Models/*
|
||||
description: This rule ensures that all model files are correctly placed within
|
||||
the Logic layer according to the feature-based architecture, with proper
|
||||
naming conventions for feature directories and clear separation of business
|
||||
logic models.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All model files in the Logic layer must be placed within /src/Logic/[FeatureName]/Models directory, where [FeatureName] is a valid feature-specific subdirectory. If the FeatureName is unknown or ambiguous, developers must actively provide a proper feature name rather than defaulting to 'Unknown'.
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
globs: "**/*.php"
|
||||
description: In PHP files, omit the closing ?> tag to prevent issues with
|
||||
whitespace and ensure consistent file handling
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Do not include the closing PHP tag (?>) at the end of PHP files
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Logic/**/Processor/*
|
||||
description: This rule ensures that all processor interface definitions are
|
||||
correctly placed within the Logic layer according to the feature-based
|
||||
architecture, with proper naming conventions for feature directories.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All processor interfaces must be located in the Logic layer under feature-specific subdirectories: /src/Logic/[FeatureName]/Processor. Feature names must be properly capitalized and follow the PascalCase convention.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Data/**/Processor/*
|
||||
description: This rule ensures that all processor implementations are correctly
|
||||
placed within the Data layer according to the feature-based architecture, with
|
||||
proper naming conventions for feature directories.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All processor implementations must be located in the Data layer under feature-specific subdirectories: /src/Data/[FeatureName]/Processor. Feature names must be properly capitalized and follow the PascalCase convention.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Data/**/*{Provider,Processor}.php
|
||||
description: Ensure that data providers and processors in the Data layer depend
|
||||
exclusively on models defined in the Logic layer's Models directory,
|
||||
maintaining proper architectural separation between layers
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Providers and Processors in the Data layer must only use models from the Logic layer's Models directory
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Logic/**/Provider/*
|
||||
description: This rule ensures that all provider interface definitions are
|
||||
correctly placed within the Logic layer according to the feature-based
|
||||
architecture, with proper naming conventions for feature directories.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All provider interfaces must be located in the Logic layer under feature-specific subdirectories: /src/Logic/[FeatureName]/Provider. Feature names must be properly capitalized and follow the PascalCase convention.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Data/**/Provider/*
|
||||
description: This rule ensures that all provider implementations are correctly
|
||||
placed within the Data layer according to the feature-based architecture, with
|
||||
proper naming conventions for feature directories.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All provider implementations must be located in the Data layer under feature-specific subdirectories: /src/Data/[FeatureName]/Provider. Feature names must be properly capitalized and follow the PascalCase convention.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
description: This rule describes the architectural relationships between
|
||||
components in your Symfony application, clarifying how Providers and
|
||||
Processors interact with data sources and how they relate to repository
|
||||
patterns and integration APIs.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Providers deliver data to the Logic layer. Processors write data. The Logic layer defines requirements through interfaces. Providers and Processors can utilize repositories or integration APIs for data access.
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
globs: src/Features/*/Data/Repository/*.php
|
||||
description: The Data layer handles concrete storage mechanisms while keeping
|
||||
business logic unaware of these details.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Repository implementations must be located in the Data layer, using entities for persistence.
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
globs: src/Features/*/Logic/Repository/*.php
|
||||
description: Ensures that business logic is decoupled from data access
|
||||
implementation details, promoting flexibility and testability.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Repository interfaces must be defined in the Logic layer, not in the Data layer.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Data/**/Repository/*
|
||||
description: This rule ensures that all repository implementations are correctly
|
||||
placed within the Data layer according to the feature-based architecture, with
|
||||
proper naming conventions for feature directories.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All repository implementations must be located in the Data layer under feature-specific subdirectories: /src/Data/[FeatureName]/Repository. Feature names must be properly capitalized and follow the PascalCase convention.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/Data/*/Repository/*.php
|
||||
description: Enforce consistent placement of repository implementations within
|
||||
feature-specific directories in the Data layer, ensuring proper organization
|
||||
by feature name.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All repository implementations must be located in the Data layer under feature-specific subdirectories: /src/Data/[FeatureName]/Repository. Feature names must be properly capitalized and follow the PascalCase convention.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: "**/Repository/*.php,**/Data/**/*Repository*.php,**/Logic/**/*Repository*.php"
|
||||
description: Enforce clear separation between Logic, Data, and Shared layers by
|
||||
ensuring proper placement of repositories according to domain-driven design
|
||||
principles.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All repository implementations must be located in the Data layer and use entities for persistence. Repository interfaces must be defined in the Logic layer, not in the Data layer. Services in the Logic layer must depend on repository interfaces defined in their respective Logic folder.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/UI/**/*.php
|
||||
description: Defines best practices for handling HTTP requests in Symfony 7.
|
||||
Ensures strict separation of concerns by transforming raw request data into
|
||||
immutable DTOs at the boundary of the UI layer, preventing leakage of
|
||||
infrastructure details into business logic.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
The Request object must only be used in the UI layer (Controllers). Immediately convert request data into DTOs located in /src/Logic/[FeatureName]/DTO before passing them to UseCases. Use $request->getPayload() for JSON APIs, $request->query/request for forms, and $request->attributes for route parameters. Never pass the Request object to Logic or Data layers.
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
globs: src/Features/*/Logic/Service/*.php
|
||||
description: This enforces dependency inversion, allowing for easy mocking and
|
||||
testing without touching actual data sources.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Services in the Logic layer must depend on repository interfaces defined in their respective Logic folder.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
globs: src/Shared/**/*.php
|
||||
description: Reduces duplication and promotes consistency throughout the application.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Common components like DTOs, Interfaces, Helpers, and Exceptions are placed in the Shared layer for reuse across features.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/Shared/**
|
||||
description: This rule ensures that all cross-cutting implementation files
|
||||
belonging to the Shared layer are consistently organized under the /src/Shared
|
||||
directory structure, maintaining clear separation between shared components
|
||||
and feature-specific layers.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All files in the Shared layer must be placed within the /src/Shared directory
|
||||
@@ -0,0 +1,8 @@
|
||||
k---
|
||||
globs: "**/UI/**/*Controller*.php"
|
||||
description: Ensures compliance with Symfony 7.4 deprecations and enforces
|
||||
strict separation of concerns by isolating Request handling to the UI layer.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
In Symfony 7.4+, never use the deprecated `Request::get()` method. Instead, use `$request->attributes` for route parameters, `$request->query` for query parameters, and `$request->getPayload()` for body data (JSON/Forms). Immediately convert request data into DTOs in Controllers. Never pass the Request object to Logic or Data layers.
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
globs: "**/UI/**/*.php, **/Logic/**/DTO/*.php"
|
||||
description: Defines the standard for input validation in Symfony 7 projects.
|
||||
Logic layer DTOs hold the validation rules via attributes. The UI layer is
|
||||
responsible for executing the validation using the injected validator service,
|
||||
ensuring clean separation of concerns and preventing invalid data from
|
||||
entering the business logic.
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
All input validation must be performed on DTOs located in /src/Logic/[FeatureName]/DTO using PHP 8 #[Assert\...] attributes. Controllers in the UI layer (/src/UI/...) must inject Symfony\Component\Validator\Validator\ValidatorInterface, validate the DTO before passing it to UseCases, and handle validation errors immediately.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: src/UI/**
|
||||
description: This rule ensures that all implementation files belonging to the UI
|
||||
layer are consistently organized under the /src/UI directory structure,
|
||||
maintaining clear separation between UI and other layers.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All files in the UI layer must be placed within the /src/UI directory
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: "**/*.php"
|
||||
description: Diese Regel stellt sicher, dass die UI-Schicht klar in Frontend,
|
||||
API und CLI unterteilt ist, was die Wartbarkeit und Skalierbarkeit des
|
||||
Projekts verbessert.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Alle Dateien in der UI-Schicht müssen in feature-spezifische Unterverzeichnisse unter /src/UI platziert werden: /src/UI/Frontend, /src/UI/Api oder /src/UI/CLI.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/UI/**/*
|
||||
description: Ensures proper separation of concerns in the UI layer by organizing
|
||||
controllers and related components into feature-specific subdirectories for
|
||||
Frontend (web UI), Api (REST/GraphQL endpoints), and CLI (command-line
|
||||
interface). This promotes clear architectural boundaries and maintainability.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
The UI layer must be divided into three subdirectories: Frontend, Api, and CLI under /src/UI. Controllers and related UI components must be organized into these respective subdirectories based on their purpose: Frontend for web UI controllers, Api for REST/GraphQL endpoints, and CLI for command-line interface commands.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: "**/*.php"
|
||||
description: Ensure all new code uses modern PHP attribute syntax rather than
|
||||
legacy annotation syntax for better type safety and code clarity. This applies
|
||||
to routing, validation, security, and other Symfony components that support
|
||||
attributes.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Always use PHP attributes instead of annotations for routing and other Symfony features in PHP 8+ projects
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
globs: "**/UI/**/*Controller*.php"
|
||||
description: Improves code readability and maintainability by using
|
||||
self-documenting constants instead of magic numbers for HTTP status codes.
|
||||
Applies to all controllers in the UI layer and any response handling.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
Always use Symfony Response HTTP status constants (e.g., Response::HTTP_OK, Response::HTTP_CREATED, Response::HTTP_NOT_FOUND) instead of magic numbers (e.g., 200, 201, 404) when setting HTTP status codes in controllers and responses.
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
globs: src/Logic/**/UseCase/*.php, src/Logic/**/DTO/*.php
|
||||
description: Enforces the use of DTOs for UseCase entry points to maintain clean
|
||||
architecture, immutability, and type safety.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
UseCase methods must accept DTOs (Data Transfer Objects) for input parameters instead of raw arrays or Request objects. DTOs must be located in the /src/Logic/[FeatureName]/DTO directory and should be immutable (readonly properties). This ensures decoupling between the Logic and UI layers. Simple primitive inputs (like a single ID) may be passed directly, but complex data structures require DTOs.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/Logic/**/UseCase/*
|
||||
description: This rule ensures that all use case implementations are correctly
|
||||
placed within the Logic layer according to the feature-based architecture,
|
||||
with proper naming conventions for feature directories. Use cases represent
|
||||
specific business logic operations.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
All use case implementations must be located in the Logic layer under feature-specific subdirectories: /src/Logic/[FeatureName]/UseCase. Feature names must be properly capitalized and follow the PascalCase convention.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/Logic/**/*Controller.php, src/Logic/**/Manager/*.php
|
||||
description: Workflows werden verwendet, wenn eine Controller-Aktion oder ein
|
||||
Manager mehrere UseCases koordinieren muss. Dies sorgt für saubere Trennung
|
||||
von Concerns, Wiederverwendbarkeit einzelner UseCases und bessere Testbarkeit.
|
||||
Der Workflow definiert die Reihenfolge und Abhängigkeiten zwischen UseCases.
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
Wenn mehrere UseCases kombiniert oder in einer bestimmten Reihenfolge ausgeführt werden müssen, ist ein Workflow zu verwenden. Workflows orchestrieren die Ausführung mehrerer UseCases und kapseln komplexe Geschäftsprozesse. Sie gehören in /src/Logic/[FeatureName]/Workflow und werden vom Manager aufgerufen, nicht direkt vom Controller.
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
# Symfony 7.4+ .gitignore
|
||||
|
||||
# Cache and logs
|
||||
/var/cache/
|
||||
/var/log/
|
||||
/var/sessions/
|
||||
|
||||
# Runtime data
|
||||
/var/data/
|
||||
/var/tmp/
|
||||
|
||||
# Dependencies
|
||||
/vendor/
|
||||
composer.lock
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
.phpstorm.meta.php
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Local configuration
|
||||
/config/packages/local/
|
||||
/config/routes/local/
|
||||
/config/services_local.yaml
|
||||
|
||||
# Environment variables
|
||||
.env.local
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Symfony Profiler
|
||||
/var/cache/profiler/
|
||||
|
||||
# Web assets
|
||||
/public/build/
|
||||
/public/assets/
|
||||
|
||||
# PHPStan and other tools
|
||||
/phpstan.neon
|
||||
/phpunit.xml
|
||||
/phpunit.xml.dist
|
||||
/psalm.xml
|
||||
/psalm.xml.dist
|
||||
/symfony.lock
|
||||
|
||||
# Symfony binary
|
||||
/bin/symfony
|
||||
|
||||
# Local test databases
|
||||
/test_db.sql
|
||||
|
||||
# Backup files
|
||||
*.backup
|
||||
*.bak
|
||||
|
||||
# Node.js
|
||||
/node_modules/
|
||||
npm-debug.log
|
||||
yarn-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# IDE specific
|
||||
*.swp
|
||||
*.swo
|
||||
*.swn
|
||||
*~
|
||||
|
||||
# Composer
|
||||
composer.phar
|
||||
composer.phar.md5sum
|
||||
|
||||
# SensioDistribution
|
||||
/SensioDistribution/Installer/
|
||||
|
||||
# Symfony
|
||||
/web/app_dev.php
|
||||
/web/config.php
|
||||
|
||||
# Symfony cache
|
||||
/var/cache/*
|
||||
!/var/cache/.gitkeep
|
||||
|
||||
# Symfony logs
|
||||
/var/log/*
|
||||
!/var/log/.gitkeep
|
||||
|
||||
# Symfony sessions
|
||||
/var/sessions/*
|
||||
!/var/sessions/.gitkeep
|
||||
|
||||
# Symfony data
|
||||
/var/data/*
|
||||
!/var/data/.gitkeep
|
||||
|
||||
# Symfony tmp
|
||||
/var/tmp/*
|
||||
!/var/tmp/.gitkeep
|
||||
|
||||
# Symfony profiler
|
||||
/var/cache/profiler/*
|
||||
!/var/cache/profiler/.gitkeep
|
||||
|
||||
# Symfony assets
|
||||
/public/assets/*
|
||||
!/public/assets/.gitkeep
|
||||
|
||||
# Symfony build
|
||||
/public/build/*
|
||||
!/public/build/.gitkeep
|
||||
|
||||
# Docker
|
||||
.docker/
|
||||
.Dockerfile
|
||||
.dockerignore
|
||||
|
||||
# Local development
|
||||
.local/
|
||||
|
||||
# Temporary files
|
||||
*.tmp
|
||||
*.temp
|
||||
|
||||
# PHPUnit
|
||||
/phpunit.xml
|
||||
/phpunit.xml.dist
|
||||
/phpunit_coverage.xml
|
||||
|
||||
# Symfony binary
|
||||
/bin/symfony
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
|
||||
if (!is_dir(dirname(__DIR__).'/vendor')) {
|
||||
throw new LogicException('Dependencies are missing. Try running "composer install".');
|
||||
}
|
||||
|
||||
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
|
||||
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
|
||||
}
|
||||
|
||||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||
|
||||
return function (array $context) {
|
||||
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||
|
||||
return new Application($kernel);
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"type": "project",
|
||||
"license": "proprietary",
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.4",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"symfony/console": "8.1.*",
|
||||
"symfony/dotenv": "8.1.*",
|
||||
"symfony/flex": "^2",
|
||||
"symfony/framework-bundle": "8.1.*",
|
||||
"symfony/runtime": "8.1.*",
|
||||
"symfony/yaml": "8.1.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/maker-bundle": "^1.67"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"php-http/discovery": true,
|
||||
"symfony/flex": true,
|
||||
"symfony/runtime": true
|
||||
},
|
||||
"bump-after-update": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"App\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-ctype": "*",
|
||||
"symfony/polyfill-iconv": "*",
|
||||
"symfony/polyfill-php72": "*",
|
||||
"symfony/polyfill-php73": "*",
|
||||
"symfony/polyfill-php74": "*",
|
||||
"symfony/polyfill-php80": "*",
|
||||
"symfony/polyfill-php81": "*",
|
||||
"symfony/polyfill-php82": "*",
|
||||
"symfony/polyfill-php83": "*",
|
||||
"symfony/polyfill-php84": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"auto-scripts": {
|
||||
"cache:clear": "symfony-cmd",
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
||||
},
|
||||
"post-install-cmd": [
|
||||
"@auto-scripts"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"@auto-scripts"
|
||||
]
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/symfony": "*"
|
||||
},
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"require": "8.1.*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||
];
|
||||
@@ -0,0 +1,19 @@
|
||||
framework:
|
||||
cache:
|
||||
# Unique name of your app: used to compute stable namespaces for cache keys.
|
||||
#prefix_seed: your_vendor_name/app_name
|
||||
|
||||
# The "app" cache stores to the filesystem by default.
|
||||
# The data in this cache should persist between deploys.
|
||||
# Other options include:
|
||||
|
||||
# Redis
|
||||
#app: cache.adapter.redis
|
||||
#default_redis_provider: redis://localhost
|
||||
|
||||
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
|
||||
#app: cache.adapter.apcu
|
||||
|
||||
# Namespaced pools use the above "app" backend by default
|
||||
#pools:
|
||||
#my.dedicated.cache: null
|
||||
@@ -0,0 +1,15 @@
|
||||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
|
||||
# Note that the session will be started ONLY if you read or write from it.
|
||||
session: true
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
test: true
|
||||
session:
|
||||
storage_factory_id: session.storage.factory.mock_file
|
||||
@@ -0,0 +1,10 @@
|
||||
framework:
|
||||
router:
|
||||
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
||||
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
||||
default_uri: '%env(DEFAULT_URI)%'
|
||||
|
||||
when@prod:
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: null
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
|
||||
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
|
||||
}
|
||||
@@ -0,0 +1,832 @@
|
||||
<?php
|
||||
|
||||
// This file is auto-generated and is for apps only. Bundles SHOULD NOT rely on its content.
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
|
||||
|
||||
use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
|
||||
/**
|
||||
* This class provides array-shapes for configuring the services and bundles of an application.
|
||||
*
|
||||
* Services declared with the config() method below are autowired and autoconfigured by default.
|
||||
*
|
||||
* This is for apps only. Bundles SHOULD NOT use it.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```php
|
||||
* // config/services.php
|
||||
* namespace Symfony\Component\DependencyInjection\Loader\Configurator;
|
||||
*
|
||||
* return App::config([
|
||||
* 'services' => [
|
||||
* 'App\\' => [
|
||||
* 'resource' => '../src/',
|
||||
* ],
|
||||
* ],
|
||||
* ]);
|
||||
* ```
|
||||
*
|
||||
* @psalm-type ImportsConfig = list<string|array{
|
||||
* resource: string,
|
||||
* type?: string|null,
|
||||
* ignore_errors?: bool,
|
||||
* }>
|
||||
* @psalm-type ParametersConfig = array<string, scalar|\UnitEnum|array<scalar|\UnitEnum|array<mixed>|Param|null>|Param|null>
|
||||
* @psalm-type ArgumentsType = list<mixed>|array<string, mixed>
|
||||
* @psalm-type CallType = array<string, ArgumentsType>|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool}
|
||||
* @psalm-type TagsType = list<string|array<string, array<string, mixed>>> // arrays inside the list must have only one element, with the tag name as the key
|
||||
* @psalm-type CallbackType = string|array{0:string|ReferenceConfigurator,1:string}|\Closure|ReferenceConfigurator
|
||||
* @psalm-type DeprecationType = array{package: string, version: string, message?: string}
|
||||
* @psalm-type DefaultsType = array{
|
||||
* public?: bool,
|
||||
* tags?: TagsType,
|
||||
* resource_tags?: TagsType,
|
||||
* autowire?: bool,
|
||||
* autoconfigure?: bool,
|
||||
* bind?: array<string, mixed>,
|
||||
* }
|
||||
* @psalm-type InstanceofType = array{
|
||||
* shared?: bool,
|
||||
* lazy?: bool|string,
|
||||
* public?: bool,
|
||||
* properties?: array<string, mixed>,
|
||||
* configurator?: CallbackType,
|
||||
* calls?: list<CallType>,
|
||||
* tags?: TagsType,
|
||||
* resource_tags?: TagsType,
|
||||
* autowire?: bool,
|
||||
* bind?: array<string, mixed>,
|
||||
* constructor?: string,
|
||||
* }
|
||||
* @psalm-type DefinitionType = array{
|
||||
* class?: string,
|
||||
* file?: string,
|
||||
* parent?: string,
|
||||
* shared?: bool,
|
||||
* synthetic?: bool,
|
||||
* lazy?: bool|string,
|
||||
* public?: bool,
|
||||
* abstract?: bool,
|
||||
* deprecated?: DeprecationType,
|
||||
* factory?: CallbackType,
|
||||
* configurator?: CallbackType,
|
||||
* arguments?: ArgumentsType,
|
||||
* properties?: array<string, mixed>,
|
||||
* calls?: list<CallType>,
|
||||
* tags?: TagsType,
|
||||
* resource_tags?: TagsType,
|
||||
* decorates?: string,
|
||||
* decorates_tag?: string,
|
||||
* decoration_inner_name?: string,
|
||||
* decoration_priority?: int,
|
||||
* decoration_on_invalid?: 'exception'|'ignore'|null,
|
||||
* autowire?: bool,
|
||||
* autoconfigure?: bool,
|
||||
* bind?: array<string, mixed>,
|
||||
* constructor?: string,
|
||||
* from_callable?: CallbackType,
|
||||
* }
|
||||
* @psalm-type AliasType = string|array{
|
||||
* alias: string,
|
||||
* public?: bool,
|
||||
* deprecated?: DeprecationType,
|
||||
* }
|
||||
* @psalm-type PrototypeType = array{
|
||||
* resource: string,
|
||||
* namespace?: string,
|
||||
* exclude?: string|list<string>,
|
||||
* parent?: string,
|
||||
* shared?: bool,
|
||||
* lazy?: bool|string,
|
||||
* public?: bool,
|
||||
* abstract?: bool,
|
||||
* deprecated?: DeprecationType,
|
||||
* factory?: CallbackType,
|
||||
* arguments?: ArgumentsType,
|
||||
* properties?: array<string, mixed>,
|
||||
* configurator?: CallbackType,
|
||||
* calls?: list<CallType>,
|
||||
* tags?: TagsType,
|
||||
* resource_tags?: TagsType,
|
||||
* autowire?: bool,
|
||||
* autoconfigure?: bool,
|
||||
* bind?: array<string, mixed>,
|
||||
* constructor?: string,
|
||||
* }
|
||||
* @psalm-type StackType = array{
|
||||
* stack: list<DefinitionType|AliasType|PrototypeType|array<class-string, ArgumentsType|null>>,
|
||||
* public?: bool,
|
||||
* deprecated?: DeprecationType,
|
||||
* decorates?: string,
|
||||
* decorates_tag?: string,
|
||||
* decoration_inner_name?: string,
|
||||
* decoration_priority?: int,
|
||||
* decoration_on_invalid?: 'exception'|'ignore'|null,
|
||||
* }
|
||||
* @psalm-type ServicesConfig = array{
|
||||
* _defaults?: DefaultsType,
|
||||
* _instanceof?: InstanceofType,
|
||||
* ...<string, DefinitionType|AliasType|PrototypeType|StackType|ArgumentsType|null>
|
||||
* }
|
||||
* @psalm-type ExtensionType = array<string, mixed>
|
||||
* @psalm-type FrameworkConfig = array{
|
||||
* secret?: scalar|Param|null,
|
||||
* http_method_override?: bool|Param, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false
|
||||
* allowed_http_method_override?: null|list<string|Param>,
|
||||
* trust_x_sendfile_type_header?: scalar|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%"
|
||||
* ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%"
|
||||
* test?: bool|Param,
|
||||
* default_locale?: scalar|Param|null, // Default: "en"
|
||||
* set_locale_from_accept_language?: bool|Param, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false
|
||||
* set_content_language_from_locale?: bool|Param, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false
|
||||
* enabled_locales?: list<scalar|Param|null>,
|
||||
* trusted_hosts?: string|list<scalar|Param|null>,
|
||||
* trusted_proxies?: mixed, // Default: ["%env(default::SYMFONY_TRUSTED_PROXIES)%"]
|
||||
* trusted_headers?: string|list<scalar|Param|null>,
|
||||
* error_controller?: scalar|Param|null, // Default: "error_controller"
|
||||
* handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true
|
||||
* csrf_protection?: bool|array{
|
||||
* enabled?: scalar|Param|null, // Default: null
|
||||
* stateless_token_ids?: list<scalar|Param|null>,
|
||||
* check_header?: scalar|Param|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false
|
||||
* cookie_name?: scalar|Param|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token"
|
||||
* },
|
||||
* form?: bool|array{ // Form configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* csrf_protection?: bool|array{
|
||||
* enabled?: scalar|Param|null, // Default: null
|
||||
* token_id?: scalar|Param|null, // Default: null
|
||||
* field_name?: scalar|Param|null, // Default: "_token"
|
||||
* field_attr?: array<string, scalar|Param|null>,
|
||||
* },
|
||||
* },
|
||||
* http_cache?: bool|array{ // HTTP cache configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* debug?: bool|Param, // Default: "%kernel.debug%"
|
||||
* trace_level?: "none"|"short"|"full"|Param,
|
||||
* trace_header?: scalar|Param|null,
|
||||
* default_ttl?: int|Param,
|
||||
* private_headers?: list<scalar|Param|null>,
|
||||
* skip_response_headers?: list<scalar|Param|null>,
|
||||
* allow_reload?: bool|Param,
|
||||
* allow_revalidate?: bool|Param,
|
||||
* stale_while_revalidate?: int|Param,
|
||||
* stale_if_error?: int|Param,
|
||||
* terminate_on_cache_hit?: bool|Param, // Deprecated: Setting the "framework.http_cache.terminate_on_cache_hit.terminate_on_cache_hit" configuration option is deprecated. It will be removed in version 9.0.
|
||||
* },
|
||||
* esi?: bool|array{ // ESI configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* },
|
||||
* ssi?: bool|array{ // SSI configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* },
|
||||
* fragments?: bool|array{ // Fragments configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* hinclude_default_template?: scalar|Param|null, // Default: null
|
||||
* path?: scalar|Param|null, // Default: "/_fragment"
|
||||
* },
|
||||
* profiler?: bool|array{ // Profiler configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* collect?: bool|Param, // Default: true
|
||||
* collect_parameter?: scalar|Param|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null
|
||||
* only_exceptions?: bool|Param, // Default: false
|
||||
* only_main_requests?: bool|Param, // Default: false
|
||||
* dsn?: scalar|Param|null, // Default: "file:%kernel.cache_dir%/profiler"
|
||||
* collect_serializer_data?: true|Param, // Deprecated: Setting the "framework.profiler.collect_serializer_data.collect_serializer_data" configuration option is deprecated. It will be removed in version 9.0. // Default: true
|
||||
* },
|
||||
* workflows?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* workflows?: array<string, array{ // Default: []
|
||||
* audit_trail?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* },
|
||||
* type?: "workflow"|"state_machine"|Param, // Default: "state_machine"
|
||||
* marking_store?: array{
|
||||
* type?: "method"|Param,
|
||||
* property?: scalar|Param|null,
|
||||
* service?: scalar|Param|null,
|
||||
* },
|
||||
* supports?: string|list<scalar|Param|null>,
|
||||
* definition_validators?: list<scalar|Param|null>,
|
||||
* support_strategy?: scalar|Param|null,
|
||||
* initial_marking?: \BackedEnum|string|list<scalar|Param|null>,
|
||||
* events_to_dispatch?: null|list<string|Param>,
|
||||
* places?: string|list<array{ // Default: []
|
||||
* name?: scalar|Param|null,
|
||||
* metadata?: array<string, mixed>,
|
||||
* }>,
|
||||
* transitions?: list<array{ // Default: []
|
||||
* name?: string|Param,
|
||||
* guard?: string|Param, // An expression to block the transition.
|
||||
* from?: \BackedEnum|string|list<array{ // Default: []
|
||||
* place?: string|Param,
|
||||
* weight?: int|Param, // Default: 1
|
||||
* }>,
|
||||
* to?: \BackedEnum|string|list<array{ // Default: []
|
||||
* place?: string|Param,
|
||||
* weight?: int|Param, // Default: 1
|
||||
* }>,
|
||||
* weight?: int|Param, // Default: 1
|
||||
* metadata?: array<string, mixed>,
|
||||
* }>,
|
||||
* metadata?: array<string, mixed>,
|
||||
* }>,
|
||||
* },
|
||||
* router?: bool|array{ // Router configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* resource?: scalar|Param|null,
|
||||
* type?: scalar|Param|null,
|
||||
* default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null
|
||||
* http_port?: scalar|Param|null, // Default: 80
|
||||
* https_port?: scalar|Param|null, // Default: 443
|
||||
* strict_requirements?: scalar|Param|null, // set to true to throw an exception when a parameter does not match the requirements set to false to disable exceptions when a parameter does not match the requirements (and return null instead) set to null to disable parameter checks against requirements 'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production // Default: true
|
||||
* utf8?: bool|Param, // Default: true
|
||||
* },
|
||||
* session?: bool|array{ // Session configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* storage_factory_id?: scalar|Param|null, // Default: "session.storage.factory.native"
|
||||
* handler_id?: scalar|Param|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null.
|
||||
* name?: scalar|Param|null,
|
||||
* cookie_lifetime?: scalar|Param|null,
|
||||
* cookie_path?: scalar|Param|null,
|
||||
* cookie_domain?: scalar|Param|null,
|
||||
* cookie_secure?: true|false|"auto"|Param, // Default: "auto"
|
||||
* cookie_httponly?: bool|Param, // Default: true
|
||||
* cookie_samesite?: null|"lax"|"strict"|"none"|Param, // Default: "lax"
|
||||
* use_cookies?: bool|Param,
|
||||
* gc_divisor?: scalar|Param|null,
|
||||
* gc_probability?: scalar|Param|null,
|
||||
* gc_maxlifetime?: scalar|Param|null,
|
||||
* save_path?: scalar|Param|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null.
|
||||
* metadata_update_threshold?: int|Param, // Seconds to wait between 2 session metadata updates. // Default: 0
|
||||
* },
|
||||
* request?: bool|array{ // Request configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* formats?: array<string, string|list<scalar|Param|null>>,
|
||||
* },
|
||||
* assets?: bool|array{ // Assets configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false
|
||||
* version_strategy?: scalar|Param|null, // Default: null
|
||||
* version?: scalar|Param|null, // Default: null
|
||||
* version_format?: scalar|Param|null, // Default: "%%s?%%s"
|
||||
* json_manifest_path?: scalar|Param|null, // Default: null
|
||||
* base_path?: scalar|Param|null, // Default: ""
|
||||
* base_urls?: string|list<scalar|Param|null>,
|
||||
* packages?: array<string, array{ // Default: []
|
||||
* strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false
|
||||
* version_strategy?: scalar|Param|null, // Default: null
|
||||
* version?: scalar|Param|null,
|
||||
* version_format?: scalar|Param|null, // Default: null
|
||||
* json_manifest_path?: scalar|Param|null, // Default: null
|
||||
* base_path?: scalar|Param|null, // Default: ""
|
||||
* base_urls?: string|list<scalar|Param|null>,
|
||||
* }>,
|
||||
* },
|
||||
* asset_mapper?: bool|array{ // Asset Mapper configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* paths?: string|array<string, scalar|Param|null>,
|
||||
* excluded_patterns?: list<scalar|Param|null>,
|
||||
* exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true
|
||||
* server?: bool|Param, // If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). // Default: true
|
||||
* public_prefix?: scalar|Param|null, // The public path where the assets will be written to (and served from when "server" is true). // Default: "/assets/"
|
||||
* missing_import_mode?: "strict"|"warn"|"ignore"|Param, // Behavior if an asset cannot be found when imported from JavaScript or CSS files - e.g. "import './non-existent.js'". "strict" means an exception is thrown, "warn" means a warning is logged, "ignore" means the import is left as-is. // Default: "warn"
|
||||
* extensions?: array<string, scalar|Param|null>,
|
||||
* importmap_path?: scalar|Param|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php"
|
||||
* importmap_polyfill?: scalar|Param|null, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims"
|
||||
* importmap_script_attributes?: array<string, scalar|Param|null>,
|
||||
* vendor_dir?: scalar|Param|null, // The directory to store JavaScript vendors. // Default: "%kernel.project_dir%/assets/vendor"
|
||||
* precompress?: bool|array{ // Precompress assets with Brotli, Zstandard and gzip.
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* formats?: list<scalar|Param|null>,
|
||||
* extensions?: list<scalar|Param|null>,
|
||||
* },
|
||||
* },
|
||||
* translator?: bool|array{ // Translator configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* fallbacks?: string|list<scalar|Param|null>,
|
||||
* logging?: bool|Param, // Default: false
|
||||
* formatter?: scalar|Param|null, // Default: "translator.formatter.default"
|
||||
* cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations"
|
||||
* default_path?: scalar|Param|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations"
|
||||
* paths?: list<scalar|Param|null>,
|
||||
* pseudo_localization?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* accents?: bool|Param, // Default: true
|
||||
* expansion_factor?: float|Param, // Default: 1.0
|
||||
* brackets?: bool|Param, // Default: true
|
||||
* parse_html?: bool|Param, // Default: false
|
||||
* localizable_html_attributes?: list<scalar|Param|null>,
|
||||
* },
|
||||
* providers?: array<string, array{ // Default: []
|
||||
* dsn?: scalar|Param|null,
|
||||
* domains?: list<scalar|Param|null>,
|
||||
* locales?: list<scalar|Param|null>,
|
||||
* }>,
|
||||
* globals?: array<string, string|array{ // Default: []
|
||||
* value?: mixed,
|
||||
* message?: string|Param,
|
||||
* parameters?: array<string, scalar|Param|null>,
|
||||
* domain?: string|Param,
|
||||
* }>,
|
||||
* },
|
||||
* validation?: bool|array{ // Validation configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* enable_attributes?: bool|Param, // Default: true
|
||||
* static_method?: string|list<scalar|Param|null>,
|
||||
* translation_domain?: scalar|Param|null, // Default: "validators"
|
||||
* email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|Param, // Default: "html5"
|
||||
* mapping?: array{
|
||||
* paths?: list<scalar|Param|null>,
|
||||
* },
|
||||
* not_compromised_password?: bool|array{
|
||||
* enabled?: bool|Param, // When disabled, compromised passwords will be accepted as valid. // Default: true
|
||||
* endpoint?: scalar|Param|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null
|
||||
* },
|
||||
* disable_translation?: bool|Param, // Default: false
|
||||
* property_metadata_existence_check?: bool|Param, // When enabled, validateProperty() and validatePropertyValue() throw an exception if no metadata is found for the given property. // Default: false
|
||||
* auto_mapping?: array<string, array{ // Default: []
|
||||
* services?: list<scalar|Param|null>,
|
||||
* }>,
|
||||
* },
|
||||
* serializer?: bool|array{ // Serializer configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* enable_attributes?: bool|Param, // Default: true
|
||||
* name_converter?: scalar|Param|null,
|
||||
* circular_reference_handler?: scalar|Param|null,
|
||||
* max_depth_handler?: scalar|Param|null,
|
||||
* mapping?: array{
|
||||
* paths?: list<scalar|Param|null>,
|
||||
* },
|
||||
* default_context?: array<string, mixed>,
|
||||
* named_serializers?: array<string, array{ // Default: []
|
||||
* name_converter?: scalar|Param|null,
|
||||
* default_context?: array<string, mixed>,
|
||||
* include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true
|
||||
* include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true
|
||||
* }>,
|
||||
* },
|
||||
* property_access?: bool|array{ // Property access configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* magic_call?: bool|Param, // Default: false
|
||||
* magic_get?: bool|Param, // Default: true
|
||||
* magic_set?: bool|Param, // Default: true
|
||||
* throw_exception_on_invalid_index?: bool|Param, // Default: false
|
||||
* throw_exception_on_invalid_property_path?: bool|Param, // Default: true
|
||||
* },
|
||||
* type_info?: bool|array{ // Type info configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* aliases?: array<string, scalar|Param|null>,
|
||||
* },
|
||||
* property_info?: bool|array{ // Property info configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* with_constructor_extractor?: bool|Param, // Registers the constructor extractor. // Default: true
|
||||
* },
|
||||
* cache?: array{ // Cache configuration
|
||||
* prefix_seed?: scalar|Param|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%"
|
||||
* app?: scalar|Param|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem"
|
||||
* system?: scalar|Param|null, // System related cache pools configuration. // Default: "cache.adapter.system"
|
||||
* directory?: scalar|Param|null, // Default: "%kernel.share_dir%/pools/app"
|
||||
* default_psr6_provider?: scalar|Param|null,
|
||||
* default_redis_provider?: scalar|Param|null, // Default: "redis://localhost"
|
||||
* default_valkey_provider?: scalar|Param|null, // Default: "valkey://localhost"
|
||||
* default_memcached_provider?: scalar|Param|null, // Default: "memcached://localhost"
|
||||
* default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection"
|
||||
* default_pdo_provider?: scalar|Param|null, // Default: null
|
||||
* pools?: array<string, array{ // Default: []
|
||||
* adapters?: string|list<scalar|Param|null>,
|
||||
* tags?: scalar|Param|null, // Default: null
|
||||
* public?: bool|Param, // Default: false
|
||||
* default_lifetime?: scalar|Param|null, // Default lifetime of the pool.
|
||||
* provider?: scalar|Param|null, // Overwrite the setting from the default provider for this adapter.
|
||||
* early_expiration_message_bus?: scalar|Param|null,
|
||||
* clearer?: scalar|Param|null,
|
||||
* marshaller?: scalar|Param|null, // The marshaller service to use for this pool.
|
||||
* }>,
|
||||
* },
|
||||
* php_errors?: array{ // PHP errors handling configuration
|
||||
* log?: mixed, // Use the application logger instead of the PHP logger for logging PHP errors. // Default: true
|
||||
* throw?: bool|Param, // Throw PHP errors as \ErrorException instances. // Default: true
|
||||
* },
|
||||
* exceptions?: array<string, array{ // Default: []
|
||||
* log_level?: scalar|Param|null, // The level of log message. Null to let Symfony decide. // Default: null
|
||||
* status_code?: scalar|Param|null, // The status code of the response. Null or 0 to let Symfony decide. // Default: null
|
||||
* log_channel?: scalar|Param|null, // The channel of log message. Null to let Symfony decide. // Default: null
|
||||
* }>,
|
||||
* web_link?: bool|array{ // Web links configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* },
|
||||
* lock?: bool|string|array{ // Lock configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* resources?: string|array<string, string|list<scalar|Param|null>>,
|
||||
* },
|
||||
* semaphore?: bool|string|array{ // Semaphore configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* resources?: string|array<string, scalar|Param|null>,
|
||||
* },
|
||||
* messenger?: bool|array{ // Messenger configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* routing?: array<string, string|list<scalar|Param|null>>,
|
||||
* serializer?: array{
|
||||
* default_serializer?: scalar|Param|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer"
|
||||
* symfony_serializer?: array{
|
||||
* format?: scalar|Param|null, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json"
|
||||
* context?: array<string, mixed>,
|
||||
* },
|
||||
* },
|
||||
* transports?: array<string, string|array{ // Default: []
|
||||
* dsn?: scalar|Param|null,
|
||||
* serializer?: scalar|Param|null, // Service id of a custom serializer to use. // Default: null
|
||||
* options?: array<string, mixed>,
|
||||
* failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null
|
||||
* retry_strategy?: string|array{
|
||||
* service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null
|
||||
* max_retries?: int|Param, // Default: 3
|
||||
* delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000
|
||||
* multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2
|
||||
* max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0
|
||||
* jitter?: float|Param, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1
|
||||
* },
|
||||
* rate_limiter?: scalar|Param|null, // Rate limiter name to use when processing messages. // Default: null
|
||||
* }>,
|
||||
* failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null
|
||||
* stop_worker_on_signals?: int|string|list<scalar|Param|null>,
|
||||
* default_bus?: scalar|Param|null, // Default: null
|
||||
* buses?: array<string, array{ // Default: {"messenger.bus.default":{"default_middleware":{"enabled":true,"allow_no_handlers":false,"allow_no_senders":true},"middleware":[]}}
|
||||
* default_middleware?: bool|string|array{
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* allow_no_handlers?: bool|Param, // Default: false
|
||||
* allow_no_senders?: bool|Param, // Default: true
|
||||
* },
|
||||
* middleware?: string|list<string|array{ // Default: []
|
||||
* id?: scalar|Param|null,
|
||||
* arguments?: list<mixed>,
|
||||
* }>,
|
||||
* }>,
|
||||
* },
|
||||
* scheduler?: bool|array{ // Scheduler configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* },
|
||||
* disallow_search_engine_index?: bool|Param, // Enabled by default when debug is enabled. // Default: true
|
||||
* http_client?: bool|array{ // HTTP Client configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* max_host_connections?: int|Param, // The maximum number of connections to a single host.
|
||||
* default_options?: array{
|
||||
* headers?: array<string, mixed>,
|
||||
* vars?: array<string, mixed>,
|
||||
* max_redirects?: int|Param, // The maximum number of redirects to follow.
|
||||
* http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.
|
||||
* resolve?: array<string, scalar|Param|null>,
|
||||
* proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection.
|
||||
* no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached.
|
||||
* timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter.
|
||||
* max_duration?: float|Param, // The maximum execution time for the request+response as a whole.
|
||||
* bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to.
|
||||
* verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context.
|
||||
* verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name.
|
||||
* cafile?: scalar|Param|null, // A certificate authority file.
|
||||
* capath?: scalar|Param|null, // A directory that contains multiple certificate authority files.
|
||||
* local_cert?: scalar|Param|null, // A PEM formatted certificate file.
|
||||
* local_pk?: scalar|Param|null, // A private key file.
|
||||
* passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file.
|
||||
* ciphers?: scalar|Param|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...)
|
||||
* peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es).
|
||||
* sha1?: mixed,
|
||||
* pin-sha256?: mixed,
|
||||
* md5?: mixed,
|
||||
* },
|
||||
* crypto_method?: scalar|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants.
|
||||
* extra?: array<string, mixed>,
|
||||
* rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null
|
||||
* caching?: bool|array{ // Caching configuration.
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client"
|
||||
* shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true
|
||||
* max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. // Default: 86400
|
||||
* },
|
||||
* retry_failed?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null
|
||||
* http_codes?: int|string|array<string, array{ // Default: []
|
||||
* code?: int|Param,
|
||||
* methods?: string|list<string|Param>,
|
||||
* }>,
|
||||
* max_retries?: int|Param, // Default: 3
|
||||
* delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000
|
||||
* multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2
|
||||
* max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0
|
||||
* jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1
|
||||
* },
|
||||
* },
|
||||
* mock_response_factory?: scalar|Param|null, // `true` to always return empty 200 responses, or the id of the service to use to generate mock responses - which should be either an invokable or an iterable.
|
||||
* scoped_clients?: array<string, string|array{ // Default: []
|
||||
* scope?: scalar|Param|null, // The regular expression that the request URL must match before adding the other options. When none is provided, the base URI is used instead.
|
||||
* base_uri?: scalar|Param|null, // The URI to resolve relative URLs, following rules in RFC 3985, section 2.
|
||||
* auth_basic?: scalar|Param|null, // An HTTP Basic authentication "username:password".
|
||||
* auth_bearer?: scalar|Param|null, // A token enabling HTTP Bearer authorization.
|
||||
* auth_ntlm?: scalar|Param|null, // A "username:password" pair to use Microsoft NTLM authentication (requires the cURL extension).
|
||||
* query?: array<string, scalar|Param|null>,
|
||||
* headers?: array<string, mixed>,
|
||||
* max_redirects?: int|Param, // The maximum number of redirects to follow.
|
||||
* http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version.
|
||||
* resolve?: array<string, scalar|Param|null>,
|
||||
* proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection.
|
||||
* no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached.
|
||||
* timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter.
|
||||
* max_duration?: float|Param, // The maximum execution time for the request+response as a whole.
|
||||
* bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to.
|
||||
* verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context.
|
||||
* verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name.
|
||||
* cafile?: scalar|Param|null, // A certificate authority file.
|
||||
* capath?: scalar|Param|null, // A directory that contains multiple certificate authority files.
|
||||
* local_cert?: scalar|Param|null, // A PEM formatted certificate file.
|
||||
* local_pk?: scalar|Param|null, // A private key file.
|
||||
* passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file.
|
||||
* ciphers?: scalar|Param|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...).
|
||||
* peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es).
|
||||
* sha1?: mixed,
|
||||
* pin-sha256?: mixed,
|
||||
* md5?: mixed,
|
||||
* },
|
||||
* crypto_method?: scalar|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants.
|
||||
* mock_response_factory?: scalar|Param|null, // `true` to always return empty 200 responses, `false` to disable mocking, or the id of the service to use to generate mock responses (invokable or iterable).
|
||||
* extra?: array<string, mixed>,
|
||||
* rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null
|
||||
* caching?: bool|array{ // Caching configuration.
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client"
|
||||
* shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true
|
||||
* max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. // Default: 86400
|
||||
* },
|
||||
* retry_failed?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null
|
||||
* http_codes?: int|string|array<string, array{ // Default: []
|
||||
* code?: int|Param,
|
||||
* methods?: string|list<string|Param>,
|
||||
* }>,
|
||||
* max_retries?: int|Param, // Default: 3
|
||||
* delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000
|
||||
* multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2
|
||||
* max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0
|
||||
* jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1
|
||||
* },
|
||||
* }>,
|
||||
* },
|
||||
* mailer?: bool|array{ // Mailer configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null
|
||||
* dsn?: scalar|Param|null, // Default: null
|
||||
* transports?: array<string, scalar|Param|null>,
|
||||
* envelope?: array{ // Mailer Envelope configuration
|
||||
* sender?: scalar|Param|null,
|
||||
* recipients?: string|list<scalar|Param|null>,
|
||||
* allowed_recipients?: string|list<scalar|Param|null>,
|
||||
* },
|
||||
* headers?: array<string, string|array{ // Default: []
|
||||
* value?: mixed,
|
||||
* }>,
|
||||
* dkim_signer?: bool|array{ // DKIM signer configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* key?: scalar|Param|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: ""
|
||||
* domain?: scalar|Param|null, // Default: ""
|
||||
* select?: scalar|Param|null, // Default: ""
|
||||
* passphrase?: scalar|Param|null, // The private key passphrase // Default: ""
|
||||
* options?: array<string, mixed>,
|
||||
* },
|
||||
* smime_signer?: bool|array{ // S/MIME signer configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* key?: scalar|Param|null, // Path to key (in PEM format) // Default: ""
|
||||
* certificate?: scalar|Param|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: ""
|
||||
* passphrase?: scalar|Param|null, // The private key passphrase // Default: null
|
||||
* extra_certificates?: scalar|Param|null, // Default: null
|
||||
* sign_options?: int|Param, // Default: null
|
||||
* },
|
||||
* smime_encrypter?: bool|array{ // S/MIME encrypter configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* repository?: scalar|Param|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: ""
|
||||
* cipher?: int|Param, // A set of algorithms used to encrypt the message // Default: null
|
||||
* },
|
||||
* },
|
||||
* secrets?: bool|array{
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* vault_directory?: scalar|Param|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%"
|
||||
* local_dotenv_file?: scalar|Param|null, // Default: "%kernel.project_dir%/.env.%kernel.environment%.local"
|
||||
* decryption_env_var?: scalar|Param|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET"
|
||||
* },
|
||||
* notifier?: bool|array{ // Notifier configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null
|
||||
* chatter_transports?: array<string, scalar|Param|null>,
|
||||
* texter_transports?: array<string, scalar|Param|null>,
|
||||
* notification_on_failed_messages?: bool|Param, // Default: false
|
||||
* channel_policy?: array<string, string|list<scalar|Param|null>>,
|
||||
* admin_recipients?: list<array{ // Default: []
|
||||
* email?: scalar|Param|null,
|
||||
* phone?: scalar|Param|null, // Default: ""
|
||||
* }>,
|
||||
* },
|
||||
* rate_limiter?: bool|array{ // Rate limiter configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* limiters?: array<string, array{ // Default: []
|
||||
* lock_factory?: scalar|Param|null, // The service ID of the lock factory used by this limiter (or null to disable locking). // Default: "auto"
|
||||
* cache_pool?: scalar|Param|null, // The cache pool to use for storing the current limiter state. // Default: "cache.rate_limiter"
|
||||
* storage_service?: scalar|Param|null, // The service ID of a custom storage implementation, this precedes any configured "cache_pool". // Default: null
|
||||
* policy?: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
|
||||
* limiters?: string|list<scalar|Param|null>,
|
||||
* limit?: int|Param, // The maximum allowed hits in a fixed interval or burst.
|
||||
* interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
|
||||
* rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket".
|
||||
* interval?: scalar|Param|null, // Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
|
||||
* amount?: int|Param, // Amount of tokens to add each interval. // Default: 1
|
||||
* },
|
||||
* anchor_at?: scalar|Param|null, // Aligns the "fixed_window" policy to a calendar (e.g. "2024-01-05 00:00:00 UTC" combined with `interval: 1 month` resets the counter on the 5th of each month). UTC if not specified. // Default: null
|
||||
* }>,
|
||||
* },
|
||||
* uid?: bool|array{ // Uid configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* default_uuid_version?: 7|6|4|1|Param, // Default: 7
|
||||
* name_based_uuid_version?: 5|3|Param, // Default: 5
|
||||
* name_based_uuid_namespace?: scalar|Param|null,
|
||||
* time_based_uuid_version?: 7|6|1|Param, // Default: 7
|
||||
* time_based_uuid_node?: scalar|Param|null,
|
||||
* uuid47_secret?: scalar|Param|null, // A high-entropy secret used by the "uuid47_transformer" service. Defaults to "kernel.secret". // Default: null
|
||||
* },
|
||||
* html_sanitizer?: bool|array{ // HtmlSanitizer configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* sanitizers?: array<string, array{ // Default: []
|
||||
* default_action?: "drop"|"block"|"allow"|Param, // Defines how the sanitizer must behave by default.
|
||||
* allow_safe_elements?: bool|Param, // Allows "safe" elements and attributes. // Default: false
|
||||
* allow_static_elements?: bool|Param, // Allows all static elements and attributes from the W3C Sanitizer API standard. // Default: false
|
||||
* allow_elements?: array<string, mixed>,
|
||||
* block_elements?: string|list<string|Param>,
|
||||
* drop_elements?: string|list<string|Param>,
|
||||
* allow_attributes?: array<string, mixed>,
|
||||
* drop_attributes?: array<string, mixed>,
|
||||
* force_attributes?: array<string, array<string, string|Param>>,
|
||||
* force_https_urls?: bool|Param, // Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. // Default: false
|
||||
* allowed_link_schemes?: string|list<string|Param>,
|
||||
* allowed_link_hosts?: null|string|list<string|Param>,
|
||||
* allow_relative_links?: bool|Param, // Allows relative URLs to be used in links href attributes. // Default: false
|
||||
* allowed_media_schemes?: string|list<string|Param>,
|
||||
* allowed_media_hosts?: null|string|list<string|Param>,
|
||||
* allow_relative_medias?: bool|Param, // Allows relative URLs to be used in media source attributes (img, audio, video, ...). // Default: false
|
||||
* with_attribute_sanitizers?: string|list<string|Param>,
|
||||
* without_attribute_sanitizers?: string|list<string|Param>,
|
||||
* max_input_length?: int|Param, // The maximum length allowed for the sanitized input. // Default: 0
|
||||
* }>,
|
||||
* },
|
||||
* webhook?: bool|array{ // Webhook configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus"
|
||||
* event_header_name?: scalar|Param|null, // Default: "Webhook-Event"
|
||||
* id_header_name?: scalar|Param|null, // Default: "Webhook-Id"
|
||||
* signature_header_name?: scalar|Param|null, // Default: "Webhook-Signature"
|
||||
* signing_algorithm?: scalar|Param|null, // Default: "sha256"
|
||||
* routing?: array<string, array{ // Default: []
|
||||
* service?: scalar|Param|null,
|
||||
* secret?: scalar|Param|null, // Default: ""
|
||||
* }>,
|
||||
* },
|
||||
* remote-event?: bool|array{ // RemoteEvent configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* },
|
||||
* json_streamer?: bool|array{ // JSON streamer configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* default_options?: array{
|
||||
* include_null_properties?: bool|Param, // Encode the properties with null value // Default: false
|
||||
* ...<string, mixed>
|
||||
* },
|
||||
* },
|
||||
* }
|
||||
* @psalm-type MakerConfig = array{
|
||||
* root_namespace?: scalar|Param|null, // Default: "App"
|
||||
* generate_final_classes?: bool|Param, // Default: true
|
||||
* generate_final_entities?: bool|Param, // Default: false
|
||||
* }
|
||||
* @psalm-type ConfigType = array{
|
||||
* imports?: ImportsConfig,
|
||||
* parameters?: ParametersConfig,
|
||||
* services?: ServicesConfig,
|
||||
* framework?: FrameworkConfig,
|
||||
* "when@dev"?: array{
|
||||
* imports?: ImportsConfig,
|
||||
* parameters?: ParametersConfig,
|
||||
* services?: ServicesConfig,
|
||||
* framework?: FrameworkConfig,
|
||||
* maker?: MakerConfig,
|
||||
* },
|
||||
* "when@prod"?: array{
|
||||
* imports?: ImportsConfig,
|
||||
* parameters?: ParametersConfig,
|
||||
* services?: ServicesConfig,
|
||||
* framework?: FrameworkConfig,
|
||||
* },
|
||||
* "when@test"?: array{
|
||||
* imports?: ImportsConfig,
|
||||
* parameters?: ParametersConfig,
|
||||
* services?: ServicesConfig,
|
||||
* framework?: FrameworkConfig,
|
||||
* },
|
||||
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias
|
||||
* imports?: ImportsConfig,
|
||||
* parameters?: ParametersConfig,
|
||||
* services?: ServicesConfig,
|
||||
* ...<string, ExtensionType>,
|
||||
* }>
|
||||
* }
|
||||
*/
|
||||
final class App
|
||||
{
|
||||
/**
|
||||
* @param ConfigType $config
|
||||
*
|
||||
* @psalm-return ConfigType
|
||||
*/
|
||||
public static function config(array $config): array
|
||||
{
|
||||
/** @var ConfigType $config */
|
||||
$config = AppReference::config($config);
|
||||
|
||||
return $config;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Symfony\Component\Routing\Loader\Configurator;
|
||||
|
||||
/**
|
||||
* This class provides array-shapes for configuring the routes of an application.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```php
|
||||
* // config/routes.php
|
||||
* namespace Symfony\Component\Routing\Loader\Configurator;
|
||||
*
|
||||
* return Routes::config([
|
||||
* 'controllers' => [
|
||||
* 'resource' => 'routing.controllers',
|
||||
* ],
|
||||
* ]);
|
||||
* ```
|
||||
*
|
||||
* @psalm-type RouteConfig = array{
|
||||
* path: string|array<string,string>,
|
||||
* controller?: string,
|
||||
* methods?: string|list<string>,
|
||||
* requirements?: array<string,string>,
|
||||
* defaults?: array<string,mixed>,
|
||||
* options?: array<string,mixed>,
|
||||
* host?: string|array<string,string>,
|
||||
* schemes?: string|list<string>,
|
||||
* condition?: string,
|
||||
* locale?: string,
|
||||
* format?: string,
|
||||
* utf8?: bool,
|
||||
* stateless?: bool,
|
||||
* }
|
||||
* @psalm-type ImportConfig = array{
|
||||
* resource: string,
|
||||
* type?: string,
|
||||
* exclude?: string|list<string>,
|
||||
* prefix?: string|array<string,string>,
|
||||
* name_prefix?: string,
|
||||
* trailing_slash_on_root?: bool,
|
||||
* controller?: string,
|
||||
* methods?: string|list<string>,
|
||||
* requirements?: array<string,string>,
|
||||
* defaults?: array<string,mixed>,
|
||||
* options?: array<string,mixed>,
|
||||
* host?: string|array<string,string>,
|
||||
* schemes?: string|list<string>,
|
||||
* condition?: string,
|
||||
* locale?: string,
|
||||
* format?: string,
|
||||
* utf8?: bool,
|
||||
* stateless?: bool,
|
||||
* }
|
||||
* @psalm-type AliasConfig = array{
|
||||
* alias: string,
|
||||
* deprecated?: array{package:string, version:string, message?:string},
|
||||
* }
|
||||
* @psalm-type RoutesConfig = array{
|
||||
* "when@dev"?: array<string, RouteConfig|ImportConfig|AliasConfig>,
|
||||
* "when@prod"?: array<string, RouteConfig|ImportConfig|AliasConfig>,
|
||||
* "when@test"?: array<string, RouteConfig|ImportConfig|AliasConfig>,
|
||||
* ...<string, RouteConfig|ImportConfig|AliasConfig>
|
||||
* }
|
||||
*/
|
||||
final class Routes
|
||||
{
|
||||
/**
|
||||
* @param RoutesConfig $config
|
||||
*
|
||||
* @psalm-return RoutesConfig
|
||||
*/
|
||||
public static function config(array $config): array
|
||||
{
|
||||
return $config;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# yaml-language-server: $schema=../vendor/symfony/routing/Loader/schema/routing.schema.json
|
||||
|
||||
# This file is the entry point to configure the routes of your app.
|
||||
# Methods with the #[Route] attribute are automatically imported.
|
||||
# See also https://symfony.com/doc/current/routing.html
|
||||
|
||||
# To list all registered routes, run the following command:
|
||||
# bin/console debug:router
|
||||
|
||||
controllers:
|
||||
resource: routing.controllers
|
||||
@@ -0,0 +1,4 @@
|
||||
when@dev:
|
||||
_errors:
|
||||
resource: '@FrameworkBundle/Resources/config/routing/errors.php'
|
||||
prefix: /_error
|
||||
@@ -0,0 +1,23 @@
|
||||
# yaml-language-server: $schema=../vendor/symfony/dependency-injection/Loader/schema/services.schema.json
|
||||
|
||||
# This file is the entry point to configure your own services.
|
||||
# Files in the packages/ subdirectory configure your dependencies.
|
||||
# See also https://symfony.com/doc/current/service_container/import.html
|
||||
|
||||
# Put parameters here that don't need to change on each machine where the app is deployed
|
||||
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
|
||||
parameters:
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
_defaults:
|
||||
autowire: true # Automatically injects dependencies in your services.
|
||||
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
||||
|
||||
# makes classes in src/ available to be used as services
|
||||
# this creates a service per class whose id is the fully-qualified class name
|
||||
App\:
|
||||
resource: '../src/'
|
||||
|
||||
# add more service definitions when explicit configuration is needed
|
||||
# please note that last definitions always *replace* previous ones
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
|
||||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||
|
||||
return static function (array $context) {
|
||||
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
|
||||
class Kernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
|
||||
/**
|
||||
* @return list<string> An array of allowed values for APP_ENV
|
||||
*/
|
||||
private function getAllowedEnvs(): array
|
||||
{
|
||||
return ['prod', 'dev', 'test'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user