Skip to content

Laravel 5.8 support #3

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

Merged
merged 2 commits into from
Apr 8, 2019
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
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ language: php

matrix:
include:
- php: "7.0"
env: LARAVEL_VERSION="5.5.*"
- php: "7.1"
env: LARAVEL_VERSION="5.5.*"
- php: "7.2"
env: LARAVEL_VERSION="5.5.*"
- php: "7.2"
env: LARAVEL_VERSION="5.6.*"
- php: "7.2"
env: LARAVEL_VERSION="5.7.*" RUN_CS_FIXER=1
env: LARAVEL_VERSION="5.7.*"
- php: "7.2"
env: LARAVEL_VERSION="5.8.*" RUN_CS_FIXER=1

sudo: false

Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to `swisnl/laravel-javascript-data-response` will be documen

Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [Unreleased]

### Added
- Added support for Laravel 5.8.

### Changed
- Dropped Laravel <5.5 support.
- Dropped PHP <7.1 support.

## 1.0.0 - 2018-09-07

### Added
Expand Down
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ JavaScript data response macro for Laravel
$ composer require swisnl/laravel-javascript-data-response
```

### Laravel Service Provider

If you are using Laravel < 5.5 or have disabled package auto discover, you must add the service provider to your `config/app.php` file:

``` php
'providers' => [
...,
\Swis\Laravel\JavaScriptData\ServiceProvider::class,
],
```

## Usage

This package adds a response macro (similar to Response::jsonp) which you can use just like any other response e.g.
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
}
],
"require": {
"php" : ">=7.0",
"illuminate/http": "^5.0,<5.8",
"illuminate/routing": "^5.0,<5.8",
"illuminate/support": "^5.0,<5.8"
"php" : ">=7.1.3",
"illuminate/http": "5.5.*|5.6.*|5.7.*|5.8.*",
"illuminate/routing": "5.5.*|5.6.*|5.7.*|5.8.*",
"illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0",
"orchestra/testbench": "^3.5",
"phpunit/phpunit": "^6.1|^7.0"
"graham-campbell/testbench": "^5.1",
"phpunit/phpunit": "^6.1|^7.0|^8.0"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 2 additions & 4 deletions tests/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,11 @@ public function itBuildsWithJsonSerializableData()

/**
* @test
*
* @expectedException \InvalidArgumentException
* @expectedExceptionCode 5
* @expectedExceptionMessage Malformed UTF-8 characters, possibly incorrectly encoded
*/
public function itThrowsWhenJsonEncodeFailed()
{
$this->expectExceptionObject(new \InvalidArgumentException('Malformed UTF-8 characters, possibly incorrectly encoded', 5));

$builder = new Builder();
$builder->build('namespace', "\x80");
}
Expand Down