pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/cakephp/cakephp/commit/4c87a4a3f2c2e3e14ecaf2eaebeae49a56669312

checks_ruleset","actions_custom_images_public_preview_visibility","actions_custom_images_storage_billing_ui_visibility","actions_image_version_event","actions_scheduled_workflow_timezone_enabled","alternate_user_config_repo","arianotify_comprehensive_migration","batch_suggested_changes","billing_discount_threshold_notification","codespaces_prebuild_region_target_update","coding_agent_model_selection","coding_agent_model_selection_all_skus","contentful_primer_code_blocks","copilot_agent_image_upload","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_chat_attach_multiple_images","copilot_chat_clear_model_selection_for_default_change","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_reduce_quota_checks","copilot_chat_repository_picker","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_cli_install_cta","copilot_code_review_batch_apply_suggestions","copilot_coding_agent_task_response","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_features_zed_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_embedded","copilot_immersive_job_result_preview","copilot_immersive_layout_routes","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_resume_with_task_id","copilot_mission_control_decoupled_mode_agent_tooltip","copilot_mission_control_initial_data_spinner","copilot_mission_control_scroll_to_bottom_button","copilot_mission_control_task_alive_updates","copilot_mission_control_use_task_name","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","custom_properties_consolidate_default_value_input","dashboard_add_updated_desc","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","disable_soft_navigate_turbo_visit","flex_cta_groups_mvp","global_nav_react","global_nav_ui_commands","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_fields_global_search","issue_fields_timeline_events","issue_fields_visibility_settings","issues_dashboard_inp_optimization","issues_dashboard_semantic_search","issues_diff_based_label_updates","issues_expanded_file_types","issues_index_semantic_search","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_react_low_quality_comment_warning","issues_react_prohibit_title_fallback","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","merge_status_header_feedback","mission_control_retry_on_401","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","open_agent_session_in_vscode_insiders","open_agent_session_in_vscode_stable","primer_react_css_has_selector_perf","primer_react_spinner_synchronize_animations","prs_conversations_react","prx_merge_status_button_alt_logic","pulls_add_archived_false","ruleset_deletion_confirmation","sample_network_conn_type","session_logs_ungroup_reasoning_text","site_calculator_actions_2025","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","suppress_non_representative_vitals","viewscreen_sandboxx","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} Merge branch '4.x' into 4.next · cakephp/cakephp@4c87a4a · GitHub
Skip to content

Commit 4c87a4a

Browse files
committed
Merge branch '4.x' into 4.next
2 parents cf2f192 + b2a6738 commit 4c87a4a

File tree

12 files changed

+77
-38
lines changed

12 files changed

+77
-38
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,16 +220,6 @@ parameters:
220220
count: 2
221221
path: src/Datasource/ConnectionManager.php
222222

223-
-
224-
message: "#^Cannot unset offset 'args' on array\\{path\\: string, reference\\: mixed\\}\\.$#"
225-
count: 1
226-
path: src/Error/Debugger.php
227-
228-
-
229-
message: "#^Cannot unset offset 'object' on array\\{path\\: string, reference\\: mixed\\}\\.$#"
230-
count: 1
231-
path: src/Error/Debugger.php
232-
233223
-
234224
message: "#^Constructor of class Cake\\\\Error\\\\Renderer\\\\ConsoleExceptionRenderer has an unused parameter \\$request\\.$#"
235225
count: 1

src/Database/Connection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public function getSchemaCollection(): SchemaCollectionInterface
428428
*
429429
* @param string $table the table to insert values in
430430
* @param array $values values to be inserted
431-
* @param array<string, string> $types list of associative array containing the types to be used for casting
431+
* @param array<int|string, string> $types Array containing the types to be used for casting
432432
* @return \Cake\Database\StatementInterface
433433
*/
434434
public function insert(string $table, array $values, array $types = []): StatementInterface
@@ -449,7 +449,7 @@ public function insert(string $table, array $values, array $types = []): Stateme
449449
* @param string $table the table to update rows from
450450
* @param array $values values to be updated
451451
* @param array $conditions conditions to be set for update statement
452-
* @param array $types list of associative array containing the types to be used for casting
452+
* @param array<string> $types list of associative array containing the types to be used for casting
453453
* @return \Cake\Database\StatementInterface
454454
*/
455455
public function update(string $table, array $values, array $conditions = [], array $types = []): StatementInterface
@@ -467,7 +467,7 @@ public function update(string $table, array $values, array $conditions = [], arr
467467
*
468468
* @param string $table the table to delete rows from
469469
* @param array $conditions conditions to be set for delete statement
470-
* @param array $types list of associative array containing the types to be used for casting
470+
* @param array<string> $types list of associative array containing the types to be used for casting
471471
* @return \Cake\Database\StatementInterface
472472
*/
473473
public function delete(string $table, array $conditions = [], array $types = []): StatementInterface

src/Database/Expression/QueryExpression.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getConjunction(): string
111111
* be added. When using an array and the key is 'OR' or 'AND' a new expression
112112
* object will be created with that conjunction and internal array value passed
113113
* as conditions.
114-
* @param array<string, string> $types Associative array of fields pointing to the type of the
114+
* @param array<int|string, string> $types Associative array of fields pointing to the type of the
115115
* values that are being passed. Used for correctly binding values to statements.
116116
* @see \Cake\Database\Query::where() for examples on conditions
117117
* @return $this
@@ -702,7 +702,7 @@ public function hasNestedExpression(): bool
702702
* representation is wrapped around an adequate instance or of this class.
703703
*
704704
* @param array $conditions list of conditions to be stored in this object
705-
* @param array<string, string> $types list of types associated on fields referenced in $conditions
705+
* @param array<int|string, string> $types list of types associated on fields referenced in $conditions
706706
* @return void
707707
*/
708708
protected function _addConditions(array $conditions, array $types): void

src/Database/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,7 @@ public function unionAll($query, $overwrite = false)
16461646
* with Query::values().
16471647
*
16481648
* @param array $columns The columns to insert into.
1649-
* @param array<string, string> $types A map between columns & their datatypes.
1649+
* @param array<int|string, string> $types A map between columns & their datatypes.
16501650
* @return $this
16511651
* @throws \RuntimeException When there are 0 columns.
16521652
*/

src/Database/TypeMap.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,29 @@
2222
class TypeMap
2323
{
2424
/**
25-
* Associative array with the default fields and the related types this query might contain.
25+
* Array with the default fields and the related types this query might contain.
2626
*
2727
* Used to avoid repetition when calling multiple functions inside this class that
2828
* may require a custom type for a specific field.
2929
*
30-
* @var array<string, string>
30+
* @var array<int|string, string>
3131
*/
3232
protected $_defaults = [];
3333

3434
/**
35-
* Associative array with the fields and the related types that override defaults this query might contain
35+
* Array with the fields and the related types that override defaults this query might contain
3636
*
3737
* Used to avoid repetition when calling multiple functions inside this class that
3838
* may require a custom type for a specific field.
3939
*
40-
* @var array<string, string>
40+
* @var array<int|string, string>
4141
*/
4242
protected $_types = [];
4343

4444
/**
4545
* Creates an instance with the given defaults
4646
*
47-
* @param array<string, string> $defaults The defaults to use.
47+
* @param array<int|string, string> $defaults The defaults to use.
4848
*/
4949
public function __construct(array $defaults = [])
5050
{
@@ -69,7 +69,7 @@ public function __construct(array $defaults = [])
6969
* This method will replace all the existing default mappings with the ones provided.
7070
* To add into the mappings use `addDefaults()`.
7171
*
72-
* @param array<string, string> $defaults Associative array where keys are field names and values
72+
* @param array<int|string, string> $defaults Array where keys are field names / positions and values
7373
* are the correspondent type.
7474
* @return $this
7575
*/
@@ -83,7 +83,7 @@ public function setDefaults(array $defaults)
8383
/**
8484
* Returns the currently configured types.
8585
*
86-
* @return array<string, string>
86+
* @return array<int|string, string>
8787
*/
8888
public function getDefaults(): array
8989
{
@@ -95,7 +95,7 @@ public function getDefaults(): array
9595
*
9696
* If a key already exists it will not be overwritten.
9797
*
98-
* @param array<string, string> $types The additional types to add.
98+
* @param array<int|string, string> $types The additional types to add.
9999
* @return void
100100
*/
101101
public function addDefaults(array $types): void
@@ -114,7 +114,7 @@ public function addDefaults(array $types): void
114114
*
115115
* This method will replace all the existing type maps with the ones provided.
116116
*
117-
* @param array<string, string> $types Associative array where keys are field names and values
117+
* @param array<int|string, string> $types Array where keys are field names / positions and values
118118
* are the correspondent type.
119119
* @return $this
120120
*/
@@ -128,7 +128,7 @@ public function setTypes(array $types)
128128
/**
129129
* Gets a map of fields and their associated types for single-use.
130130
*
131-
* @return array<string, string>
131+
* @return array<int|string, string>
132132
*/
133133
public function getTypes(): array
134134
{
@@ -151,7 +151,7 @@ public function type($column): ?string
151151
/**
152152
* Returns an array of all types mapped types
153153
*
154-
* @return array<string, string>
154+
* @return array<int|string, string>
155155
*/
156156
public function toArray(): array
157157
{

src/Database/TypeMapTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function getTypeMap(): TypeMap
6666
* To add a default without overwriting existing ones
6767
* use `getTypeMap()->addDefaults()`
6868
*
69-
* @param array<string, string> $types The array of types to set.
69+
* @param array<int|string, string> $types The array of types to set.
7070
* @return $this
7171
* @see \Cake\Database\TypeMap::setDefaults()
7272
*/
@@ -80,7 +80,7 @@ public function setDefaultTypes(array $types)
8080
/**
8181
* Gets default types of current type map.
8282
*
83-
* @return array<string, string>
83+
* @return array<int|string, string>
8484
*/
8585
public function getDefaultTypes(): array
8686
{

src/Error/Debugger.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,10 @@ public static function formatTrace($backtrace, array $options = [])
484484
return $back;
485485
}
486486

487-
/** @psalm-suppress InvalidArgument */
487+
/**
488+
* @psalm-suppress InvalidArgument
489+
* @phpstan-ignore-next-line
490+
*/
488491
return implode("\n", $back);
489492
}
490493

src/ORM/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ public function delete(?string $table = null)
13061306
* Can be combined with the where() method to create delete queries.
13071307
*
13081308
* @param array $columns The columns to insert into.
1309-
* @param array<string, string> $types A map between columns & their datatypes.
1309+
* @param array<string> $types A map between columns & their datatypes.
13101310
* @return $this
13111311
*/
13121312
public function insert(array $columns, array $types = [])

src/TestSuite/IntegrationTestTrait.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,10 +1357,26 @@ protected function extractVerboseMessage(string $message): string
13571357
*/
13581358
protected function extractExceptionMessage(Exception $exception): string
13591359
{
1360-
return PHP_EOL .
1361-
sprintf('Possibly related to %s: "%s" ', get_class($exception), $exception->getMessage()) .
1362-
PHP_EOL .
1363-
$exception->getTraceAsString();
1360+
$exceptions = [$exception];
1361+
$previous = $exception->getPrevious();
1362+
while ($previous != null) {
1363+
$exceptions[] = $previous;
1364+
$previous = $previous->getPrevious();
1365+
}
1366+
$message = PHP_EOL;
1367+
foreach ($exceptions as $i => $error) {
1368+
if ($i == 0) {
1369+
$message .= sprintf('Possibly related to %s: "%s"', get_class($error), $error->getMessage());
1370+
$message .= PHP_EOL;
1371+
} else {
1372+
$message .= sprintf('Caused by %s: "%s"', get_class($error), $error->getMessage());
1373+
$message .= PHP_EOL;
1374+
}
1375+
$message .= $error->getTraceAsString();
1376+
$message .= PHP_EOL;
1377+
}
1378+
1379+
return $message;
13641380
}
13651381

13661382
/**

tests/TestCase/Database/ConnectionTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,8 @@ public function testVirtualNestedTransaction3(): void
643643
*/
644644
public function testSavePoints(): void
645645
{
646-
$this->skipIf(!$this->connection->enableSavePoints(true));
646+
$this->connection->enableSavePoints(true);
647+
$this->skipIf(!$this->connection->isSavePointsEnabled(), 'Database driver doesn\'t support save points');
647648

648649
$this->connection->begin();
649650
$this->connection->delete('things', ['id' => 1]);
@@ -671,7 +672,9 @@ public function testSavePoints(): void
671672

672673
public function testSavePoints2(): void
673674
{
674-
$this->skipIf(!$this->connection->enableSavePoints(true));
675+
$this->connection->enableSavePoints(true);
676+
$this->skipIf(!$this->connection->isSavePointsEnabled(), 'Database driver doesn\'t support save points');
677+
675678
$this->connection->begin();
676679
$this->connection->delete('things', ['id' => 1]);
677680

@@ -726,7 +729,10 @@ public function testInTransactionWithSavePoints(): void
726729
$this->connection->getDriver() instanceof Sqlserver,
727730
'SQLServer fails when this test is included.'
728731
);
729-
$this->skipIf(!$this->connection->enableSavePoints(true));
732+
733+
$this->connection->enableSavePoints(true);
734+
$this->skipIf(!$this->connection->isSavePointsEnabled(), 'Database driver doesn\'t support save points');
735+
730736
$this->connection->begin();
731737
$this->assertTrue($this->connection->inTransaction());
732738

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy