Skip to content

Commit

Permalink
Add support for Laravel 7 (#23)
Browse files Browse the repository at this point in the history
* Add support for Laravel 7

* Remove local CS style fixer

Co-authored-by: antonkomarev <[email protected]>
  • Loading branch information
ivanvermeyen and antonkomarev authored Mar 6, 2020
1 parent aabe5f5 commit 6ed4d68
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 77 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/CODE_OF_CONDUCT.md export-ignore
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vendor/
.php_cs.cache
.phpunit.result.cache
composer.lock
composer.phar
Expand Down
64 changes: 0 additions & 64 deletions .php_cs

This file was deleted.

10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to `cybercog/laravel-optimus` will be documented in this fil

## [Unreleased]

## [3.4.2] - 2020-03-06

### Added

- ([#23]) Laravel 7.x support

## [3.4.1] - 2020-02-29

## Fixed
Expand Down Expand Up @@ -69,7 +75,8 @@ All notable changes to `cybercog/laravel-optimus` will be documented in this fil

Initial release

[Unreleased]: https://github.com/cybercog/laravel-optimus/compare/3.4.1...master
[Unreleased]: https://github.com/cybercog/laravel-optimus/compare/3.4.2...master
[3.4.2]: https://github.com/cybercog/laravel-optimus/compare/3.4.1...3.4.2
[3.4.1]: https://github.com/cybercog/laravel-optimus/compare/3.4.0...3.4.1
[3.4.0]: https://github.com/cybercog/laravel-optimus/compare/3.3.0...3.4.0
[3.3.0]: https://github.com/cybercog/laravel-optimus/compare/3.2.0...3.3.0
Expand All @@ -79,6 +86,7 @@ Initial release
[2.1.0]: https://github.com/cybercog/laravel-optimus/compare/2.0.0...2.1.0
[2.0.0]: https://github.com/cybercog/laravel-optimus/compare/1.0.0...2.0.0

[#23]: https://github.com/cybercog/laravel-optimus/pull/23
[#22]: https://github.com/cybercog/laravel-optimus/pull/22
[#20]: https://github.com/cybercog/laravel-optimus/pull/20
[#15]: https://github.com/cybercog/laravel-optimus/pull/15
Expand Down
6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ Due to time constraints, we are not always able to respond as quickly as we woul

## Coding Guidelines

This project comes with a configuration file for php-cs-fixer (.php_cs) that you can use to (re)format your sourcecode for compliance with this project's coding guidelines:

```shell script
$ vendor/bin/php-cs-fixer fix
```
This project follows [PSR-12 coding style guide](https://www.php-fig.org/psr/psr-12/).

## PHPUnit tests

Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@
"require": {
"php": "^7.1.3",
"graham-campbell/manager": "^4.0",
"illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*|^6.0",
"illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*|^6.0",
"illuminate/contracts": "^5.5|^6.0|^7.0",
"illuminate/support": "^5.5|^6.0|^7.0",
"jenssegers/optimus": "^0.2.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.10",
"graham-campbell/testbench": "^5.0",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^6.5|^7.0|^8.0"
"phpunit/phpunit": "^6.5|^7.0|^8.0|^9.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 2 additions & 1 deletion src/Traits/OptimusEncodedRouteKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ public function getRouteKey()
* Retrieve the model for a bound value.
*
* @param mixed $value
* @param string|null $field
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function resolveRouteBinding($value)
public function resolveRouteBinding($value, $field = null)
{
if (is_string($value) && ctype_digit($value)) {
$value = (int) $value;
Expand Down

0 comments on commit 6ed4d68

Please sign in to comment.