Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Svg Laravel Package

meyfa/php-svg

Lightweight PHP library to create, read, and manipulate SVGs. Build SVG documents programmatically, edit shapes and attributes via a DOM-like API, and export clean SVG/XML. Handy for generating icons, diagrams, and server-side graphics without external dependencies.

View on GitHub
Deep Wiki
Context7
v0.16.1

What's Changed

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.16.0...v0.16.1

v0.16.0

What's Changed

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.15.1...v0.16.0

v0.15.1

What's Changed

Additional changes:

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.15.0...v0.15.1

v0.15.0

BREAKING: This release drops support for PHP 7.3. This allows us to use lots of new syntax offered since PHP 7.4. In particular, much better type definitions were added.

Thanks to everyone who contributed to make this possible!

What's Changed

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.14.7...v0.15.0

v0.14.7

What's Changed

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.14.6...v0.14.7

v0.14.6

What's Changed

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.14.5...v0.14.6

v0.14.5

What's Changed

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.14.4...v0.14.5

v0.14.4

What's Changed

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.14.3...v0.14.4

v0.14.3

What's Changed

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.14.2...v0.14.3

v0.14.2

What's Changed

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.14.1...v0.14.2

v0.14.1

What's Changed

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.14.0...v0.14.1

v0.14.0

What's Changed

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.13.0...v0.14.0

v0.13.0

What's Changed

⚠️ BREAKING CHANGE: This version requires PHP 7.3 or later!

PHP-SVG 0.12.0 has been the last release to support all PHP versions down to 5.3.3. From now on, PHP-SVG will require a minimum PHP version of 7.3. Read more about this choice here: https://github.com/meyfa/php-svg/issues/180

This should only affect you if you're using a PHP installation that's more than 4 years out of date. Keep in mind that everything below PHP 8 has already reached official end-of-life, so please consider upgrading. Running outdated software is a security risk.

Changes

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.12.0...v0.13.0

v0.12.0

What's Changed

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.11.3...v0.12.0

v0.11.3

What's Changed

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.11.2...v0.11.3

v0.11.2

What's Changed

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.11.1...v0.11.2

v0.11.1

What's Changed

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.11.0...v0.11.1

v0.11.0

What's Changed

Features

  • Add classes for all remaining nodes in SVG spec (0bf3d0fd9160818ae4501dee2aa61b770f75b645, 907f6932580c1ac060962d6cf3d36a9bc56cf45f) by @meyfa
  • Add support for namespaces on children (#62) (2df2cb64fa42615015c540d1efea02e57443f952, eb3e040c14b22a55bb1713f0321ee577bf2c70ec, 52ebcee12a2f4b99b7039fef34f80263cd5203af) by @meyfa
  • Add basic text-anchor support in renderer (#97) by @meyfa
  • Make SVG dimension parameters optional (#104) by @meyfa
  • Eliminate constructFromAttributes (#106) by @meyfa

Fixes

  • Fix faulty assumption about attribute units (#102) by @meyfa
  • Fix dangerous empty() with strings (#83) (6f387c8efeaba0f4afadfb578d920c1a29c74293, 86770589feb7508c295d210cd64730002104a316, 0d9c20b2727a5f57ee39123f21b2aea546189f51) by @meyfa
  • Fix namespaced children not added to tree (#113) by @meyfa

Tooling and Testing

  • Add more annotations (#90, #107) by @meyfa
  • Improve Travis config (d143a17171dcce47f1f2cfcd440b05b5101edbe2, #95, #99) by @meyfa
  • Setup PHPCS for syntax style checking (#91) by @meyfa
  • Use consistent tooling config file names (#93) by @meyfa

Misc

  • Major SVGPolygonalShape improvements (#105) by @meyfa
  • Miscellaneous refactors by @meyfa

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.10.0...v0.11.0

v0.10.0

What's Changed

General Features

  • Make all types inherit from SVGNodeContainer (b07cbcb38a1bef4dd47cc94d45e9e839a0f2eeb1)
  • Add background color argument to rasterize method (c2ddd54baa4cb89787d65da9dc108d65d3e21be6)

Path Computation

See #77

  • Add arc approximator test for LargeArc flag (3739d11a2527f86b5ccd17ac24dcf3a968c7d897)
  • Rewrite elliptical arc computation (97ff139d483c762259447a814217b14c2af2b5fa)
  • Add more asserts for arc approximator flags (c9c224478f0e46ac67514831f05c0e03fb232d72)
  • Remove redundant fmod in arc approximator (89bc58e393777085b8b4d869933197e55336482b)
  • Add radii scaling to arc approximator (0a26b4ac8406d156f82648011d4f0e0d53d615ae)

Misc Changes

  • Remove 'SVG' prefix from renderer and path utility class names (40f1834b0434e9f795223c39d7de7eb1fa441ae7, acc4cd9d4a10eb99af92fe4279b3ee7015b0944f)
  • Improve Bezier approximator performance (2bec325877601d7b1d24a05855f7bedbc101957c)
  • Move rasterizer scale/offset computation to constructor (4ac533acab00737e816b4a694a5e47ea71b6c63d)
  • Optimize Color::clamp (3cd4ecc35961c51f9661d955ee09fb2fccf3f0db)
  • Use type casts everywhere instead of intval/floatval (920466c37c837b6360c761ea8c9537adbd9abaf9)
  • Skip some unit tests when missing ext-gd (ff91fe60f75f5d1e14679c2c7a3ff802a0dd6c78)
  • Fix some PHPMD warnings (c9bc44fd256ff190cf878712f558b3be49b33531)

Meta / Dependencies

  • Migrate Travis to .com (668a9d4f1c4c5fa45328f44ad8146d675cfe94d1)
  • Mark ext-gd and ext-simplexml as optional (#76) (b72a174dbed867642e4b2ac37eb1ebf6705c4b04)
  • Add PHPMD dev dependency (e175741dec2f5536afea5cc3fe71cfd856d8d5e1)

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.9.1...v0.10.0

v0.9.1

What's Changed

Features

  • Add class for svg tag 'a' (PR #61 by @pkertyxy) (1fd87d7b47d9bffdc41eca6c0ac11c09f30d911f)
  • PR #66 by @MatthiasKuehneEllerhold (c0d075def9be7286e9a0b567d32db229a55e4dfc):
    • Implement embedded images (via SVGImage) and embedded fonts (via SVGFont)
    • Add SVGClipPath
    • Add SVGImage::fromString()
  • Add constructor to SVGTitle class (34401edef1f724898f468f71b85505fbcc8351bb)

Fixes

  • Add missing ext-simplexml composer requirement (PR #57 by @moebrowne) (96a1daf01d4b2131864ad3a3382bcaa06019136f)
  • Fix docblock types and float defaults (PR #58 by @moebrowne) (7a23aff1a8fffb7ce2c221ff7eb1c6e2d8274360)
  • Travis: Specify dist 'trusty' for PHP 5.4 and 5.5 (856ccd705fea78321e2d60843277c5321bd84544)
  • Fix #72: error if rect dimensions 0, rounded corners (13e111832c0db6aa371c22febf5c6c309c8061b3)
  • Fix #69: missing attributes if xmlns not set on <svg> (3b36e9f8909d157cc0ac83a7173c611359c21747)

Misc

  • Add link to Wiki for additional documentation (PR #67 by @axis80) (1cb26a2f2207c736ff07e3297e5c0921bacaa1ee)

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.9.0...v0.9.1

v0.9.0

What's Changed

Breaking changes

  • \SVG\SVGImage is renamed to \SVG\SVG (PR #55) (fc8e34ef2f1c7b04b6e56da9398097335867267d)
  • \SVG\Nodes\Embedded\SVGImageElement is renamed to \SVG\Nodes\Embedded\SVGImage (PR #55) (1680eca33c0e107439969650904ab08ecfe83603)

Features

  • Implement text rendering, paint-order attribute (PR #54 by @za-ek) (a89d495f56af40bea7a18b8c6675987236aca218)
  • Allow arbitrary font-size units for rendering (447e0022c4bed10112c93ed6071299c976982f5a)
  • Skip text rasterization when no font specified (0a22649efdc1a4848828aa08058819762a32ed97)

Style

  • Split SVG.php into Length, Angle, Color, ColorLookup (PR #55) (b94c8b35671766f0be87be3b22270ad998b872f0)
  • Move color clamping into separate function (95edea9fc0cfaf068969d18b6e8f49e7afa62e51)
  • Converge code style / spacing (62123bf462df8bf2c4bb0d5dcbbd337cf0e55e26, 3ca37fe954dfc900edd18787f23c8eebefd92d70)

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.8.0...v0.9.0

v0.8.0

What's Changed

Breaking changes

  • Remove $root parameter of SVGDocumentFragment constructor (def5a72b5c51f82d8becc295de4e89b672a70f86) (breaks any code using nested <svg> tags)

Features

  • Add getElementById method to document class (936d22c2c3c104bf08f1926eab51379158e528e6)
  • Add getElementsByTagName method to nodes (2283a216a32493450adf1b35462e985767b5bf54)
  • Add support for node values (inner text); <text>, <textPath> (PR #42 by @thomas-kl1) (c628ff3f8debcda239f154eb0c5c0177e51df34b)
  • Allow omitting of leading XML tag when writing output (PR #48 by @micgro42) (fe8c9d93fd520b508055810a0f161ac9b9a0b364)
  • Add <title> tag (PR #47 by @micgro42) (9c738174a1001b82bf60db0142d840c24f67fba3)
  • Add support for adding children at a specific index (#51) (9e505627ba5631e966fa89dcf412da6d3f112b2d)
  • Add SVGNodeContainer::setChild method (#51) (48c3980eed48e0e135e13a9f654527c09648a542)
  • Add generic type for unknown nodes(#41) (5677a18cbd34dd89d61b967dcb4b1353c0a24bbb)

Fixes

  • Fix setType method on SVGStyle (PR #44 by @peter279k) (212cae4bbead7e6740d78289c41cc07939ba7281)
  • Travis 5.3 test (PR #46 by @peter279k) (e309858afbaca44dbc0b555b67ee516a87e0bfea)

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.7.0...v0.8.0

v0.7.0

What's Changed

Besides internal rewrites, this release offers many fixes for nonconforming behavior. In addition, there is now support for rectangles with rounded corners, the full range of CSS color notation and automatic entity escaping in attributes ("&quot;).

Fixes

  • Fix miscellaneous SVGDocumentFragment test failures (094238d6cb451f43ce6e0f4ce663f7b7dae7a78a)
  • Remove unnecessary rasterizer clipping (20e64d5d9ac55b9f30a25ff13983037d1e32f28a)
  • Treat empty namespace string like 'xmlns' (58a43f754e7558c29a9db45e446e36df672e19c3)
  • Fix namespaces not added to document fragment by SVGReader (dadcabdaafc9086b02941acc2131ab7bca8b5677)
  • Fix width/height taken from viewBox by SVGReader when explicit attributes are missing (dadcabdaafc9086b02941acc2131ab7bca8b5677)
  • Fix SVG::convertUnit accepting missing value (c9ce6ed36710ad34584877f10657efd262856f3c)

Features

  • Add support for rounded rectangles (PR #29 by @yoya, PR #34 by @meyfa) (600da3e047eef844747912fbd32267e69e2c9bf0)
  • Rewrite color parsing algorithm (#36, #37) (203c93ee443379b10215466072bccc6f2f0d8f99)
  • Decode/Encode XML entities in reader/writer (#39) (a84f8dd120e5ad5c8bb16802eda79d681497733b)
  • Make SVGNode::setStyle and SVGNode::setAttribute unset properties when given null (0747a98b27683bf0e251072f0e9be6460893da04)
  • Remove obsolete SVGNode::setAttributeOptional (#38) (0747a98b27683bf0e251072f0e9be6460893da04)
  • Rewrite viewBox parsing for SVGNode (c8c4f6ba7dc4a10bb2eabb3a443daa45aa534c33)

Tests

  • Huge expansion of unit testing suite (work in progress) (see #35)

New Contributors

Full Changelog: https://github.com/meyfa/php-svg/compare/v0.6.1...v0.7.0

v0.6.1

Fixes

  • Reader: Include namespaced attributes (fixes #31) (7e7415d)
  • Interpret MoveTo chains as implicit LineTo commands (e5ae072)
  • Fix opacity calculation for renderers (1518365)

Features

  • Add support for <defs> tag (fixes #32) (5dc6b2c, 2c27ab3)
v0.6.0

Breaking changes

  • BREAKING: Update package name and author data (ae8650a)
    • Please change the package name in your Composer file to meyfa/php-svg
  • BREAKING: Shorten vendor namespace to "SVG" (cde475b)
    • Please update all use statements to start with SVG\, e.g. use SVG\SVGImage

Fixes

  • Fix SVGRect::setHeight() setting the width (16d790c)

Features

  • Add support for <image> tag (PR #26) (e2148fb)
    • Add SVGImageRenderer for embedded images (can render URLs as well as data URIs)
    • Add SVGImageElement for <image> tag
  • Add support for <style> tag, improved viewbox, nested docs (PR #27) (67ff696)

Style

  • Clean up comments and code format (e20b851)
  • Some TravisCI changes (1137bf1, f52405f, 8c3090c)
  • Disable PHPMD.StaticAccess globally (c6dc285)
v0.5.4

Fixes

  • Trim polygon points attribute when parsing, fixes index error (PR #23) (84339ea)
v0.5.3

Features

  • Add unit support: pc, cm, mm, in (closes #21) (f8e54a7)
  • Add viewBox support (closes #20) (PR #22)
  • Support real units as rasterizer document sizes (2e10f21)
  • Default to 100% for doc width/height in rasterizer
v0.5.2

Features

All path commands are now supported!

  • Add SVGArcApproximator and support for ArcTo path commands (closes #8) (d14f53c)
  • Add support for S/s, T/t path commands (closes #19) (2e64cfd, ce162b6)
v0.5.1

Features

  • Add support for rgb/rgba colors with percentages (81136fa), as well as hsl and hsla color support (aa48436) (see #11)
  • Add display: none (fd2c893) and visibility (dbcb999) support to node rasterization (see #15)

Fixes

  • Rewrite path command parsing (fixes #17, fixes #18) (2dedb4e)
  • Fix "at least 3 points" error occurring for some paths (96605e8)
  • Use floating-point modulo in HSL color parsing (9d9c064)

Style

  • Update composer.json description (8c9e9d3)
v0.5.0

Features

  • POTENTIALLY BREAKING: Make SVGNodeContainer methods chainable (fixes #9) (98aebf0)
  • Add support for named colors (fixes #12) (0061d65)
  • Add 'transparent' color support (fcae18c)
  • Add support for 'pt' unit (12pt = 16px) (a02b4c1)
  • Add getter & setter for d attribute to SVGPath (cafd2be)

Fixes

  • Fix renderers interpreting percentages as pixels (35ab405)
  • Draw precise outlines in SVGRectRenderer (fixes #7) (1137e78)

Style

  • POTENTIALLY BREAKING: Store node tag names in 'TAG_NAME' constants (69db5a9)
  • Store all special attrs. in SVGNode::attributes (7f33fb1)
  • Abandon setStyle() for default styles (fixes #14) (5a4d720)
  • Improve docs (07f2b95, 8fc3c5d, 1b9515e)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle