coverage++
[awesomized/ext-ion] / README.md
1 # ext-ion
2
3 PHP extension wrapping [amzn/ion-c](https://github.com/amzn/ion-c).
4 See the [Amazon ION specification](https://amzn.github.io/ion-docs/).
5
6 ## License
7 [BSD-2-Clause](https://github.com/awesomized/ext-ion/blob/master/LICENSE);
8 see [spdx.org](https://spdx.org/licenses/BSD-2-Clause.html).
9
10 ## Install
11 ### Dependencies
12 #### Required
13 * PHP-8.1
14 * ext/date (standard)
15 * ext/spl (standard)
16 #### Optional
17 * [amzn/ion-c](https://github.com/amzn/ion-c) (bundled as git submodule)
18
19 ### Trinity
20 ```shell
21 phpize
22 ./configure
23 make # -j$(nproc)
24 sudo make install # INSTALL=install
25 ```
26 ### Try with Docker
27 ```shell
28 docker build -t php-ion
29 docker run --rm php-ion -r 'echo ion\serialize(ion\Symbol\Table\PHP());'
30 ```
31 ### PECL
32 > WIP
33 ### PHARext
34 > WIP
35
36 ## IDE Stub
37 See [ion.stub.php](https://github.com/awesomized/ext-ion/blob/master/ion.stub.php).
38
39 ## Known Issues
40 Due to private internal state of ion-c's readers and writers,
41 instances of the following PHP classes cannot be cloned:
42 * ion\Reader\Reader
43 * ion\Writer\Writer
44 * ion\Serializer\PHP
45 * ion\Unserializer\PHP