727 Commits

Author SHA1 Message Date
Nicolas Grekas e0a87c9a60 Merge branch '6.4' into 7.2
* 6.4:
  -
  CS fixes
2025-07-10 10:29:33 +02:00
Nicolas Grekas 8eb6dc555b CS fixes 2025-07-10 10:14:14 +02: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
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
Nicolas Grekas 6c5eceb885 Merge branch '5.4' into 6.3
* 5.4:
  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 15:35:58 +01:00
Nicolas Grekas cbc28e3401 Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value 2024-01-23 14:51:25 +01:00
Martin Auswöger 11ab5d7c99 [Process] Pass the commandline as array to proc_open() 2023-11-21 14:46:23 +01:00
Nicolas Grekas 5610deee80 Merge branch '6.4' into 7.0
* 6.4: (28 commits)
  [Serializer] Fix `@method` annotation
  fix compatibility with Doctrine DBAL 4
  ensure string type with mbstring func overloading enabled
  [HttpKernel] Fix quotes expectations in tests
  [Validator] updated Greek translation
  [Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL
  [HttpClient][WebProfilerBundle] Do not generate cURL command when files are uploaded
  render newline in front of all script elements
  fix test fixture
  fix tests
  [Cache] Fix property types in PdoAdapter
  PHP files cannot be executable without shebang
  [TwigBridge] Mark CodeExtension as @internal
  Remove full DSNs from exception messages
  [Yaml] Fix uid binary parsing
  Disable the "Copy as cURL" button when the debug info are disabled
  [HttpClient] Replace `escapeshellarg` to prevent overpassing `ARG_MAX`
  Fix missing `profile` option for console commands
  [HttpFoundation][Lock] Makes MongoDB adapters usable with `ext-mongodb` only
  [HttpKernel] Preventing error 500 when function putenv is disabled
  ...
2023-11-07 11:26:03 +01:00
Martin Auswöger 0f2afc8bf3 [Process] Remove dead code from Process 2023-11-01 13:39:25 +01:00
Nicolas Grekas 3411cf996b Merge branch '6.4' into 7.0
* 6.4:
  [Process] remove fixing of legacy bug, when PTS functionality is enabled
  DX: re-apply self_accessor and phpdoc_types_order by PHP CS Fixer
  [HttpClient] Psr18Client: parse HTTP Reason Phrase for Response
  fix test
  Fix wrong yaml parse null test
  [AssetMapper] Fixing merge from multiple PR's
  Bump Symfony version to 5.4.31
  Update VERSION for 5.4.30
  Update CONTRIBUTORS for 5.4.30
  Update CHANGELOG for 5.4.30
  Fix wrong merge
  [AssetMapper] Allowing circular references in JavaScriptImportPathCompiler
  [AssetMapper] Fix file deleting errors & remove nullable MappedAsset on JS import
  [Lock] Fix mongodb extension requirement in tests
  [Yaml] Remove dead code
  [AssetMapper] Fix in-file imports to resolve via filesystem
  throw better exception in TranslatableNormalizer, add to changelog
  Passing null to Inline::parse is not allowed
  Fix passing null to trim()
2023-10-29 13:50:44 +01:00
a.dmitryuk 12f9ebe6c1 [Process] remove fixing of legacy bug, when PTS functionality is enabled 2023-10-29 13:46:52 +01:00
Nicolas Grekas acdafc70bf Merge branch '6.4' into 7.0
* 6.4: (33 commits)
  [Console][FrameworkBundle][HttpKernel][WebProfilerBundle] Enable profiling commands
  [AssetMapper] Disable profiler when the "dev server" respond
  Adds translations for Portuguese (pt)
  [AssetMapper] Link needs as="style"
  Allow Symfony 7.0 on Phrase translation provider
  [Mime] Throw InvalidArgumentException on invalid form field type inside array
  [Mailer][Bridges] Allow Symfony 7
  [Tests] Use `JsonMockResponse` where applicable
  [FrameworkBundle][HttpKernel] Introduce `$buildDir` argument to `WarmableInterface::warmup` to warm read-only artefacts in `build_dir`
  [ErrorHandler] Fix expected missing return types
  [Form] Fix merging params & files when "multiple" is enabled
  [HttpFoundation] Do not swallow trailing `=` in cookie value
  Fix markdown in README files
  Handle Sendinblue error responses without a message key
  Handle Brevo error responses without a message key
  [Scheduler] Add failureEvent
  [Notifier][Bridges] Allow Symfony 7
  [Mailer][Brevo][Sendinblue] Fix typo
  [Serializer] Fix collecting only first missing constructor argument
  [ErrorHandler] Fix file link format call in trace view
  ...
2023-10-17 15:48:31 +02:00
Ryan Weaver b8f2424f05 [Process] Fix bug where $this->callback is never null, resulting in bad argument 2023-10-16 22:23:34 +02:00
Nicolas Grekas 1301c346f4 Merge branch '6.4' into 7.0
* 6.4:
  [Process] Fix silencing `wait` when using a sigchild-enabled binary
  [Process] fix tests
2023-08-07 12:41:48 +02:00
Nicolas Grekas 7edc2f8e67 Merge branch '6.3' into 6.4
* 6.3:
  [Process] Fix silencing `wait` when using a sigchild-enabled binary
  Add before/after examples to 6.3 UPGRADE guide
2023-08-07 12:40:33 +02:00
Nicolas Grekas 0b5c29118f Merge branch '5.4' into 6.3
* 5.4:
  [Process] Fix silencing `wait` when using a sigchild-enabled binary
2023-08-07 12:39:22 +02:00
Nicolas Grekas 45261e1fcc [Process] Fix silencing wait when using a sigchild-enabled binary 2023-08-07 12:36:04 +02:00
Nicolas Grekas 8d97ce8ed8 Add types to public and protected properties 2023-07-27 18:29:09 +02:00
Nicolas Grekas 3d4d04862a Merge branch '6.4' into 7.0
* 6.4:
  Ensure all properties have a type
2023-07-27 12:11:00 +02:00
Nicolas Grekas 0d38e48b5e Ensure all properties have a type 2023-07-27 12:10:14 +02:00