burzum / cakephp-serialize-data-types
Serialize-able data types for the CakePHP ORM
Installs: 6 092
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Type:cakephp-plugin
Requires
Requires (Dev)
This package is auto-updated.
Last update: 2021-01-19 18:48:27 UTC
README
Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.
The plugin will add data types that will allow you to store serialized data in your database.
Requirements
- CakePHP 3.0+
How to use?
Check the official documentation on how to use data types:
- http://book.cakephp.org/3.0/en/orm/saving-data.html#saving-complex-types
- http://book.cakephp.org/3.0/en/orm/database-basics.html#adding-custom-database-types
Serializeable Data Types
The following types are included in this plugin:
- Json (using json_decode and json_encode)
- Serialize (using serialize and unserialize)
Please notice this security warning from the official php documentation when using the Serialize data type:
Do not pass untrusted user input to unserialize(). Unserialization can result in code being loaded and executed due to object instantiation and autoloading, and a malicious user may be able to exploit this. Use a safe, standard data interchange format such as JSON (via json_decode() and json_encode()) if you need to pass serialized data to the user.
Support
For support and feature request, please visit the Support Site.
Branch strategy
- The master branch holds the
STABLE
latest version of the plugin. - The develop branch is
UNSTABLE
and used to test new features before releasing them. - Only hot fixes are accepted against the master branch.
Contributing to this Plugin
Please feel free to contribute to the plugin with new issues, requests, unit tests and code fixes or new features. If you want to contribute some code, create a feature branch from develop, and send us your pull request. Unit tests for new features and issues detected are mandatory to keep quality high.
- Pull requests must be send to the
develop
branch. - Contributions must follow the PSR2 coding standard recommendation.
- Unit tests are required.
License
Copyright 2013 - 2016 Florian Krämer
Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.