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

Shortcode Laravel Package

thunderer/shortcode

Framework-agnostic PHP library for parsing and processing shortcodes/BBCodes. Extract shortcodes from text, handle replacements, and apply them via processors and events. Includes serializers for Text/XML/JSON/YAML. Supports PHP 5.3–8.x.

View on GitHub
Deep Wiki
Context7
v0.7.7

What's Changed

New Contributors

Full Changelog: https://github.com/thunderer/Shortcode/compare/v0.7.6...v0.7.7

v0.7.6
  • support for PHP 8.4.
v0.7.5
  • full Psalm type coverage,
  • moved from Travis to GitHub Actions,
  • support for PHP 8.1,
  • CI runs Infection.
v0.7.4
v0.7.3

Fixed PHP 7.4 compatibility errors reported in #81 and #82.

v0.7.2

Fixed #77, merged quality of life improvements from #73.

v0.7.1

Fixed #74.

v0.7.0
  • many RegularParser improvements and fixes:
    • backtracks now rely on their offsets only, this is an over 10x performance and memory usage improvement which evens its performance with other parsers while still keeping its feature advantage,
    • subsequent non-token text fragments are now reported as single T_STRING tokens,
    • fixed #70, preg_match_all() with large inputs was sometimes silently failing and returning only subset of matches which reduced the number of reported shortcodes,
    • fixed #58 where invalid token sequences in shortcode content may confuse the parser,
    • inlined content() method effectively halving the call nesting level,
    • disabled xdebug.max_nesting_level during parse() to prevent development environment parsing errors,
  • added support for PHPUnit 6.x with fallback translation for PHP 5.x compatibility,
  • dropped PHP 5.3 (still supported) and added PHP 7.2 from Travis matrix,
  • asterisk * is now a valid shortcode name,
  • minor internal Processor improvements,
  • minor README updates.
v0.6.5

Extended parameter simple values possible value range, #44.

v0.6.4

Fixed minor WordPress compatibility issue with content detection in WordpressParser.

v0.6.3

Fixed bug happening when computing replacement of shortcode without handler that contained multibyte content.

v0.6.2

Fixed issue with parsing shortcode tokens inside shortcode content.

v0.6.1

Fixed bug with not recalculating new text length after applying shortcode replacement which caused the replacements to be applied only up to the length of source text. Thanks to @Jonatanmdez for reporting it in issue #37.

v0.6.0

Events subsystem, builtin event handlers, builtin shortcode handlers, rewritten README, standardized shortcode name validation, ReplacedShortcode to represent handler result instead of internal array, getBaseOffset() and better WordpressParser compatibility with WordPress.

v0.5.3

Massive performance improvements in RegularParser, fixed problem with multibyte characters in parsed texts, fixed matching shortcodes with invalid names.

v0.5.2

Fixed bug with subsequent string tokens in RegularParser, added corresponding test cases.

v0.5.1

Fixed a bug with shortcode replacement when it contained multibyte characters.

v0.5.0

Removed all deprecated features from v0.4.0, added XML and YAML serializers, added RegularParser and WordpressParser, added HandlerContainer abstraction. This was meant to be a 1.0.0 release, but I'm still working on several ideas and want to test them before first stable release (should be released soon).

v0.4.0

Intermediate release with many fixes and improvements. BC was kept intact, though nearly all classes were moved into new places. Introduced UPGRADE document which describes possible breaking changes in future releases. Next release will be BC breaking and will clean everything.

v0.3.0

Whitespaced syntax, library facade and self-closing tags.

v0.2.2

Fixed support for PHP 5.3.

v0.2.1

Fixed matching simple parameter values using delimiters, added missing support for escaping characters inside parameter values.

v0.2.0

Recursive and iterative processing, HandlerInterface, default handler, handler aliases and configurable shortcode syntax with builder.

v0.1.0

First release.

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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky