Skip to content

Conversation

@jakubmisek
Copy link
Member

update SixLabors dependencies to latest version

ref #1144

@jakubmisek jakubmisek requested a review from Copilot June 30, 2025 13:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the SixLabors dependencies to their latest versions and adapts the image‐processing code to breaking API changes in ImageSharp, ImageSharp.Drawing, and SixLabors.Fonts.

  • Bumped SixLabors.ImageSharp, SixLabors.ImageSharp.Drawing, and SixLabors.Fonts package versions.
  • Migrated from older drawing/renderer options APIs (e.g., ShapeGraphicsOptions, RendererOptions) to the new DrawingOptions, TextOptions, etc.
  • Replaced deprecated constructors and methods (e.g., Image.Load(..., out var format), ConfigurationModule) with the updated overloads and configuration types.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Peachpie.Runtime/Variables.cs Annotated string return types as nullable and added nullability annotation for out parameters.
src/Peachpie.Library.Graphics/PhpGdImageResource.cs Updated IBrush to Brush and adapted constructors to new config interfaces.
src/Peachpie.Library.Graphics/PhpGd2.cs Switched to new ImageSharp.Drawing APIs, updated XML docs, and replaced deprecated SixLabors calls.
src/Peachpie.Library.Graphics/Peachpie.Library.Graphics.csproj Bumped SixLabors package versions to 3.x/2.x series.
src/Peachpie.Library.Graphics/FloodFillProcessor{TPixel}.cs Wrapped pixel operations in ProcessPixelRows and switched to GetRowSpan.
src/Peachpie.Library.Graphics/Exif.cs Refactored Exif handling to use updated SixLabors metadata APIs and pattern matching.


/// <summary>
/// When the bundled version of GD is used this is 1 otherwise its set to 0.
/// When the bundled version of GD is used, this is 1 otherwise it's set to 0.
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The summary line would read more clearly with punctuation between clauses. Consider: "When the bundled version of GD is used, this is 1; otherwise, it's set to 0."

Suggested change
/// When the bundled version of GD is used, this is 1 otherwise it's set to 0.
/// When the bundled version of GD is used, this is 1; otherwise, it's set to 0.

Copilot uses AI. Check for mistakes.
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta0013" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.10" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.6" />
<PackageReference Include="SixLabors.Fonts" Version="2.1.3" />
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The SixLabors.ImageSharp.Drawing package is at 2.1.6 while SixLabors.Fonts is at 2.1.3. Consider aligning minor/patch versions across related SixLabors packages to avoid potential compatibility issues.

Suggested change
<PackageReference Include="SixLabors.Fonts" Version="2.1.3" />
<PackageReference Include="SixLabors.Fonts" Version="2.1.6" />

Copilot uses AI. Check for mistakes.
@jakubmisek jakubmisek merged commit 51a8b12 into master Jun 30, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants