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

Commit 63c1022

Browse files
committed
Merge branch 'release/v1.0.1'
* release/v1.0.1: Bump version Fix MySQL / PostgreSQL json column compatibility Add PHP 7.3 support to travis Update readme Update composer dependencies #18 add missing use statement Update copyright year Fix minor grammar typos Enforce consistent composer package version constrains
2 parents 8360997 + c3c29c6 commit 63c1022

9 files changed

+33
-16
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ language: php
33
php:
44
- 7.1
55
- 7.2
6+
- 7.3
67

78
env:
89
matrix:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
This project adheres to [Semantic Versioning](CONTRIBUTING.md).
66

77

8+
## [v1.0.1] - 2018-12-22
9+
- Add missing use statement
10+
- Update composer dependencies
11+
- Add PHP 7.3 support to travis
12+
- Fix MySQL / PostgreSQL json column compatibility
13+
814
## [v1.0.0] - 2018-10-01
915
- Enforce Consistency
1016
- Support Laravel 5.7+
@@ -70,6 +76,7 @@ This project adheres to [Semantic Versioning](CONTRIBUTING.md).
7076
## v0.0.1 - 2017-09-08
7177
- Tag first release
7278

79+
[v1.0.1]: https://github.com/rinvex/laravel-bookings/compare/v1.0.0...v1.0.1
7380
[v1.0.0]: https://github.com/rinvex/laravel-bookings/compare/v0.0.3...v1.0.0
7481
[v0.0.3]: https://github.com/rinvex/laravel-bookings/compare/v0.0.2...v0.0.3
7582
[v0.0.2]: https://github.com/rinvex/laravel-bookings/compare/v0.0.1...v0.0.2

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Releases will be numbered with the following format:
1515
And constructed with the following guidelines:
1616

1717
- Breaking backward compatibility bumps the major and resets the minor and patch.
18-
- New additions without breaking backward compatibility bumps the minor and resets the patch.
19-
- Bug fixes and misc changes bumps the patch.
18+
- New additions without breaking backward compatibility bump the minor and reset the patch.
19+
- Bug fixes and misc changes bump the patch.
2020

2121

2222
## Pull Requests

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016-2018, Rinvex LLC,
3+
Copyright (c) 2016-2019, Rinvex LLC,
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@
3030
php artisan rinvex:migrate:bookings
3131
```
3232

33-
3. Done!
33+
3. **Optional** if you want to change the configurations:
34+
```shell
35+
php artisan rinvex:publish:bookings
36+
```
37+
38+
4. Done!
3439

3540

3641
## Usage
@@ -307,4 +312,4 @@ Rinvex is a software solutions startup, specialized in integrated enterprise sol
307312
308313
This software is released under [The MIT License (MIT)](LICENSE).
309314
310-
(c) 2016-2018 Rinvex LLC, Some rights reserved.
315+
(c) 2016-2019 Rinvex LLC, Some rights reserved.

composer.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,16 @@
4444
"illuminate/console": "~5.7.0",
4545
"illuminate/database": "~5.7.0",
4646
"illuminate/support": "~5.7.0",
47-
"nesbot/carbon": "~1.22",
4847
"rinvex/laravel-cacheable": "^1.0.0",
49-
"rinvex/laravel-support": "v1.0.0",
48+
"rinvex/laravel-support": "^1.0.0",
5049
"spatie/eloquent-sortable": "^3.4.0",
51-
"spatie/laravel-schemaless-attributes": "~1.1.0",
50+
"spatie/laravel-schemaless-attributes": "~1.3.0",
5251
"spatie/laravel-sluggable": "^2.1.0",
53-
"spatie/laravel-translatable": "^2.1.0",
52+
"spatie/laravel-translatable": "^3.1.0",
5453
"watson/validating": "^3.1.0"
5554
},
5655
"require-dev": {
57-
"codedungeon/phpunit-result-printer": "^0.22.0",
56+
"codedungeon/phpunit-result-printer": "^0.23.0",
5857
"illuminate/container": "~5.7.0",
5958
"phpunit/phpunit": "^7.0.0"
6059
},

database/migrations/2017_06_27_143745_create_bookable_bookings_table.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ public function down(): void
5353
*/
5454
protected function jsonable(): string
5555
{
56-
return DB::connection()->getPdo()->getAttribute(PDO::ATTR_DRIVER_NAME) === 'mysql'
57-
&& version_compare(DB::connection()->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION), '5.7.8', 'ge')
58-
? 'json' : 'text';
56+
$driverName = DB::connection()->getPdo()->getAttribute(PDO::ATTR_DRIVER_NAME);
57+
$dbVersion = DB::connection()->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION);
58+
$isOldVersion = version_compare($dbVersion, '5.7.8', 'lt');
59+
60+
return $driverName === 'mysql' && $isOldVersion ? 'text' : 'json';
5961
}
6062
}

database/migrations/2018_04_04_154842_create_ticketable_tickets_table.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ public function down()
4949
*/
5050
protected function jsonable(): string
5151
{
52-
return DB::connection()->getPdo()->getAttribute(PDO::ATTR_DRIVER_NAME) === 'mysql'
53-
&& version_compare(DB::connection()->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION), '5.7.8', 'ge')
54-
? 'json' : 'text';
52+
$driverName = DB::connection()->getPdo()->getAttribute(PDO::ATTR_DRIVER_NAME);
53+
$dbVersion = DB::connection()->getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION);
54+
$isOldVersion = version_compare($dbVersion, '5.7.8', 'lt');
55+
56+
return $driverName === 'mysql' && $isOldVersion ? 'text' : 'json';
5557
}
5658
}

src/Traits/Bookable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Rinvex\Bookings\Traits;
66

7+
use Carbon\Carbon;
78
use Illuminate\Database\Eloquent\Model;
89
use Rinvex\Bookings\Models\BookableBooking;
910
use Illuminate\Database\Eloquent\Relations\MorphMany;

0 commit comments

Comments
 (0)