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

Laminas Stdlib Laravel Package

laminas/laminas-stdlib

Utility components for PHP from the Laminas project: data structures, array and string helpers, hydrators, validators, option objects, and more. A shared toolbox used across Laminas and usable standalone in any PHP application.

View on GitHub
Deep Wiki
Context7

Migration Guide

From v2 to v3

The changes made going from v2 to v3 were:

  • Removal of the Hydrator subcomponent.
  • Removal of the CallbackHandler class.
  • Removal of Laminas\Stdlib\Guard\GuardUtils.

Hydrators

The biggest single change from version 2 to version 3 is that the hydrator subcomponent, which was deprecated in v2.7.0, is now removed. This means that if you were using laminas-stdlib principally for the hydrators, you need to convert your code to use laminas-hydrator.

This will also mean a multi-step migration. laminas-stdlib v3 pre-dates laminas-hydrator v2.1, which will be the first version that supports laminas-stdlib v3 and laminas-servicemanager v3. If you are using Composer, the migration should be seamless:

  • Remove your laminas-stdlib dependency:

    $ composer remove laminas/laminas-stdlib
    
  • Update to use laminas-hydrator:

    $ composer require laminas/laminas-hydrator
    

When laminas-hydrator updates to newer versions of laminas-stdlib and laminas-servicemanager, you will either automatically get those versions, or you can tell composer to use those specific versions:

$ composer require "laminas/laminas-stdlib:^3.0"

CallbackHandler

Laminas\Stdlib\CallbackHandler primarily existed for legacy purposes; it was created before the callable typehint existed, so that we could typehint PHP callables. It also provided some minimal features around lazy-loading callables from instantiable classes, but these features were rarely used, and better approaches already exist for handling such functinality in laminas-servicemanager and mezzio.

As such, the class was marked deprecated in v2.7.0, and removed for v3.0.0.

GuardUtils

Version 3 removes Laminas\Stdlib\Guard\GuardUtils. This abstract class existed to provide the functionality of the various traits also present in that subcomponent, for consumers on versions of PHP earlier than 5.4. Since the minimum required version is now PHP 5.5, the class is unnecessary. If you were using it previously, compose the related traits instead.

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport