Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: symfony/console
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.4.6
Choose a base ref
...
head repository: symfony/console
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.0.0
Choose a head ref

Commits on May 23, 2023

  1. Copy the full SHA
    b3c9b7f View commit details

Commits on May 25, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [5.4] Allow PhpUnitBridge v7
      [Console] block input stream if needed When the input stream used in the question helper is not blocking, the default value is always used as the stream return false. In order to fix that, we force the stream to be in blocking state and go back to the old state after so other logic is not impacted by this change
    nicolas-grekas committed May 25, 2023
    Copy the full SHA
    c7548b3 View commit details

Commits on May 26, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [HttpKernel] conflict with VarDumper < 6.3
      [DependencyInjection] Revert "Use weak references in the container"
      [AssetMapper] Using a separate logger channel
      [Console] Fix PHP Doc of InputArgument
    nicolas-grekas committed May 26, 2023
    Copy the full SHA
    63f6a76 View commit details

Commits on May 30, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4: (27 commits)
      [Filesystem] Follow symlinks when dumping files
      [Security] Add clock dependency to OidcTokenHandler
      [DependencyInjection] Escape `%` from parameter-like default values
      [SecurityBundle] add missing xsd definition for OIDC
      [FrameworkBundle] remove support for preloading ESM modules using headers
      Fix tests
      [SecurityBundle] Fix configuring OIDC user info token handler client
      [Notifier] Fix ContactEveryoneOptions
      CS fix
      [FrameworkBundle][PhpUnitBridge] Configure doctrine/deprecations as expected
      [HttpKernel] Fix default value ignored with pinned resolvers
      Fix unable to use asset mapper with CSP
      Fix Typos
      Ignore definitions bearing the `container.excluded` tag
      Bump Symfony version to 6.3.0
      Update VERSION for 6.3.0-RC2
      Update CHANGELOG for 6.3.0-RC2
      Bump Symfony version to 6.2.12
      Update VERSION for 6.2.11
      Update CHANGELOG for 6.2.11
      ...
    nicolas-grekas committed May 30, 2023
    Copy the full SHA
    1354b73 View commit details

Commits on Jun 21, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4: (32 commits)
      [Validator] Add missing validator translations in Polish language
      [FrameworkBundle][Workflow] Add metadata dumping support for GraphvizDumper
      [HttpClient] Fix encoding some characters in query strings
      [HttpKernel] make RequestPayloadValueResolver:resolve() throw on variadic argument
      Fix typos
      Added redlink notifier
      [SecurityBundle] Remove last usages of tag `security.remember_me_aware`
      [VarDumper] Dumping DateTime throws error if getTimezone is false
      [DependencyInjection] Deprecate `ContainerAwareInterface`, `ContainerAwareTrait` and `ContainerAwareLoader`
      Only update autoload_runtime.php when it changed
      [Routing] Fix version in CHANGELOG
      [Console] Aligned multiline text in vertical table
      Fix README
      [Notifier] add Ntfy bridge
      [FrameworkBundle] Fix secrets:list not displaying local vars
      [Intl] Update the ICU data to 73.2
      [DoctrineBridge] add missing UPGRADE notes for #50689
      [HttpClient] Force int conversion for floated multiplier for GenericRetryStrategy
      [Security] Fix log message in OidcTokenHandler
      [Notifier] Add Novu bridge
      ...
    nicolas-grekas committed Jun 21, 2023
    Copy the full SHA
    65c135a View commit details

Commits on Jun 24, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [FrameworkBundle] Fixed parsing new JSON output of debug:config not possible
      [DependencyInjection] Skip errored definitions deep-referenced as runtime exceptions
      [AssetMapper] Allow DirectoryResource for cache
      [Console] Improve OutputInterface PHPDoc
      [PhpUnitBridge] Require PHPUnit 9.6 by default
      [WebProfilerBundle] Fix the accessibility of some background color
      Improve return type of `getProvidedServices` in `ServiceProviderInterface`
      [HttpKernel] Nullable and default value arguments in RequestPayloadValueResolver
      [WebProfilerBundle] right blocks: fix display
      [Messenger] Preserve existing Doctrine schema
      [Serializer] Refactor tests to not extends ObjectNormalizer
      [Validator] Allow single constraint to be passed to the `constraints` option of the `When` constraint
      [HttpFoundation] Make Request::getPayload() return an empty InputBag if request body is empty
      [HttpClient] Explicitly exclude CURLOPT_POSTREDIR
      [FrameworkBundle] Fix setting decorated services during tests
      [Validator] Allow single integer for the `versions` option of the `Uuid` constraint
    nicolas-grekas committed Jun 24, 2023
    Copy the full SHA
    3162f90 View commit details

Commits on Jun 30, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      Add missing return types and enforce return types on all methods
      [ErrorHandler] Do not use ContextAwareNormalizerInterface anymore
      [6.4] Fix various `@psalm-return` annotations
      [WebProfilerBundle] Split and refactor all the JavaScript code
      [HttpClient] Allow custom working directory in TestHttpServer
      Remove ExpectDeprecationTrait where it is not used
      Remove BC layer for HttpFoundation < 6.1
      [Routing] Prevent duplicated methods and schemes in Route
      [DependencyInjection] Add `defined` prefix for env var processor
      🐛 (kernel) when configuring the container add services with php ext
      deprecate using date and time types with date objects with not-matching timezones
    nicolas-grekas committed Jun 30, 2023
    Copy the full SHA
    33dd6ab View commit details
  2. Copy the full SHA
    28424b5 View commit details

Commits on Jul 3, 2023

  1. Copy the full SHA
    f351fd9 View commit details

Commits on Jul 5, 2023

  1. Copy the full SHA
    14816cd View commit details
  2. Copy the full SHA
    8b83b2f View commit details
  3. Copy the full SHA
    280bf76 View commit details

Commits on Jul 12, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [PhpUnitBridge] Kill the last concurrent process when it stales for more than 60s
      [Intl] fix test
      [Intl] Use VarExporter::export() in PhpBundleWriter
      [Console] The application also catch `\Throwable` exceptions
      FrameworkBundle] Fix tests
      [Mailer] Fix Brevo transport factory registration
      Simplify tests
      [Notifier] Fix Esendex messages serialization
      Use triggering class to generate baseline for deprecation messages from DebugClassLoader
      [Security] Fix false-string handling in RememberMeAuthenticator
      [CssSelector] Tests on Xpath translator will always pass
      [Serializer] Fix Normalizer not utilizing converted name for index variadic param
      [DepdencyInjection] Fix costly logic when checking errored definitions
      Fix merge
      fix children cond
      [DoctrineBridge] Load refreshed user proxy
      [DependencyInjection] Don't ignore attributes on the actual decorator
      [FrameworkBundle] Prevent `cache:clear` to lose files on subsequent runs
    nicolas-grekas committed Jul 12, 2023
    Copy the full SHA
    d2c963b View commit details

Commits on Jul 19, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      Fix deprecations on PHP 8.3
      [WebProfilerBundle] Fix error in case of 'Content-Type' set null in dev environment with no debug
      [Messenger] Deprecate `StopWorkerOnSignalsListener`
      [Form] Remove duplicated attr option in FormType
      [Routing] Use vsprintf instead of sprintf + unpacking
      [DependencyInjection] Fix fetching lazy non-shared services multiple times with as files true
    nicolas-grekas committed Jul 19, 2023
    Copy the full SHA
    254ac76 View commit details

Commits on Jul 25, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      Use typed properties in tests as much as possible
    nicolas-grekas committed Jul 25, 2023
    Copy the full SHA
    c53d8be View commit details
  2. Merge branch '6.4' into 7.0

    * 6.4:
      fix typo
      Add types to private and internal properties
      [Workflow] Cleaning code
      [Scheduler] Fix NPE in debug:scheduler command
    nicolas-grekas committed Jul 25, 2023
    Copy the full SHA
    fe917df View commit details

Commits on Jul 27, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      Ensure all properties have a type
    nicolas-grekas committed Jul 27, 2023
    Copy the full SHA
    b028728 View commit details
  2. Copy the full SHA
    bd8840e View commit details

Commits on Jul 30, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4: (99 commits)
      [HttpClient][Messenger] add `PingWebhookMessage` and `PingWebhookMessageHandler`
      Use Stringable interface as much as possible
      [Messenger][Process] add `RunProcessMessage` and `RunProcessMessageHandler`
      Add generics to the progress bar iteration methods
      [SecurityBundle] Allow an array of `pattern` in firewall configuration
      [FrameworkBundle] Simplify marking store configuration
      [PsrHttpMessageBridge] Patch return types and fix CS
      [PsrHttpMessageBridge] Import the bridge into the monorepo
      Prepare release 2.3.1
      Fix CS
      Don't rely on Request::getPayload() to populate the parsed body
      Prepare release 2.3.0
      Implement ValueResolverInterface
      Leverage `Request::getPayload()` to populate the parsed body of PSR-7 requests
      Add native types where possible
      cs fix
      Prepare the 2.2.0 release
      Bump psr/http-message version
      Drop support for Symfony 4
      Adjustments for PHP CS Fixer 3
      ...
    derrabus committed Jul 30, 2023
    Copy the full SHA
    8159c1a View commit details

Commits on Jul 31, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      Fix symfony/deprecation-contracts require
      [Console][Messenger] add `RunCommandMessage` and `RunCommandMessageHandler`
      Allow accessing all options on a handler descriptor
      [Notifier] [SpotHit] Support `smslong` and `smslongnbr` API parameters
      Remove 6.2 from the list of potential branch targets
      Bump Symfony version to 6.3.3
      Update VERSION for 6.3.2
      Update CHANGELOG for 6.3.2
      Bump Symfony version to 5.4.27
      Update VERSION for 5.4.26
      Update CONTRIBUTORS for 5.4.26
      Update CHANGELOG for 5.4.26
      Fix update slack messages documentation
      Fix symfony/deprecation-contracts require
      [Scheduler] Postpone schedule creation
      [VarDumper] Dump uninitialized properties
      [HttpKernel] Enhance exception if possible
      [Validator] Update `Type` constraint, add `number`, `finite-float` and `finite-number` validations
    nicolas-grekas committed Jul 31, 2023
    Copy the full SHA
    b52b2c1 View commit details

Commits on Aug 12, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [Notifier][Webhook] Add Vonage support
      [Notifier] Add GoIP bridge
      [Workflow] Use TRANSITION_TYPE_WORKFLOW for rendering workflow in profiler
      Remove unneeded calls to setPublic(false)
    fabpot committed Aug 12, 2023
    Copy the full SHA
    71fed73 View commit details

Commits on Aug 14, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      More go-ip fixes
      [AssetMapper] Fixing bug where a circular exception could be thrown while making error message
      Dump Valid constaints on debug command #46544
      [DependencyInjection] fix dump xml with array/object/enum default value
      fix directory casing
      rename GoIP notifier bridge to GopIp
      [HttpFoundation] Add a slightly more verbose comment about a warning on UploadedFile
      [Messenger] BatchHandlerTrait - fix phpdoc typo
      [SecurityBundle] Remove unused test files
      Allow passing an `inline_service` to a `service_locator`
      [Security] Fix error with lock_factory in login_throttling
      fix(console): fix section output when multiples section with max height
      Remove me from CODEOWNERS
      Fix invalid method call + improve exception message
      Always return bool from messenger amqp conncetion nack
      [FrameworkBundle] Fix xsd handle-all-throwables
      [Console] Fix linewraps in OutputFormatter
    nicolas-grekas committed Aug 14, 2023
    Copy the full SHA
    e1a8641 View commit details

Commits on Aug 17, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [FrameworkBundle][Validator] Replace annotation by attribute
      [Validator] Add annotation in Constraint
      [Lock] Add some missing return types in tests
      [Clock] Throw `DateMalformedStringException`/`DateInvalidTimeZoneException` when appropriate
      [VarExporter] Remove unused test files
      [FrameworkBundle] Remove unused test file
      [DependencyInjection] Remove unused test file
      [DomCrawler] Added argument `$default` to method `Crawler::attr()`
      [HttpKernel] Fix missing Request in RequestStack for StreamedResponse
      Psalm: Ignore UnusedClass errors
      fix(console): avoid multiple new line when message already ends with a new line
    nicolas-grekas committed Aug 17, 2023
    Copy the full SHA
    d6a4342 View commit details

Commits on Aug 30, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      Fix CS
      [Workflow] deprecate `GuardEvent::getContext` method
      Update the list of sponsors for Symfony 6.4 🙏
      [AssetMapper] Improve exception message when a downloaded asset is not found
      [Mailer][Smtp] Add DSN param `peer_fingerprint` for fingerprint verification
      [Webhook][RemoteEvent] Add Sendgrid symfony#50704
    fabpot committed Aug 30, 2023
    Copy the full SHA
    6bfa2e5 View commit details

Commits on Sep 10, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [DebugBundle] Remove obsolete VarDumper feature detection
      Remove obsolete DBAL 2 compat code
      Fix for TraceableAuthenticator debug when no Auth
      [TwigBridge] Remove obsolete Workflow feature detection
      [Console] Remove Process::fromShellCommandline() detection
      [TwigBridge] Change return type of Symfony\Bridge\Twig\AppVariable::getSession()
      [mailer] reset $code variable each iteration for prevent wrong codes to be used
      bug [mailer] fix EsmtpTransport variable $code definition
      UrlHelper: minor code style fix
      [Serializer] Looking for DiscriminatorMap on interfaces when the current object also extends from a class
      [DoctrineBridge][Security] Rename loadUserByUsername tests to loadUserByIdentifier
    fabpot committed Sep 10, 2023
    Copy the full SHA
    81db3a4 View commit details

Commits on Sep 27, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4: (32 commits)
      [Validator] Fix registering "is_valid()" for `#[Expression]`
      [Scheduler] Trigger unique messages at runtime
      [Scheduler] Fix CHANGELOG
      [Clock] Add `DatePoint`: an immutable DateTime implementation with stricter error handling and return types
      [Scheduler] Allow modifying the schedule at runtime and recalculate heap
      [Cache] Fix Redis6Proxy
      [Finder] Disable failing test about open_basedir
      Fix merge
      Fix merge
      Minor CS fixes
      Deprecate `Kernel::stripComments()`
      Remove setAccessible reflection call in tests
      [Notifier] Telegram Bridge add escaping for \
      [Component][AssertMapper] add type hint of an argument in asset mapper command
      [Translation] [Phrase] Refacto ReadConfig and WriteConfig into arrays
      [Routing] Fix routing collection defaults when adding a new route to a collection
      [Messenger] Fix cloned TraceableStack not unstacking the stack independently
      [Translation] Add `--as-tree` option  to `translation:pull` command
      [Mime] Allow to add some headers as a strings
      [Translation] Give current locale to locale switcher runWithLocale callback
      ...
    nicolas-grekas committed Sep 27, 2023
    Copy the full SHA
    c3be84f View commit details

Commits on Sep 29, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [AssetMapper] Allow simple, relative paths in importmap.php
      [PropertyInfo] Make isWriteable() more consistent with isReadable() when checking snake_case properties
      [AssetMapper] Add support for CSS files in the importmap
      [Messenger] Add `--all` option to the `messenger:failed:remove` command
      Fix merge
      fix #51235 - fix the order of merging of serializationContext and self::CONTEXT_DENORMALIZE
      [HttpClient] Fix Static Code Analyzer issue with JsonMockResponse
      [Messenger] Fix exiting `FailedMessagesRetryCommand`
      [Serializer] Fix reindex normalizedData array in AbstractObjectNormalizer::denormalize()
      remove an unreachable code branch
      [Validator] Fix `File::$extensions`’ PHPDoc
      [Mime] Fix email (de)serialization issues
      [FrameworkBundle][WebProfilerBundle][Console][Form][HttpKernel][PropertyInfo][Validator] Remove optional before required param
      Replace usages of SkippedTestSuiteError with markTestSkipped() call
      Update InteractiveAuthenticatorInterface description wording to match documentation
      [Serializer] Fix parsing XML root node attributes
      fix parsing of payload timestamp to DateTimeImmutable
      Fix routing to multiple fallback transports
      Fix missing stamps in delayed message handling
      [DoctrineBridge] Ignore invalid stores in `LockStoreSchemaListener` raised by `StoreFactory`
    nicolas-grekas committed Sep 29, 2023
    Copy the full SHA
    5b118f6 View commit details

Commits on Oct 12, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4: (47 commits)
      Sync .github/expected-missing-return-types.diff
      [FrameworkBundle] Add void return-type to ErrorLoggerCompilerPass
      [DoctrineBridge] Fix cross-versions compat
      [HttpKernel] Handle nullable callback of StreamedResponse
      [Mailer] Capitalize sender header for Mailgun
      [FrameworkBundle] Configure `logger` as error logger if the Monolog Bundle is not registered
      DX: PHP CS Fixer - drop explicit nullable_type_declaration_for_default_null_value config, as it's part of ruleset anyway
      DX: PHP CS Fixer - drop explicit no_superfluous_phpdoc_tags config, as it's part of ruleset already
      [DI] Simplify using DI attributes with `ServiceLocator/Iterator`'s
      [FrameworkBundle] Fix registering workflow.registry
      Revert "Add keyword `dev` to leverage composer hint"
      [Validator] Add missing Ukrainian translations #51960
      [Validator] Add missing translations for Indonesian (id)
      [Validator] Add missing translations for Vietnamese (VI)
      Add missing Validator translations - Croatian (hr)
      [HttpFoundation]  Improve PHPDoc of Cache attribute
      [Validator] Add missing Spanish (es) translations #51956
      [Serializer] Add `XmlEncoder::CDATA_WRAPPING` context option
      [Finder] Add early directory prunning filter support
      Add missing dutch translations
      ...
    nicolas-grekas committed Oct 12, 2023
    Copy the full SHA
    41c4d7f View commit details

Commits on Oct 13, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [Console] Dispatch `ConsoleTerminateEvent` when exiting on signal
      [Cache][VarExporter] Fix proxy generation to deal with edgy behaviors of internal classes
      fix detecting the installed FrameworkBundle version
      [Notifier] [Telegram] Fix version and exception signature
      fix tests, partially reverts 1333caf89af4630e03f792c45b62c4dee6b5bf3a
      fix tests
      Fix merge error with ErrorLoggerCompilerPass
    xabbuh committed Oct 13, 2023
    Copy the full SHA
    8eeb12c View commit details

Commits on Oct 17, 2023

  1. 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
      ...
    nicolas-grekas committed Oct 17, 2023
    Copy the full SHA
    d7a88e0 View commit details

Commits on Oct 31, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [Console] Fix horizontal table top border is incorrectly rendered
      [Tests] Streamline
      [AssetMapper] Fixing bug where JSCompiler used non-absolute importmap entry path
      [FrameworkBundle] Fix BC break about enable_annotations in validation and serializer configuration
      [Uid] Fix UuidV7 collisions within the same ms
      [Validator] updated Romanian translation
    nicolas-grekas committed Oct 31, 2023
    Copy the full SHA
    df1b3ee View commit details
  2. Merge branch '6.4' into 7.0

    * 6.4:
      fix typo
      remove the WriteConfig class
      DX: PHP CS Fixer - keep Annotation,NamedArgumentConstructor,Target annotations as single group
      do not install FrameworkBundle 6.4
      [Tests] Add `array` return type for provider methods
      [Tests] Move expectException closer to the place of the expectation to avoid false positives
    xabbuh committed Oct 31, 2023
    Copy the full SHA
    cc1dcd4 View commit details

Commits on Nov 7, 2023

  1. 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
      ...
    nicolas-grekas committed Nov 7, 2023
    Copy the full SHA
    d2607da View commit details

Commits on Nov 20, 2023

  1. Merge branch '6.4' into 7.0

    * 6.4:
      [FrameworkBundle] Add TemplateController to the list of allowed controllers for fragments
      [Cache][Lock] Fix PDO store not creating table + add tests
      Closes #51936-Added Missing translations for Czech (cs) in validators.cs.xlf file
      Added missing translations in turkish and updated validators.tr.xlf
      [Serializer] Fix denormalizing date intervals having both weeks and days
      [Validator] updated Turkish translation
      [Serializer] Remove wrong final tags
      [Serializer] Fix denormalize constructor arguments
      Add some more non-countable English nouns
      Add hint that changing input arguments has no effect
      register the virtual request stack together with common profiling services
      Don't lose checkpoint state when lock is acquired from another
      [DomCrawler] Revert "bug #52579 UriResolver support path with colons"
      [VarExporter] Fix handling mangled property names returned by __sleep()
      Update Github template for 7.1
      Fix memory limit in PhpSubprocess unit test
    nicolas-grekas committed Nov 20, 2023
    Copy the full SHA
    64e0678 View commit details
Showing with 221 additions and 805 deletions.
  1. +19 −66 Application.php
  2. +8 −0 CHANGELOG.md
  3. +12 −69 Command/Command.php
  4. +0 −11 Command/CompleteCommand.php
  5. +0 −10 Command/DumpCompletionCommand.php
  6. +2 −8 Command/HelpCommand.php
  7. +3 −8 Command/LazyCommand.php
  8. +1 −4 Command/ListCommand.php
  9. +1 −3 Command/SignalableCommandInterface.php
  10. +1 −4 DependencyInjection/AddConsoleCommandPass.php
  11. +1 −4 Descriptor/DescriptorInterface.php
  12. +1 −1 Event/ConsoleEvent.php
  13. +2 −8 EventListener/ErrorListener.php
  14. +2 −8 Formatter/NullOutputFormatterStyle.php
  15. +3 −12 Formatter/OutputFormatter.php
  16. +2 −6 Formatter/OutputFormatterInterface.php
  17. +5 −26 Formatter/OutputFormatterStyle.php
  18. +5 −15 Formatter/OutputFormatterStyleInterface.php
  19. +2 −6 Formatter/OutputFormatterStyleStack.php
  20. +1 −3 Formatter/WrappableOutputFormatterInterface.php
  21. +1 −3 Helper/DescriptorHelper.php
  22. +5 −20 Helper/Helper.php
  23. +2 −6 Helper/HelperInterface.php
  24. +1 −4 Helper/HelperSet.php
  25. +2 −5 Helper/InputAwareHelper.php
  26. +5 −15 Helper/ProgressIndicator.php
  27. +3 −9 Helper/QuestionHelper.php
  28. +2 −8 Helper/SymfonyQuestionHelper.php
  29. +3 −7 Helper/Table.php
  30. +2 −8 Input/ArgvInput.php
  31. +1 −4 Input/ArrayInput.php
  32. +11 −30 Input/Input.php
  33. +1 −6 Input/InputArgument.php
  34. +1 −3 Input/InputAwareInterface.php
  35. +7 −21 Input/InputDefinition.php
  36. +14 −26 Input/InputInterface.php
  37. +1 −7 Input/InputOption.php
  38. +1 −3 Input/StreamableInputInterface.php
  39. +0 −4 Input/StringInput.php
  40. +1 −4 Output/BufferedOutput.php
  41. +4 −16 Output/ConsoleOutput.php
  42. +1 −4 Output/ConsoleOutputInterface.php
  43. +3 −10 Output/ConsoleSectionOutput.php
  44. +5 −20 Output/NullOutput.php
  45. +6 −23 Output/Output.php
  46. +5 −16 Output/OutputInterface.php
  47. +1 −4 Output/StreamOutput.php
  48. +1 −4 Output/TrimmedBufferOutput.php
  49. +3 −12 Question/Question.php
  50. +7 −28 Style/OutputStyle.php
  51. +14 −42 Style/StyleInterface.php
  52. +21 −79 Style/SymfonyStyle.php
  53. +0 −53 Tests/Command/CommandTest.php
  54. +0 −13 Tests/EventListener/ErrorListenerTest.php
  55. +15 −16 composer.json
85 changes: 19 additions & 66 deletions Application.php
Original file line number Diff line number Diff line change
@@ -111,10 +111,7 @@ public function setDispatcher(EventDispatcherInterface $dispatcher): void
$this->dispatcher = $dispatcher;
}

/**
* @return void
*/
public function setCommandLoader(CommandLoaderInterface $commandLoader)
public function setCommandLoader(CommandLoaderInterface $commandLoader): void
{
$this->commandLoader = $commandLoader;
}
@@ -128,10 +125,7 @@ public function getSignalRegistry(): SignalRegistry
return $this->signalRegistry;
}

/**
* @return void
*/
public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent)
public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent): void
{
$this->signalsToDispatchEvent = $signalsToDispatchEvent;
}
@@ -224,7 +218,7 @@ public function run(InputInterface $input = null, OutputInterface $output = null
*
* @return int 0 if everything went fine, or an error code
*/
public function doRun(InputInterface $input, OutputInterface $output)
public function doRun(InputInterface $input, OutputInterface $output): int
{
if (true === $input->hasParameterOption(['--version', '-V'], true)) {
$output->writeln($this->getLongVersion());
@@ -327,17 +321,11 @@ public function doRun(InputInterface $input, OutputInterface $output)
return $exitCode;
}

/**
* @return void
*/
public function reset()
public function reset(): void
{
}

/**
* @return void
*/
public function setHelperSet(HelperSet $helperSet)
public function setHelperSet(HelperSet $helperSet): void
{
$this->helperSet = $helperSet;
}
@@ -350,10 +338,7 @@ public function getHelperSet(): HelperSet
return $this->helperSet ??= $this->getDefaultHelperSet();
}

/**
* @return void
*/
public function setDefinition(InputDefinition $definition)
public function setDefinition(InputDefinition $definition): void
{
$this->definition = $definition;
}
@@ -423,10 +408,8 @@ public function areExceptionsCaught(): bool

/**
* Sets whether to catch exceptions or not during commands execution.
*
* @return void
*/
public function setCatchExceptions(bool $boolean)
public function setCatchExceptions(bool $boolean): void
{
$this->catchExceptions = $boolean;
}
@@ -449,10 +432,8 @@ public function isAutoExitEnabled(): bool

/**
* Sets whether to automatically exit after a command execution or not.
*
* @return void
*/
public function setAutoExit(bool $boolean)
public function setAutoExit(bool $boolean): void
{
$this->autoExit = $boolean;
}
@@ -467,10 +448,8 @@ public function getName(): string

/**
* Sets the application name.
*
* @return void
*/
public function setName(string $name)
public function setName(string $name): void
{
$this->name = $name;
}
@@ -485,20 +464,16 @@ public function getVersion(): string

/**
* Sets the application version.
*
* @return void
*/
public function setVersion(string $version)
public function setVersion(string $version): void
{
$this->version = $version;
}

/**
* Returns the long version of the application.
*
* @return string
*/
public function getLongVersion()
public function getLongVersion(): string
{
if ('UNKNOWN' !== $this->getName()) {
if ('UNKNOWN' !== $this->getVersion()) {
@@ -525,10 +500,8 @@ public function register(string $name): Command
* If a Command is not enabled it will not be added.
*
* @param Command[] $commands An array of commands
*
* @return void
*/
public function addCommands(array $commands)
public function addCommands(array $commands): void
{
foreach ($commands as $command) {
$this->add($command);
@@ -540,10 +513,8 @@ public function addCommands(array $commands)
*
* If a command with the same name already exists, it will be overridden.
* If the command is not enabled it will not be added.
*
* @return Command|null
*/
public function add(Command $command)
public function add(Command $command): ?Command
{
$this->init();

@@ -576,11 +547,9 @@ public function add(Command $command)
/**
* Returns a registered command by name or alias.
*
* @return Command
*
* @throws CommandNotFoundException When given command name does not exist
*/
public function get(string $name)
public function get(string $name): Command
{
$this->init();

@@ -683,11 +652,9 @@ public function findNamespace(string $namespace): string
* Contrary to get, this command tries to find the best
* match if you give it an abbreviation of a name or alias.
*
* @return Command
*
* @throws CommandNotFoundException When command name is incorrect or ambiguous
*/
public function find(string $name)
public function find(string $name): Command
{
$this->init();

@@ -795,7 +762,7 @@ public function find(string $name)
*
* @return Command[]
*/
public function all(string $namespace = null)
public function all(string $namespace = null): array
{
$this->init();

@@ -936,10 +903,8 @@ protected function doRenderThrowable(\Throwable $e, OutputInterface $output): vo

/**
* Configures the input and output instances based on the user arguments and options.
*
* @return void
*/
protected function configureIO(InputInterface $input, OutputInterface $output)
protected function configureIO(InputInterface $input, OutputInterface $output): void
{
if (true === $input->hasParameterOption(['--ansi'], true)) {
$output->setDecorated(true);
@@ -1004,7 +969,7 @@ protected function configureIO(InputInterface $input, OutputInterface $output)
*
* @return int 0 if everything went fine, or an error code
*/
protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output): int
{
foreach ($command->getHelperSet() as $helper) {
if ($helper instanceof InputAwareInterface) {
@@ -1038,11 +1003,6 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
// If the command is signalable, we call the handleSignal() method
if (\in_array($signal, $commandSignals, true)) {
$exitCode = $command->handleSignal($signal, $exitCode);
// BC layer for Symfony <= 5
if (null === $exitCode) {
trigger_deprecation('symfony/console', '6.3', 'Not returning an exit code from "%s::handleSignal()" is deprecated, return "false" to keep the command running or "0" to exit successfully.', get_debug_type($command));
$exitCode = 0;
}
}

if (false !== $exitCode) {
@@ -1060,14 +1020,7 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI

foreach ($commandSignals as $signal) {
$this->signalRegistry->register($signal, function (int $signal) use ($command): void {
$exitCode = $command->handleSignal($signal);
// BC layer for Symfony <= 5
if (null === $exitCode) {
trigger_deprecation('symfony/console', '6.3', 'Not returning an exit code from "%s::handleSignal()" is deprecated, return "false" to keep the command running or "0" to exit successfully.', get_debug_type($command));
$exitCode = 0;
}

if (false !== $exitCode) {
if (false !== $exitCode = $command->handleSignal($signal)) {
exit($exitCode);
}
});
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
CHANGELOG
=========

7.0
---

* Add method `__toString()` to `InputInterface`
* Remove `Command::$defaultName` and `Command::$defaultDescription`, use the `AsCommand` attribute instead
* Require explicit argument when calling `*Command::setApplication()`, `*FormatterStyle::setForeground/setBackground()`, `Helper::setHelpSet()`, `Input*::setDefault()` and `Question::setAutocompleterCallback/setValidator()`
* Remove `StringInput::REGEX_STRING`

6.4
---

Loading