Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of niche serializer adapters #27

Merged
merged 3 commits into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"extensions": [
"bcmath",
"igbinary",
"msgpack"
"igbinary"
]
}
4 changes: 0 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.4.0",
"laminas/laminas-math": "^3.6",
"phpunit/phpunit": "^9.5.25"
},
"suggest": {
"laminas/laminas-math": "(^3.3) To support Python Pickle serialization"
},
"autoload": {
"psr-4": {
"Laminas\\Serializer\\": "src/"
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 0 additions & 68 deletions docs/book/adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,6 @@ this adapter.

There are no configurable options for this adapter.

## The Wddx Adapter

[WDDX](http://wikipedia.org/wiki/WDDX) (Web Distributed Data eXchange) is a
programming-language-, platform-, and transport-neutral data interchange
mechanism for passing data between different environments and different
computers.

The adapter uses the [wddx](http://php.net/wddx) PHP functions. Please read the
PHP manual to determine how you may enable them in your installation.

Additionally, the [SimpleXML](http://php.net/simplexml) extension is used to
check if a returned `NULL` value from `wddx_unserialize()` is based on a
serialized `NULL` or on invalid data.

Available options include:

Option | Data Type | Default Value | Description
------- | --------- | ------------- | -----------
comment | `string` | | An optional comment that appears in the packet header.

## The Json Adapter

The [JSON](http://wikipedia.org/wiki/JavaScript_Object_Notation) adapter provides a bridge to the
Expand All @@ -69,54 +49,6 @@ Option | Data Type | Default Value
`object_decode_type` | `Laminas\Json\Json::TYPE_*` | `Laminas\Json\Json::TYPE_ARRAY`
`enable_json_expr_finder` | `boolean` | `false`

## The PythonPickle Adapter

This adapter converts PHP types to a [Python Pickle](http://docs.python.org/library/pickle.html)
string representation. With it, you can read the serialized data with Python and
read Pickled data from Python with PHP.

This adapter requires the [laminas-math](https://docs.laminas.dev/laminas-math/) component:

```bash
$ composer require laminas/laminas-math
```

Available options include:

Option | Data Type | Default Value | Description
---------|---------------------|---------------|------------
protocol | `integer` (0/1/2/3) | 0 | The Pickle protocol version used on serialize

### Datatype merging (PHP to Python Pickle)

PHP Type | Python Pickle Type
------------ | ------------------
`NULL` | None
`boolean` | `boolean`
`integer` | `integer`
`float` | `float`
`string` | `string`
`array` list | `list`
`array` map | `dictionary`
`object` | `dictionary`

### Datatype merging (Python Pickle to PHP)

Python Pickle Type | PHP Type
-------------------|---------
`None` | `NULL`
`boolean` | `boolean`
`integer` | `integer`
`long` | `integer`, `float`, `string`, or `Laminas\Serializer\Exception\ExceptionInterface`
`float` | `float`
`string` | `string`
`bytes` | `string`
`unicode string` | `string` UTF-8
`list` | `array` list
`tuple` | `array` list
`dictionary` | `array` map
All other types | `Laminas\Serializer\Exception\ExceptionInterface`

## The PhpCode Adapter

The `Laminas\Serializer\Adapter\PhpCode` adapter generates a parsable PHP code
Expand Down
91 changes: 0 additions & 91 deletions src/Adapter/MsgPack.php

This file was deleted.

Loading