would be nice if we could return a cacnonical path to the cli server
[awesomized/ext-ion] / README.md
1 # pecl/ion
2
3 ## About:
4 PHP extension wrapping [amzn/ion-c](https://github.com/amzn/ion-c).
5 See the [Amazon ION specification](https://amzn.github.io/ion-docs/).
6
7 ## License:
8 [BSD-2-Clause](https://github.com/awesomized/ext-ion/blob/master/LICENSE);
9 see [spdx.org](https://spdx.org/licenses/BSD-2-Clause.html).
10
11 ## Installation:
12
13 ### PECL
14
15 pecl install ion
16
17
18 ### PHARext
19
20 Watch out for [PECL replicates](https://replicator.pharext.org?ion)
21 and pharext packages attached to [releases](./releases).
22
23 ### Checkout
24
25 git clone github.com:awesomized/ext-ion
26
27 cd ext-ion
28
29 /path/to/phpize
30 ./configure --with-php-config=/path/to/php-config
31 make
32 sudo make install
33
34 ### Dependencies:
35 #### Required:
36 * PHP-8.1
37 * ext/date (standard)
38 * ext/spl (standard)
39 #### Optional:
40 * [amzn/ion-c](https://github.com/amzn/ion-c) (bundled as git submodule)
41
42 ### Trinity:
43 ```shell
44 phpize
45 ./configure
46 make # -j$(nproc)
47 sudo make install # INSTALL=install
48 ```
49 ### Try with Docker:
50 ```shell
51 docker build -t php-ion
52 docker run --rm php-ion -r 'echo ion\serialize(ion\Symbol\PHP::asTable());'
53 ```
54
55 ## Editor Stub:
56 See [ion.stub.php](https://github.com/awesomized/ext-ion/blob/master/ion.stub.php).
57
58 ## Known Issues:
59 Due to private internal state of ion-c's readers and writers,
60 instances of the following PHP classes cannot be cloned:
61 * ion\Reader\Reader
62 * ion\Writer\Writer
63 * ion\Serializer\PHP
64 * ion\Unserializer\PHP