Skip to content

Commit f8ca62d

Browse files
Copilotswissspidy
andcommitted
Add documentation for update() parameters and putenv() usage
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 415fb60 commit f8ca62d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Package_Command.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,9 @@ public function path( $args ) {
531531
* Generating autoload files
532532
* ---
533533
* Success: Packages updated.
534+
*
535+
* @param array $_ Unused positional arguments (none expected).
536+
* @param array $assoc_args Associative array of options.
534537
*/
535538
public function update( $_, $assoc_args = [] ) {
536539
$no_interaction = (bool) Utils\get_flag_value( $assoc_args, 'no-interaction', false );
@@ -1511,6 +1514,10 @@ private function get_github_default_branch( $package_name, $insecure = false ) {
15111514
*
15121515
* This prevents Git from prompting for credentials (e.g., SSH passwords),
15131516
* which is useful for scripting and automation.
1517+
*
1518+
* Note: This uses putenv() which affects the entire PHP process, including
1519+
* any Git operations spawned by Composer. This is intentional to ensure
1520+
* non-interactive behavior propagates to all child processes.
15141521
*/
15151522
private function set_non_interactive_mode() {
15161523
// Prevent Git from prompting for credentials

0 commit comments

Comments
 (0)