Serializer component from Zend Framework

Last update: Jan 13, 2022
  • 1. Serialized data must be a string containing serialized PHP code; received: NULL

    After updating to version 2.7.2 I got following error on my login page.

    PHP Fatal error: Uncaught exception 'Zend\\Serializer\\Exception\\RuntimeException' with message 'Serialized data must be a string containing serialized PHP code; received: NULL' in vendor/zendframework/zend-serializer/src/Adapter/PhpSerialize.php:75\nStack trace:\n#0 vendor/zendframework/zend-cache/src/Storage/Plugin/Serializer.php(72): Zend\\Serializer\\Adapter\\PhpSerialize->unserialize(NULL)\n#1 [internal function]: Zend\\Cache\\Storage\\Plugin\\Serializer->onReadItemPost(Object(Zend\\Cache\\Storage\\PostEvent))\n#2 vendor/zendframework/zend-eventmanager/src/EventManager.php(490): call_user_func(Array, Object(Zend\\Cache\\Storage\\PostEvent))\n#3 vendor/zendframework/zend-eventmanager/src/EventManager.php(251): Zend\\EventManager\\EventManager->triggerListeners('', Object(Zend\\Cache\\Storage\\PostEvent))\n#4 vendor/zendframework/ in vendor/zendframework/zend-serializer/src/Adapter/PhpSerialize.php on line 75

    Reviewed by CreativeNative at 2016-05-11 18:21
  • 2. Feature/add covers to tests


    Following discussion, is this what we are after? Do not merge, until rest are complete for this component. This is just a sample - please add tag WIP.

    What are your thoughts on group tag?

    Reviewed by levelfivehub at 2015-10-29 13:15
  • 3. Removed skipped unit test and the use of eval. Enhancement


    This is my second contribution towards ZF2. I hope it suits this module well.

    There was a skipped test (commented out) as well as the use of eval(). I did notice a comment with a warning so thought I put my contribution forward. Please review and let me know if it is acceptable.

    Awaiting your comments. Unit tests and builds passing.

    Also did php-cs-fixes.

    Ps. There may be other scenarios I can cover in this branch. But ideally I want to get some feedback before continuing.

    Reviewed by levelfivehub at 2015-10-27 10:02
  • 4. PhpSerialize: Add options for a unserialize() class-whitelist

    The PhpSerialize adapter uses unserialize() (see PhpSerialize.php#L88) to convert a string into a PHP Object (array, string, class-instance. ...).

    PHP 7.0 added an option to only allow the deserialization of whitelisted classes via the "options['allowed_classes']" parameter to combat code-injection.

    I'm proposing adding an options to PhpSerialize class to uses this whitelist.

    Practical application: this could be used in "zend-i18n" (using "zend-cache" and "zend-serializer") for the translation-cache. It should only allow the deserialization of objects that are instance of Zend\I18n\Translator\TextDomain (or plain arrays).

    Reviewed by MatthiasKuehneEllerhold at 2018-03-19 12:02
  • 5. Failed test with PHP 7.x

    Discovered in Fedora CI,

    There was 1 failure:
    1) ZendTest\Serializer\Adapter\WddxTest::testUnserializeFalse
    Failed asserting that true matches expected false.

    Not detected by travis as wddx extension is not available, and not yet covered by PHP test suite. Can you please enable it ?

    This is an upstream bug, see Fix will be in 7.0.10

    So mostly for your information

    Reviewed by remicollet at 2016-07-08 08:52
  • 6. More aliases, fewer factories

    • Aliases typically need to be in each of:
      • lowercase
      • camelCase
      • TitleCase
    • Factories mapping to the InvokableFactory must be FQCNs only. The normalized version used in v2 (stripping special characters and lowercasing) will likely never be used to retrieve a service, and can be skipped.
    Reviewed by weierophinney at 2016-01-19 20:39
  • 7. Class 'Zend\Serializer\Serializer' not found

    Apache/2.4.20 (Win32) PHP/5.6.21 Exception in …\vendor\zendframework\zend-cache\src\Storage\Plugin\PluginOptions.php:215

    $cache = StorageFactory::factory([
    			'adapter' => [
    				'name' => 'filesystem',
    			'plugins' => [
    				// Don't throw exceptions on cache errors
    				'exception_handler' => [
    					'throw_exceptions' => false
    Reviewed by newbie78 at 2017-03-03 17:50
  • 8. Updated to php-coveralls/php-coveralls

    With version 2 package has been renamed from satooshi/php-coveralls to php-coveralls/php-coveralls, and the script has been renamed from coveralls to php-coveralls

    Reviewed by michalbundyra at 2017-12-14 10:45
  • 9. Updated docs and fixed deps

    Release 2.8.1 fixes failing tests in PR There is added redundant doctrine dependency. In other repositories we handled this situation by updating legacy deps on testing with locked dependencies to make sure we have installed correct dependencies on each PHP version.

    This PR provides also changes to the documentation of the library done by zf-maintainer tool (see maintainers repo) and adds support for PHPUnit 6.4.

    Travis CI configuration is now updated - dropped HHVM support and added PHP 7.1 & 7.2 builds.

    Reviewed by michalbundyra at 2017-11-22 19:47
  • 10. Updated dependencies

    • Use ^ operator when possible
    • Updated zend-stdlib to ^2.7 || ^3.0, as the changes in zend-stdlib 3.0 will not affect the functionality in this repository. This allows it to be used as a dev dependency for zend-stdlib v3 as well.
    Reviewed by weierophinney at 2016-02-03 14:31
  • 11. unserialize should raise exception on not serialized input

    Every adapter should raise an exception if the input for unserialize is not a serialized string.

    The bug was introduced on Dec 16, 2011 here

    Reviewed by marc-mabe at 2016-01-17 14:50
  • 12. Remove adapter PhpCode

    ... because it's using eval.

    It's only useful for testing/debugging but to dangerous to use for wrong purpose. Because of that I propose to remove this adapter as it's also really simple to write it byself in case someone really needs it.

    See #5

    PS: The serializer can't use PHP's opcache as that would be another possible use as pointed out by @Ocramius - but as told it cant be done by serializer component and would live better in zend-cache.

    Reviewed by marc-mabe at 2017-11-20 22:30
Authentication component from Zend Framework

zend-authentication Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-authentication. The Zend\Authentication component pro

Jun 13, 2021
ServiceManager component from Zend Framework

zend-servicemanager Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-servicemanager. Master: Develop: The Service Locator

Feb 13, 2022
Console component from Zend Framework

zend-console Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-console. Zend\Console is a component to design and implement

Mar 16, 2021
Cryptographic component from Zend Framework

zend-crypt Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-crypt. Zend\Crypt provides support of some cryptographic tools

Dec 4, 2021
Db component from Zend Framework

zend-db Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-db. Zend\Db is a component that abstract the access to a Database

Jan 26, 2022
Debug component from Zend Framework

zend-debug Zend\Debug is a component that help the debugging of PHP applications. In particular it offers a static method Zend\Debug\Debug::dump() tha

Jan 29, 2020
Navigation component from Zend Framework

zend-navigation Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-navigation. Zend\Navigation is a component for managing t

Jun 30, 2021
Json component from Zend Framework

zend-json Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-json. Zend\Json provides convenience methods for serializing na

Jan 13, 2022
Flexible serializer encouraging good object design

Serializard Serializard is a library for (un)serialization of data of any complexity. Its main focus is to give user as much flexibility as possible b

Jan 15, 2021
An HTML5 parser and serializer for PHP.

HTML5-PHP HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP. It is stable and used in many production websites, and has w

May 17, 2022
JSON:API serializer for PHP resources

kwai-jsonapi A JSON:API serializer for PHP classes using PHP attributes. Currently, this library has no support for links. Installation composer requi

Jan 19, 2022
Igbinary is a drop in replacement for the standard php serializer.

igbinary Igbinary is a drop in replacement for the standard php serializer. Instead of the time and space consuming textual representation used by PHP

Apr 29, 2022
A panel created based on the Zend Framework MVC framework
A panel created based on the Zend Framework MVC framework

?? Painel MyZap2.0 Com ZendFramework 3 Descrição Esse é um painel criado como estudo pessoal do framework (Zend Framework MVC) não foi criado para fin

Mar 19, 2022
Official Zend Framework repository
Official Zend Framework repository

Welcome to the Zend Framework 3.0 Release! RELEASE INFORMATION Zend Framework 3.0.1dev This is the first maintenance release for the Zend Framework 3

May 15, 2022
Converts a string to a slug. Includes integrations for Symfony, Silex, Laravel, Zend Framework 2, Twig, Nette and Latte.

cocur/slugify Converts a string into a slug. Developed by Florian Eckerstorfer in Vienna, Europe with the help of many great contributors. Features Re

May 20, 2022
Zend Framework cache backend for MongoDB

Zend_Cache_Backend_Mongo Author: Anton Stöckl About Zend_Cache_Backend_Mongo is a Zend Framework Cache Backend for MongoDB. It supports tags and autoc

Feb 19, 2020
A skeleton application using the Zend Framework MVC

This is a skeleton application using the Zend Framework MVC layer and module systems. This application is meant to be used as a starting place for those looking to get their feet wet with Zend Framework.

May 15, 2022
💗 C++ wrapper for Zend API
💗 C++ wrapper for Zend API

PHP-X C++ wrapper for Zend API Requirements PHP 7.2 or later Linux/MacOS/Windows GCC 4.8 or later Composer Build phpx (bin) ./ sudo cp bin/php

May 6, 2022
zend-config is designed to simplify access to configuration data within applications

zend-config is designed to simplify access to configuration data within applications

Jan 13, 2022
zend-memory manages data in an environment with limited memory

Memory objects (memory containers) are generated by the memory manager, and transparently swapped/loaded when required.

Aug 29, 2020