|
474 | 474 | * max_host_connections?: int, // The maximum number of connections to a single host. |
475 | 475 | * default_options?: array{ |
476 | 476 | * headers?: array<string, mixed>, |
477 | | - * vars?: list<mixed>, |
| 477 | + * vars?: array<string, mixed>, |
478 | 478 | * max_redirects?: int, // The maximum number of redirects to follow. |
479 | 479 | * http_version?: scalar|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. |
480 | 480 | * resolve?: array<string, scalar|null>, |
|
497 | 497 | * md5?: mixed, |
498 | 498 | * }, |
499 | 499 | * crypto_method?: scalar|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. |
500 | | - * extra?: list<mixed>, |
| 500 | + * extra?: array<string, mixed>, |
501 | 501 | * rate_limiter?: scalar|null, // Rate limiter name to use for throttling requests. // Default: null |
502 | 502 | * caching?: bool|array{ // Caching configuration. |
503 | 503 | * enabled?: bool, // Default: false |
|
550 | 550 | * md5?: mixed, |
551 | 551 | * }, |
552 | 552 | * crypto_method?: scalar|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. |
553 | | - * extra?: list<mixed>, |
| 553 | + * extra?: array<string, mixed>, |
554 | 554 | * rate_limiter?: scalar|null, // Rate limiter name to use for throttling requests. // Default: null |
555 | 555 | * caching?: bool|array{ // Caching configuration. |
556 | 556 | * enabled?: bool, // Default: false |
|
1241 | 1241 | * inflector?: scalar|null, // Specify an inflector to use. // Default: "api_platform.metadata.inflector" |
1242 | 1242 | * validator?: array{ |
1243 | 1243 | * serialize_payload_fields?: mixed, // Set to null to serialize all payload fields when a validation error is thrown, or set the fields you want to include explicitly. // Default: [] |
1244 | | - * query_parameter_validation?: bool, // Default: true |
| 1244 | + * query_parameter_validation?: bool, // Deprecated: Will be removed in API Platform 5.0. // Default: true |
1245 | 1245 | * }, |
1246 | 1246 | * eager_loading?: bool|array{ |
1247 | 1247 | * enabled?: bool, // Default: true |
|
1251 | 1251 | * }, |
1252 | 1252 | * handle_symfony_errors?: bool, // Allows to handle symfony exceptions. // Default: false |
1253 | 1253 | * enable_swagger?: bool, // Enable the Swagger documentation and export. // Default: true |
| 1254 | + * enable_json_streamer?: bool, // Enable json streamer. // Default: false |
1254 | 1255 | * enable_swagger_ui?: bool, // Enable Swagger UI // Default: true |
1255 | 1256 | * enable_re_doc?: bool, // Enable ReDoc // Default: true |
1256 | 1257 | * enable_entrypoint?: bool, // Enable the entrypoint // Default: true |
1257 | 1258 | * enable_docs?: bool, // Enable the docs // Default: true |
1258 | 1259 | * enable_profiler?: bool, // Enable the data collector and the WebProfilerBundle integration. // Default: true |
| 1260 | + * enable_phpdoc_parser?: bool, // Enable resource metadata collector using PHPStan PhpDocParser. // Default: true |
1259 | 1261 | * enable_link_security?: bool, // Enable security for Links (sub resources) // Default: false |
1260 | 1262 | * collection?: array{ |
1261 | 1263 | * exists_parameter_name?: scalar|null, // The name of the query parameter to filter on nullable field values. // Default: "exists" |
|
1271 | 1273 | * }, |
1272 | 1274 | * }, |
1273 | 1275 | * mapping?: array{ |
| 1276 | + * imports?: list<scalar|null>, |
1274 | 1277 | * paths?: list<scalar|null>, |
1275 | 1278 | * }, |
1276 | 1279 | * resource_class_directories?: list<scalar|null>, |
|
1345 | 1348 | * mercure?: bool|array{ |
1346 | 1349 | * enabled?: bool, // Default: false |
1347 | 1350 | * hub_url?: scalar|null, // The URL sent in the Link HTTP header. If not set, will default to the URL for MercureBundle's default hub. // Default: null |
1348 | | - * include_type?: bool, // Always include @var in updates (including delete ones). // Default: false |
| 1351 | + * include_type?: bool, // Always include @type in updates (including delete ones). // Default: false |
1349 | 1352 | * }, |
1350 | 1353 | * messenger?: bool|array{ |
1351 | 1354 | * enabled?: bool, // Default: false |
|
1368 | 1371 | * license?: array{ |
1369 | 1372 | * name?: scalar|null, // The license name used for the API. // Default: null |
1370 | 1373 | * url?: scalar|null, // URL to the license used for the API. MUST be in the format of a URL. // Default: null |
| 1374 | + * identifier?: scalar|null, // An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. // Default: null |
1371 | 1375 | * }, |
1372 | 1376 | * swagger_ui_extra_configuration?: mixed, // To pass extra configuration to Swagger UI, like docExpansion or filter. // Default: [] |
1373 | 1377 | * overrideResponses?: bool, // Whether API Platform adds automatic responses to the OpenAPI documentation. // Default: true |
| 1378 | + * error_resource_class?: scalar|null, // The class used to represent errors in the OpenAPI documentation. // Default: null |
| 1379 | + * validation_error_resource_class?: scalar|null, // The class used to represent validation errors in the OpenAPI documentation. // Default: null |
1374 | 1380 | * }, |
1375 | 1381 | * maker?: bool|array{ |
1376 | 1382 | * enabled?: bool, // Default: true |
|
1461 | 1467 | * parameters?: mixed, |
1462 | 1468 | * strict_query_parameter_validation?: mixed, |
1463 | 1469 | * hide_hydra_operation?: mixed, |
| 1470 | + * json_stream?: mixed, |
1464 | 1471 | * extra_properties?: mixed, |
| 1472 | + * map?: mixed, |
1465 | 1473 | * route_name?: mixed, |
1466 | 1474 | * errors?: mixed, |
1467 | 1475 | * read?: mixed, |
|
1512 | 1520 | * intercept_redirects?: bool, // Default: false |
1513 | 1521 | * excluded_ajax_paths?: scalar|null, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt" |
1514 | 1522 | * } |
| 1523 | + * @psalm-type MakerConfig = array{ |
| 1524 | + * root_namespace?: scalar|null, // Default: "App" |
| 1525 | + * generate_final_classes?: bool, // Default: true |
| 1526 | + * generate_final_entities?: bool, // Default: false |
| 1527 | + * } |
1515 | 1528 | * @psalm-type DoctrineMigrationsConfig = array{ |
1516 | 1529 | * enable_service_migrations?: bool, // Whether to enable fetching migrations from the service container. // Default: false |
1517 | 1530 | * migrations_paths?: array<string, scalar|null>, |
|
1750 | 1763 | * uploadable?: scalar|null, // Default: "Gedmo\\Uploadable\\UploadableListener" |
1751 | 1764 | * reference_integrity?: scalar|null, // Default: "Gedmo\\ReferenceIntegrity\\ReferenceIntegrityListener" |
1752 | 1765 | * }, |
| 1766 | + * softdeleteable?: array{ |
| 1767 | + * handle_post_flush_event?: bool, // Default: false |
| 1768 | + * }, |
1753 | 1769 | * uploadable?: array{ |
1754 | 1770 | * default_file_path?: scalar|null, // Default: null |
1755 | 1771 | * mime_type_guesser_class?: scalar|null, // Default: "Stof\\DoctrineExtensionsBundle\\Uploadable\\MimeTypeGuesserAdapter" |
|
1902 | 1918 | * traces_sampler?: scalar|null, |
1903 | 1919 | * profiles_sample_rate?: float, // The sampling factor to apply to profiles. A value of 0 will deny sending any profiles, and a value of 1 will send all profiles. Profiles are sampled in relation to traces_sample_rate |
1904 | 1920 | * enable_logs?: bool, |
| 1921 | + * enable_metrics?: bool, // Default: true |
1905 | 1922 | * attach_stacktrace?: bool, |
1906 | 1923 | * attach_metric_code_locations?: bool, |
1907 | 1924 | * context_lines?: int, |
|
1918 | 1935 | * before_send_check_in?: scalar|null, |
1919 | 1936 | * before_send_metrics?: scalar|null, |
1920 | 1937 | * before_send_log?: scalar|null, |
| 1938 | + * before_send_metric?: scalar|null, |
1921 | 1939 | * trace_propagation_targets?: mixed, |
1922 | 1940 | * tags?: array<string, scalar|null>, |
1923 | 1941 | * error_types?: scalar|null, |
|
1936 | 1954 | * http_ssl_verify_peer?: bool, |
1937 | 1955 | * http_compression?: bool, |
1938 | 1956 | * capture_silenced_errors?: bool, |
1939 | | - * max_request_body_size?: "none"|"small"|"medium"|"always", |
| 1957 | + * max_request_body_size?: "none"|"never"|"small"|"medium"|"always", |
1940 | 1958 | * class_serializers?: array<string, scalar|null>, |
1941 | 1959 | * }, |
1942 | 1960 | * messenger?: bool|array{ |
|
2242 | 2260 | * return_expiration?: scalar|null, // When true, the response will include the token expiration timestamp // Default: false |
2243 | 2261 | * return_expiration_parameter_name?: scalar|null, // The default response parameter name containing the refresh token expiration timestamp // Default: "refresh_token_expiration" |
2244 | 2262 | * } |
2245 | | - * @psalm-type MakerConfig = array{ |
2246 | | - * root_namespace?: scalar|null, // Default: "App" |
2247 | | - * generate_final_classes?: bool, // Default: true |
2248 | | - * generate_final_entities?: bool, // Default: false |
2249 | | - * } |
2250 | 2263 | * @psalm-type ConfigType = array{ |
2251 | 2264 | * imports?: ImportsConfig, |
2252 | 2265 | * parameters?: ParametersConfig, |
|
2349 | 2362 | * }> |
2350 | 2363 | * } |
2351 | 2364 | */ |
2352 | | -final class App { |
| 2365 | +final class App |
| 2366 | +{ |
2353 | 2367 | /** |
2354 | 2368 | * @param ConfigType $config |
2355 | 2369 | * |
2356 | 2370 | * @psalm-return ConfigType |
2357 | 2371 | */ |
2358 | | - public static function config(array $config): array { |
| 2372 | + public static function config(array $config): array |
| 2373 | + { |
2359 | 2374 | return AppReference::config($config); |
2360 | 2375 | } |
2361 | 2376 | } |
@@ -2424,13 +2439,15 @@ public static function config(array $config): array { |
2424 | 2439 | * ...<string, RouteConfig|ImportConfig|AliasConfig> |
2425 | 2440 | * } |
2426 | 2441 | */ |
2427 | | -final class Routes { |
| 2442 | +final class Routes |
| 2443 | +{ |
2428 | 2444 | /** |
2429 | 2445 | * @param RoutesConfig $config |
2430 | 2446 | * |
2431 | 2447 | * @psalm-return RoutesConfig |
2432 | 2448 | */ |
2433 | | - public static function config(array $config): array { |
| 2449 | + public static function config(array $config): array |
| 2450 | + { |
2434 | 2451 | return $config; |
2435 | 2452 | } |
2436 | 2453 | } |
0 commit comments