Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mtvbrianking committed Mar 10, 2020
1 parent b7fb617 commit 991d3d9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 81 deletions.
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"laravel",
"package",
"xml",
"middleware",
"request",
"response",
"support"
"middleware"
],
"authors": [
{
Expand All @@ -21,12 +21,14 @@
}
],
"require": {
"php": ">=5.6.4",
"illuminate/http": "~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0"
"php": "^7.2.5",
"illuminate/http": "^7.0",
"illuminate/support": "^7.0",
"illuminate/database": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "~5.0|~5.7|~6.0|^7.0|^7.5|^8.0|^8.4|^9.0",
"orchestra/testbench": "~3.3.0|~3.4.0|~3.5.0|~3.6.0|~3.7.0|~3.8.0|^4.0|^5.0"
"phpunit/phpunit": "^8.4|^9.0",
"orchestra/testbench": "^5.0"
},
"autoload": {
"psr-4": {
Expand Down
76 changes: 38 additions & 38 deletions composer.lock

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

40 changes: 3 additions & 37 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,14 @@
This package comes with the much desired xml support for you Laravel project including middleware to accept only xml requests,
http response in xml, and more utilities for xml conversions as well as validation.

**Supports:** Laravel versions 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.0, 7.0
**Supports:** Laravel versions from v5.3 up to v7.0

### Installation

`$ composer require bmatovu/laravel-xml`

**Register Service Provider**

Only for Laravel versions 5.3 and 5.4. For later Laravel versions, this package will be [auto-discovered](https://laravel.com/docs/master/packages#package-discovery).

In `config/app.php`

```php
'providers' => array(
// ...
Bmatovu\LaravelXml\LaravelXmlServiceProvider::class,
),
```

**Register Alias**

In `config/app.php`

```php
'aliases' => [
// ...
'Xml' => Bmatovu\LaravelXml\LaravelXml::class,
],
```bash
$ composer require bmatovu/laravel-xml
```

If you cached your configurations, you need to run;

`$ php artisan config:cache`

### Requests

Get the request content (body).
Expand All @@ -66,15 +40,11 @@ $request->wantsXml();
Validate XML content

```php
use Xml;

Xml::is_valid($request->xml());
```

**Validation** - Against XML Schema Definition
```php
use Xml;

$errors = Xml::validate($request->xml(), 'path_to/sample.xsd');

if ($errors) {
Expand Down Expand Up @@ -154,8 +124,6 @@ In case of the request `content-type` is not xml, the response will be;
**Encode: Array to Xml**

```php
use Xml;

Xml::encode(['key' => 'value']);
```

Expand All @@ -169,8 +137,6 @@ xml_encode(['key' => 'value']);
**Decode: Xml to Array**

```php
use Xml;

Xml::decode('<?xml version="1.0" encoding="UTF-8"?><document><key>value</key></document>');
```

Expand Down

0 comments on commit 991d3d9

Please sign in to comment.