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/var-dumper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.2.12
Choose a base ref
...
head repository: symfony/var-dumper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.3.0
Choose a head ref

Commits on Nov 30, 2022

  1. Copy the full SHA
    29da1bc View commit details

Commits on Dec 4, 2022

  1. Merge branch '6.2' into 6.3

    * 6.2: (21 commits)
      prevent the installation of unstable phpdocumentor/type-resolver releases
      Update UPGRADE-6.2.md
      [VarExporter] Fix possible memory-leak when using lazy-objects
      [Framework] Fix Infobip Mailer transport factory import
      [WebProfilerBundle] Fix form panel expanders
      chore: fix typo 'do' verb
      [Twig Bridge] Add PHPdoc information to some email methods
      [TwigBridge] Fix casing of currentRoute/currentRouteParameters methods
      Amend MoneyType twig to include a space.
      [DependencyInjection][ErrorHandler][FrameworkBundle][HttpKernel][TwigBridge] Fix "a" before "URL"
      [FrameworkBundle] Add alximy as backer of v6.2
      Fixed undefined variable error
      [Security] Fix deprecated namespace
      Update UPGRADE-6.2.md
      don't register the MailerTestCommand symfony/console is not installed
      Bump Symfony version to 6.2.1
      Update VERSION for 6.2.0
      Update CHANGELOG for 6.2.0
      [GHA] Fix scorecards
      Convert previously defined date attribute to the expected class
      ...
    xabbuh committed Dec 4, 2022
    Copy the full SHA
    665011c View commit details

Commits on Dec 5, 2022

  1. Copy the full SHA
    5635a62 View commit details
  2. feature #48478 [VarDumper] Add caster for WeakMap (nicolas-grekas)

    This PR was merged into the 6.3 branch.
    
    Discussion
    ----------
    
    [VarDumper] Add caster for WeakMap
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.3
    | Bug fix?      | no
    | New feature?  | yes
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    bde17b7f51 [VarDumper] Add caster for WeakMap
    chalasr committed Dec 5, 2022
    Copy the full SHA
    cecffb5 View commit details

Commits on Dec 9, 2022

  1. Merge branch '6.2' into 6.3

    * 6.2:
      [Clock] fix usleep deprecation warning
      [Cache] sync Redis6Proxy with upstream
      [HttpFoundation] IPv4-mapped IPv6 addresses incorrectly rejected
      Minor (comment only), part 2
      [RateLimiter] Add typecast to Reservation::wait
      chore: fix syntax error
      [FrameworkBundle] add `kernel.locale_aware` tag to `LocaleSwitcher`
      [FrameworkBundle] Remove check of undefined service in mailer assertions
      [VarDumper] Ignore \Error in __debugInfo()
    nicolas-grekas committed Dec 9, 2022
    Copy the full SHA
    cf25d93 View commit details

Commits on Dec 11, 2022

  1. Update types for dd()

    derrabus committed Dec 11, 2022
    Copy the full SHA
    422e4a6 View commit details

Commits on Dec 14, 2022

  1. Merge branch '6.2' into 6.3

    * 6.2: (22 commits)
      [Mailer] Include all transports' debug messages in RoundRobin transport exception
      [FrameworkBundle] fix: fix help message
      Hide excluded services from container debug list
      [Validator] Allow opt-out of EmailValidator deprecation when using Validation::createValidatorBuilder()
      Fix HtmlSanitizer default configuration behavior for allowed schemes
      Use relative timestamps
      [Translation] add tests + fix
      [Cache] Fix dealing with ext-redis' multi/exec returning a bool
      [Messenger][Amqp] Added missing rpc_timeout option
      [Serializer] Prevent GetSetMethodNormalizer from creating invalid magic method call
      [HttpFoundation] Fix dumping array cookies
      [WebProfilerBundle] Fix dump header not being displayed
      TraceableHttpClient: increase decorator's priority
      Use static methods inside data providers
      [FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
      bug #48313 [Mime] Fix MessagePart serialization
      [HttpKernel][ErrorHandler] Fix reading the SYMFONY_IDE env var
      [ErrorHandler][DebugClassLoader] Fix some new return types support
      Fix getting the name of closures on PHP 8.1.11+
      [Translator] Fix typo "internal" / "interval"
      ...
    nicolas-grekas committed Dec 14, 2022
    Copy the full SHA
    f0419c3 View commit details

Commits on Dec 15, 2022

  1. [VarDumper] Add support of named arguments to dd() and dump() to …

    …display the argument name
    alexandre-daubois authored and nicolas-grekas committed Dec 15, 2022
    Copy the full SHA
    0d0fa05 View commit details
  2. feature #48432 [VarDumper] Add support of named arguments to dd() a…

    …nd `dump()` to display a label (alexandre-daubois)
    
    This PR was merged into the 6.3 branch.
    
    Discussion
    ----------
    
    [VarDumper] Add support of named arguments to `dd()` and `dump()` to display a label
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.3
    | Bug fix?      | no
    | New feature?  | yes
    | Deprecations? | no
    | Tickets       | _N/A_
    | License       | MIT
    | Doc PR        | _Todo_
    
    Following an idea from `@nicolas`-grekas, the goal here is to ease debugging with `dd()` and `dump()` by supporting named arguments passed to them. This will display a label, helping understand the goal/meaning of a dump.
    
    **Example in web browser:**
    
    ![image](https://user-images.githubusercontent.com/2144837/205279233-7c250d07-4616-4ed8-907e-b1b3cac9a3f2.png)
    
    **Example in CLI:**
    
    ![image](https://user-images.githubusercontent.com/2144837/205122796-79427c98-48fe-4f11-b2c5-58b51a2fbbf6.png)
    
    The above example is clickable and points to `file:///home/alexandredaubois/PhpstormProjects/dummy_project/src/Command/TestCommand.php#L15`.
    
    No more `dd("First one", $var1, "Second var", $var2);`!
    
    Commits
    -------
    
    2519c5c830 [VarDumper] Add support of named arguments to `dd()` and `dump()` to display the argument name
    nicolas-grekas committed Dec 15, 2022
    Copy the full SHA
    ca4660e View commit details

Commits on Dec 22, 2022

  1. Merge branch '6.2' into 6.3

    * 6.2:
      Fix integration test gha
      Update RedisTrait.php
      Use static methods inside data providers
      [VarExporter] Fix exporting classes with __unserialize() but not __serialize()
      [Validator] Fix IBAN format for Tunisia and Mauritania
      [Workflow] Allow spaces in place names so the PUML dump doesn't break
      [VarExporter] Generate proxies for static abstract methods
      [SecurityBundle] Prevent RuntimeException "Impossible to access an attribute ("security_enabled") on a null variable."
    nicolas-grekas committed Dec 22, 2022
    Copy the full SHA
    0dd4f98 View commit details

Commits on Jan 1, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      Bump LICENSE year
      Bump LICENSE year
      Fix LICENSE year
      Bump license year to 2023
      Fix CS
      Fix CS
    fabpot committed Jan 1, 2023
    Copy the full SHA
    74f03d4 View commit details

Commits on Jan 13, 2023

  1. Copy the full SHA
    6358546 View commit details
  2. minor #48793 Leverage arrow function syntax for closure (tigitz)

    This PR was merged into the 6.3 branch.
    
    Discussion
    ----------
    
    Leverage arrow function syntax for closure
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.3
    | Bug fix?      | no
    | New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
    | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
    | Tickets       | Fix #47658 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
    | License       | MIT
    | Doc PR        | <!-- required for new features -->
    
    Rationale in the RFC [here](https://wiki.php.net/rfc/arrow_functions_v2#introduction)
    
    It's also notable that using arrow function syntax rather than the classic one has been enforced in the past by symfony core member: symfony/symfony#48069 (comment)
    
    So this PR would be consistent.
    
    Commits
    -------
    
    f5802d3a2a Leverage arrow function syntax for closure
    nicolas-grekas committed Jan 13, 2023
    Copy the full SHA
    e271327 View commit details

Commits on Jan 20, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      Update ComposerPlugin.php
      [Notifier] [OvhCloud] handle invalid receiver
      [Security] Return default value instead of deferring to lower prio resolvers when using #[CurrentUser] and no user is found
      [Cache] fix collecting cache stats when nesting computations
      [VarDumper] Fix JS to expand / collapse
      [Validator] Fix Email validator logic
      Fix user_identifier support after username has been deprecated in favor of it.
      [Tests] Remove `$this` occurrences in future static data providers
      [PropertyInfo] Fixes constructor extractor for mixed type
      use method_exists() instead of catching reflection exceptions
    nicolas-grekas committed Jan 20, 2023
    Copy the full SHA
    5e37ad6 View commit details

Commits on Jan 24, 2023

  1. Copy the full SHA
    e169dd4 View commit details

Commits on Jan 26, 2023

  1. Copy the full SHA
    967f55b View commit details

Commits on Feb 2, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      Fix LICENSE year
      Fix LICENSE CI check
      [Notifier] Mention Prisma Media as backer of v6.2
      fixes retrieving multiple values for extra fields
      Clarifies when to update UPGRADE-7.0.md
      [String] Remove duplicates in fold maps
      fail with a meaningful error when a needed package is missing
      [6.2] Remove mentions of v6.1 backers
      [Translation] Crowdin renewed their sponsorship for v6.2
      [DependencyInjection] Fix combinatory explosion when autowiring union and intersection types
      Update license years (last time)
      [Tests] New iteration of removing `$this` occurrences in future static data providers
    fabpot committed Feb 2, 2023
    Copy the full SHA
    4beb1aa View commit details

Commits on Feb 7, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      [VarExporter] Fix lazy-proxying readonly classes on PHP 8.3
    nicolas-grekas committed Feb 7, 2023
    Copy the full SHA
    48796b4 View commit details

Commits on Feb 9, 2023

  1. Use xxh128 instead of md5

    fancyweb committed Feb 9, 2023
    Copy the full SHA
    54f93ba View commit details

Commits on Feb 13, 2023

  1. Add missing PHPdoc return types

    wouterj authored and nicolas-grekas committed Feb 13, 2023
    Copy the full SHA
    129d0c0 View commit details
  2. Copy the full SHA
    20963cf View commit details
  3. Add void return types

    wouterj authored and nicolas-grekas committed Feb 13, 2023
    Copy the full SHA
    bfeaa20 View commit details

Commits on Feb 14, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      Fix merge
      Migrate to `static` data providers using `rector/rector`
    nicolas-grekas committed Feb 14, 2023
    Copy the full SHA
    65479a2 View commit details

Commits on Feb 16, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      CS fix
      Fix test provider
    nicolas-grekas committed Feb 16, 2023
    Copy the full SHA
    8e4629b View commit details

Commits on Feb 23, 2023

  1. Remove unused private methods

    alamirault authored and nicolas-grekas committed Feb 23, 2023
    Copy the full SHA
    4c9dc4d View commit details

Commits on Feb 24, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      fix style of label containing new lines in PUML dump
      [TwigBridge] Allow floats in html5 input type number field
      [Translation] Handle the translation of empty strings
      [VarDumper] Fix error when reflected class has default Enum parameter in constructor
      [FrameworkBundle] Fix denyAccessUnlessGranted for mixed attributes
      [Validator] Fix translation of AtLeastOneOf constraint message
      do not drop embed label classes
      [Validator] Sync IBAN formats with Swift IBAN registry
      Update Infobip API transport to use the API V3
      [String] Use same alphabet for ByteString::fromRandom tests
      Fix phpdocs in components
      Fix the rendering of query explanation with Postgresql
    nicolas-grekas committed Feb 24, 2023
    Copy the full SHA
    5519cc7 View commit details

Commits on Mar 6, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      [Translation] Decouple TranslatorPathsPass from "debug." convention
      [VarDumper] Add a bit of test coverage
      [TwigBridge] Fix flagged malicious url
      [HttpClient] Fix encoding "+" in URLs
      [DependencyInjection] Fix dumping array of enums parameters
      Bump Symfony version to 6.2.8
      Update VERSION for 6.2.7
      Update CHANGELOG for 6.2.7
      Bump Symfony version to 5.4.22
      Update VERSION for 5.4.21
      Update CONTRIBUTORS for 5.4.21
      Update CHANGELOG for 5.4.21
      [Messenger] Fix TransportNamesStamp deserialization
      Removed @internal tag on TraceableAuthenticator::getAuthenticator()
    nicolas-grekas committed Mar 6, 2023
    Copy the full SHA
    9f88ac7 View commit details

Commits on Mar 14, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2:
      Fix some Composer keywords
      [FrameworkBundle] Rename limiter’s `strategy` to `policy` in XSD
      [VarDumper] Fixed dumping of CutStub
      Fix test
      Change limit argument from string to integer.
      [Messenger] Fix `evaluate()` calls in `WorkerTest`
      [Mailer] STDOUT blocks infinitely under Windows when STDERR is filled
    fabpot committed Mar 14, 2023
    Copy the full SHA
    42237ee View commit details

Commits on Mar 20, 2023

  1. [ErrorHandler] Rewrite logic to dump exception properties and fix ser…

    …ializing FlattenException
    nicolas-grekas committed Mar 20, 2023
    Copy the full SHA
    efc8f5d View commit details

Commits on Mar 28, 2023

  1. Copy the full SHA
    a3ee7db View commit details

Commits on Mar 30, 2023

  1. Copy the full SHA
    7113186 View commit details
  2. Merge branch '6.2' into 6.3

    * 6.2:
      fix merge
      [DependencyInjection] Filter "container.excluded" services when using `findTaggedServiceIds()`
      [Cache] Removing null coalescing assignment operator on 5.4
      [Console] Add missing ZSH mention in DumpCompletionCommand help
      [Cache] Fix storing binary keys when using pgsql
      [FrameworkBundle] Add missing monolog channel tag for messenger services
      update documentation for telegram bridge notifier
      [FrameworkBundle] Improve documentation about translation:extract --sort option
      [VarDumper] Disable links for IntelliJ platform
      [Notifier] Add bridge documentation
      [HttpClient] Add hint about `timeout` and `max_duration` options
      [HttpFoundation] Use separate caches for IpUtils checkIp4 and checkIp6
      [FrameworkBundle] Fix wiring session.handler when handler_id is null
      [FrameworkBundle] Workflow - Fix LogicException about a wrong configuration of "enabled" node
    nicolas-grekas committed Mar 30, 2023
    Copy the full SHA
    c007934 View commit details

Commits on Apr 3, 2023

  1. Fix tests

    nicolas-grekas committed Apr 3, 2023
    Copy the full SHA
    00eb022 View commit details

Commits on Apr 5, 2023

  1. Fix the test for casting FlattenException on Windows

    The assertion should avoid forcing to show path separators, as done in
    other tests of the caster, as path separators are different on Windows.
    stof committed Apr 5, 2023
    Copy the full SHA
    cb21bc9 View commit details

Commits on Apr 14, 2023

  1. Copy the full SHA
    5767c81 View commit details
  2. cs fix

    nicolas-grekas committed Apr 14, 2023
    Copy the full SHA
    3f026af View commit details

Commits on Apr 18, 2023

  1. Merge branch '6.2' into 6.3

    * 6.2: (21 commits)
      Fix tests
      CS fix
      [HttpKernel] Tests for DataCollector
      for #49320
      [Console] Fix computing column width containing multibyte chars
      [Messenger] Fix deprecation layer of RedeliveryStamp
      [Mime] Form field values with integer keys not resolved correctly
      [Messenger] [Redis] Fixed problem where worker stops handling messages on first empty message
      [PHPUnitBridge] Fix PHPUnit 10.1 compatibility
      [VarDumper] Make the server TCP connection sync
      [Messenger] Fix warning message on failed messenger show command
      [Mailer] [Mailjet] Use body MessageID instead of X-MJ-Request-GUID
      [HttpFoundation] Fix BinaryFileResponse
      [Form] fix merge
      [HttpFoundation] Fix memory limit problems in BinaryFileResponse
      [PropertyAccess] Readonly properties must have no PropertyWriteInfo
      [Form] Cast choices value callback result to string
      [Serializer] Unexpected value should throw UnexpectedValueException
      [ErrorHandler] Don't throw deprecations for HttplugClient
      [Serializer] Fix denormalization of object with typed constructor arg (not castable) and with COLLECT_DENORMALIZATION_ERRORS
      ...
    nicolas-grekas committed Apr 18, 2023
    Copy the full SHA
    c329ed0 View commit details

Commits on Apr 21, 2023

  1. Copy the full SHA
    7dbe8a6 View commit details

Commits on May 16, 2023

  1. Copy the full SHA
    b53bbaa View commit details
  2. Copy the full SHA
    54894d9 View commit details
  3. minor #49977 [VarDumper] Reduce stylesheet assignments via JavaScript…

    … in `HtmlDumper` (ohader)
    
    This PR was squashed before being merged into the 6.3 branch.
    
    Discussion
    ----------
    
    [VarDumper] Reduce stylesheet assignments via JavaScript in `HtmlDumper`
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.3
    | Bug fix?      | no
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | *none*
    | License       | MIT
    
    The dynamic `<style>` element in the JavaScript variable `refStyle` can be replaced by static CSS and element states.
    The new rule `.sf-dump-hover:hover` substitutes JavaScript event handling for `mouseover` events.
    
    This is a preparation to have the possibility to assign `nonce` HTML attributes to inline `<script>` and `<style>` nodes, e.g. shown as proof-of-concept at
    https://review.typo3.org/c/Packages/TYPO3.CMS/+/78512/2/typo3/sysext/adminpanel/Classes/Utility/HtmlDumper.php
    
    Commits
    -------
    
    53046a3bac [VarDumper] Reduce stylesheet assignments via JavaScript in `HtmlDumper`
    nicolas-grekas committed May 16, 2023
    Copy the full SHA
    64a3403 View commit details

Commits on May 19, 2023

  1. Copy the full SHA
    4e84b97 View commit details
  2. Fix merge

    nicolas-grekas committed May 19, 2023
    Copy the full SHA
    a93ec17 View commit details

Commits on May 23, 2023

  1. Copy the full SHA
    5008fa8 View commit details

Commits on May 25, 2023

  1. Copy the full SHA
    c281188 View commit details
  2. Copy the full SHA
    834accf View commit details
  3. bug #50397 [HttpKernel][VarDumper] Fix dumping with labels (nicolas-g…

    …rekas)
    
    This PR was merged into the 6.3 branch.
    
    Discussion
    ----------
    
    [HttpKernel][VarDumper] Fix dumping with labels
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.3
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Should fix symfony/symfony#50347 (comment) /cc `@bobthecow`
    
    Also improves the display in the WDT:
    
    ![image](https://github.com/symfony/symfony/assets/243674/956f7c7d-5569-4ea2-97f3-01d000f34532)
    
    ![image](https://github.com/symfony/symfony/assets/243674/6a497d1e-5291-45a7-8af3-1cf11cafded6)
    
    Commits
    -------
    
    e824eb051e [VarDumper][HttpKernel] Fix dumping with labels
    nicolas-grekas committed May 25, 2023
    Copy the full SHA
    81fb69e View commit details
  4. minor #50427 [VarDumper] Fix failures on appveyor (nicolas-grekas)

    This PR was merged into the 6.3 branch.
    
    Discussion
    ----------
    
    [VarDumper] Fix failures on appveyor
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.3
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Tickets       | -
    | License       | MIT
    | Doc PR        | -
    
    Commits
    -------
    
    52f45a4062 [VarDumper] Fix failures on appveyor
    nicolas-grekas committed May 25, 2023
    Copy the full SHA
    b34e418 View commit details
  5. Merge branch '6.2' into 6.3

    * 6.2:
      [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
    6acdcd5 View commit details
Showing with 879 additions and 139 deletions.
  1. +8 −0 CHANGELOG.md
  2. +15 −0 Caster/AmqpCaster.php
  3. +2 −0 Caster/Caster.php
  4. +4 −3 Caster/ClassStub.php
  5. +45 −0 Caster/DOMCaster.php
  6. +12 −0 Caster/DateCaster.php
  7. +9 −0 Caster/DoctrineCaster.php
  8. +37 −4 Caster/ExceptionCaster.php
  9. +3 −0 Caster/FiberCaster.php
  10. +15 −0 Caster/IntlCaster.php
  11. +1 −1 Caster/LinkStub.php
  12. +3 −0 Caster/MemcachedCaster.php
  13. +6 −0 Caster/PdoCaster.php
  14. +9 −0 Caster/PgSqlCaster.php
  15. +3 −0 Caster/ProxyManagerCaster.php
  16. +36 −0 Caster/RdKafkaCaster.php
  17. +21 −11 Caster/RedisCaster.php
  18. +48 −3 Caster/ReflectionCaster.php
  19. +16 −1 Caster/ResourceCaster.php
  20. +27 −0 Caster/ScalarStub.php
  21. +50 −2 Caster/SplCaster.php
  22. +23 −0 Caster/StubCaster.php
  23. +18 −0 Caster/SymfonyCaster.php
  24. +3 −0 Caster/XmlReaderCaster.php
  25. +3 −0 Caster/XmlResourceCaster.php
  26. +12 −0 Cloner/AbstractCloner.php
  27. +19 −10 Cloner/Data.php
  28. +8 −0 Cloner/DumperInterface.php
  29. +1 −0 Cloner/Stub.php
  30. +0 −2 Cloner/VarCloner.php
  31. +1 −1 Command/ServerDumpCommand.php
  32. +4 −0 Dumper/AbstractDumper.php
  33. +53 −4 Dumper/CliDumper.php
  34. +5 −2 Dumper/ContextualizedDumper.php
  35. +3 −0 Dumper/DataDumperInterface.php
  36. +58 −21 Dumper/HtmlDumper.php
  37. +6 −1 Dumper/ServerDumper.php
  38. +25 −13 Resources/functions/dump.php
  39. +6 −8 Server/Connection.php
  40. +32 −2 Tests/Caster/ExceptionCasterTest.php
  41. +16 −7 Tests/Caster/RedisCasterTest.php
  42. +20 −0 Tests/Caster/SplCasterTest.php
  43. +17 −3 Tests/Caster/StubCasterTest.php
  44. +1 −3 Tests/Cloner/VarClonerTest.php
  45. +1 −3 Tests/Command/Descriptor/CliDescriptorTest.php
  46. +2 −19 Tests/Dumper/CliDumperTest.php
  47. +1 −1 Tests/Dumper/ContextualizedDumperTest.php
  48. +41 −2 Tests/Dumper/FunctionsTest.php
  49. +2 −1 Tests/Dumper/HtmlDumperTest.php
  50. +18 −0 Tests/Dumper/functions/dd_with_multiple_args.phpt
  51. +16 −0 Tests/Dumper/functions/dd_with_null.phpt
  52. +16 −0 Tests/Dumper/functions/dd_with_single_arg.phpt
  53. +18 −0 Tests/Dumper/functions/dump_with_multiple_args.phpt
  54. +16 −0 Tests/Dumper/functions/dump_with_null.phpt
  55. +16 −0 Tests/Dumper/functions/dump_with_single_arg.phpt
  56. +11 −2 Tests/Fixtures/dumb-var.php
  57. +16 −4 VarDumper.php
  58. +0 −5 composer.json
  59. +1 −0 phpunit.xml.dist
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
CHANGELOG
=========

6.3
---

* Add caster for `WeakMap`
* Add support of named arguments to `dd()` and `dump()` to display the argument name
* Add support for `Relay\Relay`
* Add display of invisible characters

6.2
---

15 changes: 15 additions & 0 deletions Caster/AmqpCaster.php
Original file line number Diff line number Diff line change
@@ -46,6 +46,9 @@ class AmqpCaster
\AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS',
];

/**
* @return array
*/
public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, bool $isNested)
{
$prefix = Caster::PREFIX_VIRTUAL;
@@ -79,6 +82,9 @@ public static function castConnection(\AMQPConnection $c, array $a, Stub $stub,
return $a;
}

/**
* @return array
*/
public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, bool $isNested)
{
$prefix = Caster::PREFIX_VIRTUAL;
@@ -102,6 +108,9 @@ public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, bool $
return $a;
}

/**
* @return array
*/
public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, bool $isNested)
{
$prefix = Caster::PREFIX_VIRTUAL;
@@ -125,6 +134,9 @@ public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, bool $isNe
return $a;
}

/**
* @return array
*/
public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, bool $isNested)
{
$prefix = Caster::PREFIX_VIRTUAL;
@@ -153,6 +165,9 @@ public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, bool
return $a;
}

/**
* @return array
*/
public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, bool $isNested, int $filter = 0)
{
$prefix = Caster::PREFIX_VIRTUAL;
2 changes: 2 additions & 0 deletions Caster/Caster.php
Original file line number Diff line number Diff line change
@@ -36,6 +36,8 @@ class Caster
public const PREFIX_VIRTUAL = "\0~\0";
public const PREFIX_DYNAMIC = "\0+\0";
public const PREFIX_PROTECTED = "\0*\0";
// usage: sprintf(Caster::PATTERN_PRIVATE, $class, $property)
public const PATTERN_PRIVATE = "\0%s\0%s";

/**
* Casts objects to arrays and adds the dynamic property prefix.
7 changes: 4 additions & 3 deletions Caster/ClassStub.php
Original file line number Diff line number Diff line change
@@ -56,9 +56,7 @@ public function __construct(string $identifier, callable|array|string $callable
}

if (str_contains($identifier, "@anonymous\0")) {
$this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
}, $identifier);
$this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $identifier);
}

if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) {
@@ -87,6 +85,9 @@ public function __construct(string $identifier, callable|array|string $callable
}
}

/**
* @return mixed
*/
public static function wrapCallable(mixed $callable)
{
if (\is_object($callable) || !\is_callable($callable)) {
45 changes: 45 additions & 0 deletions Caster/DOMCaster.php
Original file line number Diff line number Diff line change
@@ -63,6 +63,9 @@ class DOMCaster
\XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE',
];

/**
* @return array
*/
public static function castException(\DOMException $e, array $a, Stub $stub, bool $isNested)
{
$k = Caster::PREFIX_PROTECTED.'code';
@@ -73,6 +76,9 @@ public static function castException(\DOMException $e, array $a, Stub $stub, boo
return $a;
}

/**
* @return array
*/
public static function castLength($dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -82,6 +88,9 @@ public static function castLength($dom, array $a, Stub $stub, bool $isNested)
return $a;
}

/**
* @return array
*/
public static function castImplementation(\DOMImplementation $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -92,6 +101,9 @@ public static function castImplementation(\DOMImplementation $dom, array $a, Stu
return $a;
}

/**
* @return array
*/
public static function castNode(\DOMNode $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -116,6 +128,9 @@ public static function castNode(\DOMNode $dom, array $a, Stub $stub, bool $isNes
return $a;
}

/**
* @return array
*/
public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -132,6 +147,9 @@ public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub
return $a;
}

/**
* @return array
*/
public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, bool $isNested, int $filter = 0)
{
$a += [
@@ -166,6 +184,9 @@ public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, boo
return $a;
}

/**
* @return array
*/
public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -176,6 +197,9 @@ public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub
return $a;
}

/**
* @return array
*/
public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -189,6 +213,9 @@ public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, bool $isNes
return $a;
}

/**
* @return array
*/
public static function castElement(\DOMElement $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -199,6 +226,9 @@ public static function castElement(\DOMElement $dom, array $a, Stub $stub, bool
return $a;
}

/**
* @return array
*/
public static function castText(\DOMText $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -208,6 +238,9 @@ public static function castText(\DOMText $dom, array $a, Stub $stub, bool $isNes
return $a;
}

/**
* @return array
*/
public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -222,6 +255,9 @@ public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $s
return $a;
}

/**
* @return array
*/
public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -232,6 +268,9 @@ public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, boo
return $a;
}

/**
* @return array
*/
public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -246,6 +285,9 @@ public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, bool $i
return $a;
}

/**
* @return array
*/
public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
@@ -256,6 +298,9 @@ public static function castProcessingInstruction(\DOMProcessingInstruction $dom,
return $a;
}

/**
* @return array
*/
public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, bool $isNested)
{
$a += [
12 changes: 12 additions & 0 deletions Caster/DateCaster.php
Original file line number Diff line number Diff line change
@@ -24,6 +24,9 @@ class DateCaster
{
private const PERIOD_LIMIT = 3;

/**
* @return array
*/
public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, bool $isNested, int $filter)
{
$prefix = Caster::PREFIX_VIRTUAL;
@@ -47,6 +50,9 @@ public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub,
return $a;
}

/**
* @return array
*/
public static function castInterval(\DateInterval $interval, array $a, Stub $stub, bool $isNested, int $filter)
{
$now = new \DateTimeImmutable('@0', new \DateTimeZone('UTC'));
@@ -76,6 +82,9 @@ private static function formatInterval(\DateInterval $i): string
return $i->format(rtrim($format));
}

/**
* @return array
*/
public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stub, bool $isNested, int $filter)
{
$location = $timeZone->getLocation();
@@ -87,6 +96,9 @@ public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stu
return $filter & Caster::EXCLUDE_VERBOSE ? $z : $z + $a;
}

/**
* @return array
*/
public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, bool $isNested, int $filter)
{
$dates = [];
9 changes: 9 additions & 0 deletions Caster/DoctrineCaster.php
Original file line number Diff line number Diff line change
@@ -25,6 +25,9 @@
*/
class DoctrineCaster
{
/**
* @return array
*/
public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, bool $isNested)
{
foreach (['__cloner__', '__initializer__'] as $k) {
@@ -37,6 +40,9 @@ public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub,
return $a;
}

/**
* @return array
*/
public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, bool $isNested)
{
foreach (['_entityPersister', '_identifier'] as $k) {
@@ -49,6 +55,9 @@ public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, bool
return $a;
}

/**
* @return array
*/
public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, bool $isNested)
{
foreach (['snapshot', 'association', 'typeClass'] as $k) {
Loading