Skip to content

Commit

Permalink
Support for TOML 0.4.0 spec
Browse files Browse the repository at this point in the history
  • Loading branch information
yosymfony committed Mar 6, 2015
2 parents dcd3590 + b4d8aad commit d9bb8d4
Show file tree
Hide file tree
Showing 32 changed files with 1,183 additions and 179 deletions.
35 changes: 18 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
CHANGELOG
=========

0.1.0 (2013-05-12)
------------------
0.3.0
-----
* Support for TOML 0.4.0.
* CS fixes.

* Initial release.
* Support to TOML 0.1.0.
* BurntSushi test suite included.
* Included TomlBuilder for create inline TOML strings.
0.2.0 (2014-05-03)
--------------------
* Support for TOML 0.2.0.
* New tests for arrays of tables.
* TomlBuilder: new methods addTable
* TomlBuilder: Deprecated methods addGroup.
* Fixtures folder in tests renamed to fixtures.
* Fixtures reorganized.

0.1.1 (2013-12-14)
------------------
Expand All @@ -16,15 +22,10 @@ CHANGELOG
* Added travis configuration file.
* Fixed some issues in README.md.

0.2.0 (2014-05-03)
--------------------
* Support to TOML 0.2.0.
* New tests for arrays of tables.
* TomlBuilder: new methods addTable
* TomlBuilder: Deprecated methods addGroup.
* Fixtures folder in tests renamed to fixtures.
* Fixtures reorganized.
0.1.0 (2013-05-12)
------------------

0.2.1
-----
* CS fixes.
* Initial release.
* Support for TOML 0.1.0.
* BurntSushi test suite included.
* Included TomlBuilder for create inline TOML strings.
48 changes: 33 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,60 @@
TOML parser for PHP
===================

A PHP parser for [TOML](https://github.com/toml-lang/toml) compatible with [TOML v0.2.0](https://github.com/toml-lang/toml/releases/tag/v0.2.0).
A PHP parser for [TOML](https://github.com/toml-lang/toml) compatible with [TOML v0.4.0](https://github.com/toml-lang/toml/releases/tag/v0.4.0).

[![Build Status](https://travis-ci.org/yosymfony/Toml.png?branch=master)](https://travis-ci.org/yosymfony/Toml)
[![Build Status](https://travis-ci.org/yosymfony/Toml.png?branch=develop)](https://travis-ci.org/yosymfony/Toml)
[![Latest Stable Version](https://poser.pugx.org/yosymfony/toml/v/stable.png)](https://packagist.org/packages/yosymfony/toml)
[![Total Downloads](https://poser.pugx.org/yosymfony/toml/downloads.png)](https://packagist.org/packages/yosymfony/toml)

Support:

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/yosymfony/Toml?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Installation
------------

Use [Composer](http://getcomposer.org/) to install Yosyfmony Toml package:

Add the following to your `composer.json` and run `composer update`.

"require": {
"yosymfony/toml": "0.2.x-dev"
}
```json
"require": {
"yosymfony/toml": "0.3.x-dev"
}
```

Develop branch (unstable):

```
"require": {
"yosymfony/toml": "dev-develop"
}
```

More informations about the package on [Packagist](https://packagist.org/packages/yosymfony/toml).

Usage
-----
You can use this package to parse TOML string inline or from a file with only one method:

use Yosymfony\Toml\Toml;

$array = Toml::Parse('key = [1,2,3]');

print_r($array);
```php
use Yosymfony\Toml\Toml;

$array = Toml::Parse('key = [1,2,3]');

print_r($array);
```

From a file:

use Yosymfony\Toml\Toml;

$array = Toml::Parse('example.toml');

print_r($array);
```php
use Yosymfony\Toml\Toml;

$array = Toml::Parse('example.toml');

print_r($array);
```

### TomlBuilder
You can create inline TOML string with TomlBuilder. TomlBuilder uses Fluent interface for more readable code:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yosymfony/toml",
"description": "A PHP parser for TOML compatible with specification 0.2.0",
"description": "A PHP parser for TOML compatible with specification 0.4.0",
"type": "library",
"keywords": ["toml", "parser", "mojombo"],
"homepage": "http://github.com/yosymfony/toml",
Expand All @@ -16,11 +16,11 @@
"php": ">=5.3.0"
},
"autoload": {
"psr-0": { "Yosymfony\\Toml": "src/" }
"psr-4": { "Yosymfony\\Toml\\": "src/" }
},
"extra": {
"branch-alias": {
"dev-master": "0.2-dev"
"dev-master": "0.3-dev"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d9bb8d4

Please sign in to comment.