743 Commits

Author SHA1 Message Date
Nadim AL ABDOU 95b070ee71 [Process] Throw InvalidArgumentException when env block exceeds Windows limit 2026-03-08 23:25:36 +01:00
Nicolas Grekas 608476f460 Merge branch '7.3' into 7.4
* 7.3:
  Fix merge
  [FrameworkBundle] Clean `http_cache` dir in `KernelTestCase::ensureKernelShutdown()`
  fix tests on Windows
  [PropertyInfo] Conflict with phpdocumentor/reflection-docblock >= 6
  [Finder] Fix appending empty iterators
  Fix attributeLoader
  Bump Symfony version to 7.3.11
  Update VERSION for 7.3.10
  Update CHANGELOG for 7.3.10
  Bump Symfony version to 6.4.33
  Update VERSION for 6.4.32
  Update CONTRIBUTORS for 6.4.32
  Update CHANGELOG for 6.4.32
  [Process] Fix escaping for MSYS on Windows
2026-01-26 16:07:59 +01:00
Nicolas Grekas 81fe4ea2c3 Merge branch '6.4' into 7.3
* 6.4:
  fix tests on Windows
  [PropertyInfo] Conflict with phpdocumentor/reflection-docblock >= 6
  [Finder] Fix appending empty iterators
  Fix attributeLoader
  Bump Symfony version to 6.4.33
  Update VERSION for 6.4.32
  Update CONTRIBUTORS for 6.4.32
  Update CHANGELOG for 6.4.32
  [Process] Fix escaping for MSYS on Windows
2026-01-26 14:14:40 +01:00
Nicolas Grekas c46e854e79 [Process] Fix escaping for MSYS on Windows 2026-01-23 17:02:12 +01:00
Christian Flothmann 626f07a53f Merge branch '7.3' into 7.4
* 7.3:
  do not use PHPUnit mock objects without configured expectations
  [Form] Fix ICU 72+ whitespace handling in `DateTimeToLocalizedStringTransformer`
  [Process] Adjust Process mustRun method phpdoc
  [Serializer] Fix NameConverter not detecting wrong input format with allow_extra_attributes=false
2026-01-20 10:23:51 +01:00
Christian Flothmann 4424bc14e7 Merge branch '6.4' into 7.3
* 6.4:
  do not use PHPUnit mock objects without configured expectations
  [Form] Fix ICU 72+ whitespace handling in `DateTimeToLocalizedStringTransformer`
  [Process] Adjust Process mustRun method phpdoc
  [Serializer] Fix NameConverter not detecting wrong input format with allow_extra_attributes=false
2026-01-20 10:23:00 +01:00
Antoine Lamirault c593135be6 [Process] Adjust Process mustRun method phpdoc 2026-01-15 14:23:20 +01:00
Christian Flothmann f532042054 Merge branch '7.3' into 7.4
* 7.3:
  fix high deps tests
  [HttpFoundation] Fix double-prefixing of session keys when using redis/memcached
  [TypeInfo] Fix static type resolution when called class is in different namespace
  [FrameworkBundle] Revert destination file change for secrets:decrypt-to-local
  [Process] Ignore invalid env var names
  [JsonStreamer] Fix memory leak by caching stream readers/writers
2026-01-09 13:14:21 +01:00
Christian Flothmann 6d13a93007 Merge branch '6.4' into 7.3
* 6.4:
  fix high deps tests
  [HttpFoundation] Fix double-prefixing of session keys when using redis/memcached
  [FrameworkBundle] Revert destination file change for secrets:decrypt-to-local
  [Process] Ignore invalid env var names
2026-01-09 12:56:19 +01:00
Nicolas Grekas e579464d74 [Process] Ignore invalid env var names 2026-01-08 15:20:42 +01:00
Michael Käfer 7ca8dc2d0d Add missing return type for docblock Closure 2025-10-16 13:21:06 +02:00
Nicolas Grekas f24f8f3163 Merge branch '6.4' into 7.3
* 6.4:
  Replace __sleep/wakeup() by __(un)serialize() for throwing and internal usages
2025-09-11 12:12:26 +02:00
Nicolas Grekas 48bad91326 Replace __sleep/wakeup() by __(un)serialize() for throwing and internal usages 2025-09-11 11:57:09 +02:00
Nicolas Grekas 410c833558 Replace __sleep/wakeup() by __(un)serialize() when BC isn't a concern 2025-08-14 11:54:45 +02:00
Nicolas Grekas 8eb6dc555b CS fixes 2025-07-10 10:14:14 +02:00
Jack Worman d22c732186 [Process] Improve typing for process callback 2025-06-04 15:50:27 +02:00
Nicolas Grekas ed2c64519a Merge branch '7.2' into 7.3
* 7.2:
  [Process] Fix process status tracking
  Prevent empty request body stream in HttplugClient and Psr18Client
  [Lock] Fix Predis error handling
  [HttpClient] Fix buffering AsyncResponse with no passthru
  [TypeInfo] Fix promoted property phpdoc reading
  [HttpClient] Fix retrying requests with Psr18Client and NTLM connections
  [HttpClient] Fix uploading files > 2GB
  [Mime] use isRendered method to avoid rendering an email twice
2025-02-04 15:25:52 +01:00
Nicolas Grekas 26a081982d Merge branch '6.4' into 7.2
* 6.4:
  [Process] Fix process status tracking
  [HttpClient] Fix buffering AsyncResponse with no passthru
  [HttpClient] Fix uploading files > 2GB
  [Mime] use isRendered method to avoid rendering an email twice
2025-02-04 15:21:00 +01:00
Nicolas Grekas 7a1c12e87b [Process] Fix process status tracking 2025-02-04 14:35:48 +01:00
Dariusz Ruminski 724e6c68cc chore: PHP CS Fixer fixes 2024-12-12 07:45:37 +01:00
Nicolas Grekas f2f5bb98e1 Merge branch '7.1' into 7.2
* 7.1:
  Do not read from argv on non-CLI SAPIs
  [Process] Use %PATH% before %CD% to load the shell on Windows
  [HttpFoundation] Reject URIs that contain invalid characters
  [HttpClient] Filter private IPs before connecting when Host == IP
2024-11-05 17:46:43 +01:00
Nicolas Grekas 66716d3126 Merge branch '6.4' into 7.1
* 6.4:
  Do not read from argv on non-CLI SAPIs
  [Process] Use %PATH% before %CD% to load the shell on Windows
  [HttpFoundation] Reject URIs that contain invalid characters
  [HttpClient] Filter private IPs before connecting when Host == IP
2024-11-05 17:45:54 +01:00
Nicolas Grekas 88638b90e7 Merge branch '5.4' into 6.4
* 5.4:
  Do not read from argv on non-CLI SAPIs
  [Process] Use %PATH% before %CD% to load the shell on Windows
  [HttpFoundation] Reject URIs that contain invalid characters
  [HttpClient] Filter private IPs before connecting when Host == IP
2024-11-05 17:39:55 +01:00
Nicolas Grekas ee7598479a security #cve-2024-51736 [Process] Use %PATH% before %CD% to load the shell on Windows (nicolas-grekas)
This PR was merged into the 5.4 branch.
2024-11-05 16:56:23 +01:00
Nicolas Grekas 4b3cae7b39 minor #58710 [Process] On Windows, don't rely on the OS to find executables (nicolas-grekas)
This PR was merged into the 7.2 branch.

Discussion
----------

[Process] On Windows, don't rely on the OS to find executables

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Porting part of https://github.com/composer/composer/pull/12180 here:

On Windows, when searching for an executable, the OS always looks at the current directory before using the PATH variable. This makes it easier than desired to hijack executables. Unix-like OSes don't have this issue.

This PR proposes to rely on ExecutableFinder instead.

Commits
-------

b35a7d42931 [Process] On Windows, don't rely on the OS to find executables
2024-11-04 16:44:54 +01:00
Nicolas Grekas 05c2ccc705 [Process] Use %PATH% before %CD% to load the shell on Windows 2024-11-04 16:32:16 +01:00
Nicolas Grekas 8b1744ee82 Merge branch '7.1' into 7.2
* 7.1:
  [Validator] Fix 58691 (missing plural-options in serbian language translation)
  profiler form data collector extart value property if it is setted
  [Process] Fix escaping /X arguments on Windows
  fix the constant being used
  fix the path separator being used
  fix the directory separator being used
  ignore case of built-in cmd.exe commands
  [Process] Improve test cleanup by unlinking in a `finally` block
  [Notifier] Fix test with hard coded date in `SmsboxTransportTest`
  [Process] Return built-in cmd.exe commands directly in ExecutableFinder
  Re-add missing Profiler shortcuts on Profiler homepage
  [Config] Handle Phar absolute path in `FileLocator`
  [Runtime] Remove unused `SKIPIF` from `dotenv_overload.phpt`
2024-11-04 12:36:24 +01:00
Nicolas Grekas f4fb6b85c0 Merge branch '6.4' into 7.1
* 6.4:
  [Validator] Fix 58691 (missing plural-options in serbian language translation)
  profiler form data collector extart value property if it is setted
  [Process] Fix escaping /X arguments on Windows
  [Config] Handle Phar absolute path in `FileLocator`
  [Runtime] Remove unused `SKIPIF` from `dotenv_overload.phpt`
2024-11-04 12:34:07 +01:00
Nicolas Grekas 0776b9944b Merge branch '5.4' into 6.4
* 5.4:
  [Validator] Fix 58691 (missing plural-options in serbian language translation)
  profiler form data collector extart value property if it is setted
  [Process] Fix escaping /X arguments on Windows
  [Config] Handle Phar absolute path in `FileLocator`
2024-11-04 12:33:53 +01:00
Nicolas Grekas d94dda5a49 [Process] Fix escaping /X arguments on Windows 2024-11-04 11:57:54 +01:00
Nicolas Grekas 18f50a7e1a [Process] On Windows, don't rely on the OS to find executables 2024-10-30 23:11:09 +01:00
Alexander M. Turek 8f32ef92cd Merge branch '7.1' into 7.2
* 7.1:
  Mitigate PHPUnit deprecations
  [TwigBundle] Add support for resetting globals between HTTP requests
  [Process] Fix backwards compatibility for invalid commands
  Mitigate PHPUnit deprecations
  [Cache] Fix compatibility with Redis 6.1.0 pre-releases
  [Validator] Add Catalan and Spanish translation for `Week` constraint
  Don't use is_resource() on non-streams
  [Ldap] Fix extension deprecation
2024-09-08 14:34:00 +02:00
Alexander M. Turek d704e3066d Merge branch '6.4' into 7.1
* 6.4:
  Mitigate PHPUnit deprecations
  [TwigBundle] Add support for resetting globals between HTTP requests
  Mitigate PHPUnit deprecations
  [Cache] Fix compatibility with Redis 6.1.0 pre-releases
  [Validator] Add Catalan and Spanish translation for `Week` constraint
  Don't use is_resource() on non-streams
  [Ldap] Fix extension deprecation
2024-09-08 14:32:26 +02:00
Alexander M. Turek 8c567a2dd2 Merge branch '5.4' into 6.4
* 5.4:
  Mitigate PHPUnit deprecations
  [TwigBundle] Add support for resetting globals between HTTP requests
  [Validator] Add Catalan and Spanish translation for `Week` constraint
  Don't use is_resource() on non-streams
  [Ldap] Fix extension deprecation
2024-09-08 14:30:05 +02:00
Martin Auswöger 82d962eed8 [Process] Fix backwards compatibility for invalid commands 2024-09-06 11:41:03 +02:00
Nicolas Grekas 32354f6248 Don't use is_resource() on non-streams 2024-09-05 18:13:22 +02:00
Christian Flothmann bb0a8b7772 replace uniqid() with random_bytes() to create identifiers 2024-07-29 08:33:22 +02:00
Alexander M. Turek 6f5cb98173 Prefix all sprintf() calls 2024-06-20 17:52:34 +02:00
Fabien Potencier 56c8a1ea51 Merge branch '7.0' into 7.1
* 7.0:
  [Serializer] Improve exception message in UnwrappingDenormalizer
  [PropertyInfo] Update DoctrineExtractor for new DBAL 4 BIGINT type
  Update security.nl.xlf
  [Validator] IBAN Check digits should always between 2 and 98
  [Security] Populate translations for trans-unit 20
  add missing plural translation messages
  filter out empty HTTP header parts
  [String] Fix folded in compat mode
  Remove calls to `getMockForAbstractClass()`
  [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode
  [Serializer] Fix type for missing property
  add test for JSON response with null as content
  [Filesystem] Fix dumpFile `stat failed` error hitting custom handler
  Return false in isTtySupported() when open_basedir restrictions prevent access to /dev/tty.
  Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder`
  [PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10
2024-05-17 12:55:18 +02:00
Fabien Potencier 820da2d703 Merge branch '6.4' into 7.0
* 6.4:
  [Serializer] Improve exception message in UnwrappingDenormalizer
  [PropertyInfo] Update DoctrineExtractor for new DBAL 4 BIGINT type
  Update security.nl.xlf
  [Validator] IBAN Check digits should always between 2 and 98
  [Security] Populate translations for trans-unit 20
  add missing plural translation messages
  filter out empty HTTP header parts
  [String] Fix folded in compat mode
  Remove calls to `getMockForAbstractClass()`
  [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode
  [Serializer] Fix type for missing property
  add test for JSON response with null as content
  [Filesystem] Fix dumpFile `stat failed` error hitting custom handler
  Return false in isTtySupported() when open_basedir restrictions prevent access to /dev/tty.
  Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder`
  [PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10
2024-05-17 12:51:16 +02:00
Marc Jauvin 1393de6f06 Return false in isTtySupported() when open_basedir restrictions prevent access to /dev/tty.
If open_basedir restrictions are in effect, checking if the file /dev/tty is writable will prevent setting tty mode on the process, and avoid failing to create a Process.
2024-05-07 13:49:07 -04:00
Joel Wurtz 8e99b1b15d fix(process): don't call sigprocmask if there is no ignored signals 2024-04-05 11:28:19 +02:00
Joel Wurtz 14730a20ed feat(process): allow to ignore signals when executing a process 2024-04-05 10:07:33 +02:00
Alexander M. Turek 1c0721ae28 Merge branch '7.0' into 7.1
* 7.0:
  [VarExporter] Uniform unitialized property error message under ghost and non-ghost objects
  [AssetMapper] Ignore comment lines in JavaScriptImportPathCompiler
  Update configuration path in help message
  [Validator] Review Albanian translation
  [Process] Fix Inconsistent Exit Status in proc_get_status for PHP Versions Below 8.3
  [Validator] Update Czech (cz) translation
  Sync translations
  [Mailer][Postmark][Webhook] Make allowed IPs configurable
  Review portuguese translations
  [Validator] Fix fields without constraints in `Collection`
  deal with fields for which no constraints have been configured
  [DomCrawler] [Form] Fix the exclusion of <template>
2024-02-12 12:15:20 +01:00
Alexander M. Turek 8d6be7c4a7 Merge branch '6.4' into 7.0
* 6.4:
  [VarExporter] Uniform unitialized property error message under ghost and non-ghost objects
  [AssetMapper] Ignore comment lines in JavaScriptImportPathCompiler
  Update configuration path in help message
  [Validator] Review Albanian translation
  [Process] Fix Inconsistent Exit Status in proc_get_status for PHP Versions Below 8.3
  [Validator] Update Czech (cz) translation
  Sync translations
  [Mailer][Postmark][Webhook] Make allowed IPs configurable
  Review portuguese translations
  [Validator] Fix fields without constraints in `Collection`
  deal with fields for which no constraints have been configured
  [DomCrawler] [Form] Fix the exclusion of <template>
2024-02-12 12:15:03 +01:00
Alexander M. Turek d4fd4a807b Merge branch '5.4' into 6.4
* 5.4:
  Update configuration path in help message
  [Validator] Review Albanian translation
  [Process] Fix Inconsistent Exit Status in proc_get_status for PHP Versions Below 8.3
  [Validator] Update Czech (cz) translation
  Sync translations
  Review portuguese translations
  [Validator] Fix fields without constraints in `Collection`
  deal with fields for which no constraints have been configured
2024-02-12 12:14:32 +01:00
Lucas Bustamante 7e2c857ee8 [Process] Fix Inconsistent Exit Status in proc_get_status for PHP Versions Below 8.3 2024-02-09 10:35:48 +01:00
Nicolas Grekas bf2a95a354 Merge branch '7.0' into 7.1
* 7.0:
  List CS fix in .git-blame-ignore-revs
  Fix implicitly-required parameters
  minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench)
  Fix bad merge
  List CS fix in .git-blame-ignore-revs
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
  [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2024-01-23 16:06:13 +01:00
Nicolas Grekas 937a195147 Merge branch '6.4' into 7.0
* 6.4:
  Fix implicitly-required parameters
  minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench)
  Fix bad merge
  List CS fix in .git-blame-ignore-revs
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
  [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2024-01-23 16:02:46 +01:00
Nicolas Grekas 31642b0818 Merge branch '6.3' into 6.4
* 6.3:
  minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench)
  Fix bad merge
  List CS fix in .git-blame-ignore-revs
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
2024-01-23 15:51:35 +01:00