Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement __debugInfo() #1406

Merged
merged 1 commit into from
Dec 14, 2024
Merged

Implement __debugInfo() #1406

merged 1 commit into from
Dec 14, 2024

Conversation

olivervogel
Copy link
Member

@olivervogel olivervogel commented Dec 11, 2024

Implement __debugInfo() on the following classes:

  • Intervention\Image\Image
  • Intervention\Image\Origin
  • Intervention\Image\EncodedImage
  • Intervention\Image\Drivers\Gd\Frame
  • Intervention\Image\Drivers\Imagick\Frame
  • Intervention\Image\Geometry\Rectangle
  • Intervention\Image\Colors\Rgb\Color
  • Intervention\Image\Colors\Cmyk\Color
  • Intervention\Image\Colors\Hsl\Color
  • Intervention\Image\Colors\Hsv\Color

The result is more informative debug information when objects of the classes are output via var_dump().

For example the following code:

$color = ImageManager::gd()
    ->read($path)
    ->pickColor(0, 0);

var_dump($color);

results in:

object(Intervention\Image\Colors\Rgb\Color)#9 (4) {
  ["red"]=>
  int(104)
  ["green"]=>
  int(128)
  ["blue"]=>
  int(132)
  ["alpha"]=>
  int(255)
}

@olivervogel olivervogel added this to the 3.10.0 milestone Dec 11, 2024
@olivervogel olivervogel merged commit 92bae6e into develop Dec 14, 2024
16 checks passed
@olivervogel olivervogel deleted the feature/debug-info branch December 14, 2024 07:28
olivervogel added a commit that referenced this pull request Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant