Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/v2.0.0'
Browse files Browse the repository at this point in the history
* release/v2.0.0:
  Bump version
  Apply PHPUnit 8 updates
  Require PHP 7.2 & Laravel 5.8
  Utilize support helpers
  Add support for Larastan
  Update slack link
  Tweak and simplify FormRequest validations
  Rename environment variable QUEUE_DRIVER to QUEUE_CONNECTION
  Fix MySQL / PostgreSQL json column compatibility
  • Loading branch information
Omranic committed Mar 3, 2019
2 parents 953dbb2 + 1a34489 commit b2b582a
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 35 deletions.
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
language: php

php:
- 7.1
- 7.2
- 7.3
- 7.1
- 7.2
- 7.3

env:
matrix:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""

cache:
directories:
- $HOME/.composer/cache
- $HOME/.composer/cache

before_script:
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source

script:
- vendor/phpunit/phpunit/phpunit --coverage-text --coverage-clover=coverage.clover
- vendor/phpunit/phpunit/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

notifications:
email: false
slack:
rooms:
- secure: H+TE/kZPvRXXO1gvQYlAzgDnal/Cdvr83PUA60HUHWFvPBrBzR8ION8mzVPorl3PLCuDs7d6Afb8iUe6Rf3jGeOuVo9znJ/Ilpf3l2jPWpBL5JHaH9/G+3kDQbbMCxApWWTDkzBLsP4phDNDjJMT07buHYw57iF+OWvtu1rO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FJVbAs96pt4BKt3pQfAQikMLBk8Bm0QM50+r0mQZX1eRDhn2iYKYm/gogyIImeo43F9nVLhtN2QqEhfIn7scRFeSqHkFRWFHYP8Q89+M5NC0zge0+hjz4ZKk/YX1Slwz0u0SRsnPY=
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](CONTRIBUTING.md).


## [v2.0.0] - 2019-03-03
- Rename environment variable QUEUE_DRIVER to QUEUE_CONNECTION
- Require PHP 7.2 & Laravel 5.8
- Apply PHPUnit 8 updates
- Tweak and simplify FormRequest validations
- Fix MySQL / PostgreSQL json column compatibility

## [v1.0.1] - 2018-12-22
- Update composer dependencies
- Add PHP 7.3 support to travis
- Fix MySQL / PostgreSQL data type compatibility
- Fix MySQL / PostgreSQL json column compatibility

## [v1.0.0] - 2018-10-01
- Enforce Consistency
Expand Down Expand Up @@ -85,6 +92,7 @@ This project adheres to [Semantic Versioning](CONTRIBUTING.md).
## v0.0.1 - 2017-04-08
- Rename package to "rinvex/attributable" from "rinvex/sparse" based on 715a831

[v2.0.0]: https://github.com/rinvex/laravel-attributes/compare/v1.0.1...v2.0.0
[v1.0.1]: https://github.com/rinvex/laravel-attributes/compare/v1.0.0...v1.0.1
[v1.0.0]: https://github.com/rinvex/laravel-attributes/compare/v0.0.7...v1.0.0
[v0.0.7]: https://github.com/rinvex/laravel-attributes/compare/v0.0.6...v0.0.7
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ Refer to the [Changelog](CHANGELOG.md) for a full history of the project.

The following support channels are available at your fingertips:

- [Chat on Slack](http://chat.rinvex.com)
- [Chat on Slack](https://bit.ly/rinvex-slack)
- [Help on Email](mailto:help@rinvex.com)
- [Follow on Twitter](https://twitter.com/rinvex)

Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,23 @@
}
],
"require": {
"php": "^7.1.3",
"illuminate/console": "~5.7.0",
"illuminate/database": "~5.7.0",
"illuminate/support": "~5.7.0",
"php": "^7.2.0",
"illuminate/console": "~5.8.0",
"illuminate/database": "~5.8.0",
"illuminate/support": "~5.8.0",
"jeremeamia/superclosure": "^2.4.0",
"rinvex/laravel-cacheable": "^1.0.0",
"rinvex/laravel-support": "^1.0.0",
"rinvex/laravel-cacheable": "^2.0.0",
"rinvex/laravel-support": "^2.0.0",
"spatie/eloquent-sortable": "^3.4.0",
"spatie/laravel-sluggable": "^2.1.0",
"spatie/laravel-translatable": "^3.1.0",
"watson/validating": "^3.1.0"
"watson/validating": "^3.2.0"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.23.0",
"illuminate/container": "~5.7.0",
"codedungeon/phpunit-result-printer": "^0.26.0",
"illuminate/container": "~5.8.0",
"orchestra/testbench": "^3.6",
"phpunit/phpunit": "^7.0.0"
"phpunit/phpunit": "^8.0.0"
},
"autoload": {
"classmap": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ protected function jsonable(): string
$driverName = DB::connection()->getPdo()->getAttribute(PDO::ATTR_DRIVER_NAME);
$dbVersion = DB::connection()->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION);
$isOldVersion = version_compare($dbVersion, '5.7.8', 'lt');

if ($driverName === 'mysql' && $isOldVersion) {
return 'text';
}

return 'json';

return $driverName === 'mysql' && $isOldVersion ? 'text' : 'json';
}
}
6 changes: 6 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
includes:
- ./vendor/nunomaduro/larastan/extension.neon
parameters:
level: 5
paths:
- src
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<env name="APP_ENV" value="testing" />
<env name="CACHE_DRIVER" value="array" />
<env name="SESSION_DRIVER" value="array" />
<env name="QUEUE_DRIVER" value="sync" />
<env name="QUEUE_CONNECTION" value="sync" />
<env name="DB_CONNECTION" value="sqlite" />
<env name="DB_DATABASE" value=":memory:" />
</php>
Expand Down
3 changes: 1 addition & 2 deletions src/Traits/Attributable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Schema;
use Closure;
use Illuminate\Support\Arr;
use SuperClosure\Serializer;
use Rinvex\Attributes\Models\Value;
use Rinvex\Attributes\Models\Attribute;
Expand Down Expand Up @@ -99,7 +98,7 @@ public function relationsToArray()
if (is_null($namespace = $this->getEntityAttributesNamespace())) {
$attributes = array_merge($attributes, $eavAttributes);
} else {
Arr::set($attributes, $namespace, $eavAttributes);
array_set($attributes, $namespace, $eavAttributes);
}

return $attributes;
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/ServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public function it_has_provides_method()

$msg = "Expected class '{$class}' to provide a valid list of services.";

$this->assertInternalType('array', $method->invoke(new $class(new Container())), $msg);
$this->assertIsArray($method->invoke(new $class(new Container())), $msg);
}
}
2 changes: 1 addition & 1 deletion tests/Feature/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class TestCase extends \Orchestra\Testbench\TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down

0 comments on commit b2b582a

Please sign in to comment.