Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit 621236b

Browse files
Merge pull request #16 from michaeldyrynda/chore/laravel-6-compatibility
Add compatibility with Laravel 6
2 parents 54994c0 + 2e8e46f commit 621236b

File tree

5 files changed

+145
-45
lines changed

5 files changed

+145
-45
lines changed

.php_cs

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<?php
2+
3+
/**
4+
* PHP CS Fixer configuration
5+
*
6+
* @see https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
7+
*/
8+
$finder = \PhpCsFixer\Finder::create()
9+
->in(__DIR__)
10+
->exclude([
11+
'bootstrap',
12+
'storage',
13+
'vendor',
14+
])
15+
->name('*.php')
16+
->name('_ide_helper')
17+
->notName('*.blade.php')
18+
->notName('index.php')
19+
->notName('server.php')
20+
->ignoreDotFiles(true)
21+
->ignoreVCS(true);
22+
23+
return PhpCsFixer\Config::create()
24+
->setRiskyAllowed(true)
25+
->setUsingCache(true)
26+
->setRules([
27+
'binary_operator_spaces' => [
28+
'operators' => ['=>' => null]
29+
],
30+
'blank_line_after_namespace' => true,
31+
'blank_line_after_opening_tag' => true,
32+
'blank_line_before_statement' => true,
33+
'braces' => true,
34+
'cast_spaces' => true,
35+
'class_definition' => true,
36+
'concat_space' => true,
37+
'declare_equal_normalize' => true,
38+
'elseif' => true,
39+
'encoding' => true,
40+
'full_opening_tag' => true,
41+
'function_declaration' => true,
42+
'function_typehint_space' => true,
43+
'single_line_comment_style' => [
44+
'comment_types' => ['hash']
45+
],
46+
'heredoc_to_nowdoc' => true,
47+
'include' => true,
48+
'indentation_type' => true,
49+
'linebreak_after_opening_tag' => true,
50+
'lowercase_cast' => true,
51+
'lowercase_constants' => true,
52+
'lowercase_keywords' => true,
53+
'magic_constant_casing' => true,
54+
'method_argument_space' => true,
55+
'class_attributes_separation' => true,
56+
'visibility_required' => true,
57+
'native_function_casing' => true,
58+
'no_alias_functions' => true,
59+
'no_extra_blank_lines' => [
60+
'tokens' => [
61+
'extra',
62+
'throw',
63+
'use',
64+
'use_trait',
65+
]
66+
],
67+
'no_blank_lines_after_class_opening' => true,
68+
'no_blank_lines_after_phpdoc' => true,
69+
'no_closing_tag' => true,
70+
'no_empty_phpdoc' => true,
71+
'no_empty_statement' => true,
72+
'no_leading_import_slash' => true,
73+
'no_leading_namespace_whitespace' => true,
74+
'no_multiline_whitespace_around_double_arrow' => true,
75+
'multiline_whitespace_before_semicolons' => true,
76+
'no_short_bool_cast' => true,
77+
'no_singleline_whitespace_before_semicolons' => true,
78+
'no_spaces_after_function_name' => true,
79+
'no_spaces_around_offset' => true,
80+
'no_spaces_inside_parenthesis' => true,
81+
'no_trailing_comma_in_list_call' => true,
82+
'no_trailing_comma_in_singleline_array' => true,
83+
'no_trailing_whitespace' => true,
84+
'no_trailing_whitespace_in_comment' => true,
85+
'no_unneeded_control_parentheses' => true,
86+
'no_unreachable_default_argument_value' => true,
87+
'no_useless_return' => true,
88+
'no_whitespace_before_comma_in_array' => true,
89+
'no_whitespace_in_blank_line' => true,
90+
'normalize_index_brace' => true,
91+
'not_operator_with_successor_space' => true,
92+
'object_operator_without_whitespace' => true,
93+
'ordered_imports' => ['sortAlgorithm' => 'length'],
94+
'phpdoc_indent' => true,
95+
'phpdoc_inline_tag' => true,
96+
'phpdoc_no_access' => true,
97+
'phpdoc_no_package' => true,
98+
'phpdoc_no_useless_inheritdoc' => true,
99+
'phpdoc_scalar' => true,
100+
'phpdoc_single_line_var_spacing' => true,
101+
'phpdoc_summary' => true,
102+
'phpdoc_to_comment' => true,
103+
'phpdoc_trim' => true,
104+
'phpdoc_types' => true,
105+
'phpdoc_var_without_name' => true,
106+
'increment_style' => ['style' => 'post'],
107+
'no_mixed_echo_print' => true,
108+
'psr4' => true,
109+
'self_accessor' => true,
110+
'array_syntax' => ['syntax' => 'short'],
111+
'short_scalar_cast' => true,
112+
'simplified_null_return' => true,
113+
'single_blank_line_at_eof' => true,
114+
'single_blank_line_before_namespace' => true,
115+
'single_class_element_per_statement' => true,
116+
'single_import_per_statement' => true,
117+
'single_line_after_imports' => true,
118+
'single_quote' => true,
119+
'space_after_semicolon' => true,
120+
'standardize_not_equals' => true,
121+
'switch_case_semicolon_to_colon' => true,
122+
'switch_case_space' => true,
123+
'ternary_operator_spaces' => true,
124+
'trailing_comma_in_multiline_array' => true,
125+
'trim_array_spaces' => true,
126+
'unary_operator_spaces' => true,
127+
'line_ending' => true,
128+
'whitespace_after_comma_in_array' => true,
129+
'lowercase_static_reference' => true, // added from Symfony
130+
'magic_method_casing' => true, // added from Symfony
131+
'fully_qualified_strict_types' => true, // added
132+
])
133+
->setFinder($finder);

.travis.yml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,10 @@ cache:
66

77
matrix:
88
include:
9-
- php: 5.6.4
10-
env: ILLUMINATE_VERSION=5.4.*
11-
- php: 7.0
12-
env: ILLUMINATE_VERSION=5.4.*
13-
- php: 7.0
14-
env: ILLUMINATE_VERSION=5.5.*
15-
- php: 7.1
16-
env: ILLUMINATE_VERSION=5.4.*
17-
- php: 7.1
18-
env: ILLUMINATE_VERSION=5.5.*
19-
- php: 7.1
20-
env: ILLUMINATE_VERSION=5.6.*
21-
- php: 7.1
22-
env: ILLUMINATE_VERSION=5.7.*
23-
- php: 7.1
24-
env: ILLUMINATE_VERSION=5.8.*
259
- php: 7.2
26-
env: ILLUMINATE_VERSION=5.4.*
27-
- php: 7.2
28-
env: ILLUMINATE_VERSION=5.5.*
29-
- php: 7.2
30-
env: ILLUMINATE_VERSION=5.6.*
31-
- php: 7.2
32-
env: ILLUMINATE_VERSION=5.7.*
33-
- php: 7.2
34-
env: ILLUMINATE_VERSION=5.8.*
35-
- php: 7.3
36-
env: ILLUMINATE_VERSION=5.4.*
37-
- php: 7.3
38-
env: ILLUMINATE_VERSION=5.5.*
39-
- php: 7.3
40-
env: ILLUMINATE_VERSION=5.6.*
41-
- php: 7.3
42-
env: ILLUMINATE_VERSION=5.7.*
10+
env: ILLUMINATE_VERSION=6.0.*
4311
- php: 7.3
44-
env: ILLUMINATE_VERSION=5.8.*
12+
env: ILLUMINATE_VERSION=6.0.*
4513

4614
before_install: travis_retry composer require "illuminate/database:${ILLUMINATE_VERSION}" "illuminate/events:${ILLUMINATE_VERSION}" --no-update -v
4715

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"description": "A package to override Laravel migrations to more efficiently store UUID fields in your database",
44
"type": "utility",
55
"require": {
6-
"php": ">=5.6.4",
7-
"illuminate/container": "~5.4",
8-
"illuminate/database": "~5.4"
6+
"php": "^7.2",
7+
"illuminate/container": "^6.0",
8+
"illuminate/database": "^6.0"
99
},
1010
"require-dev": {
11-
"phpunit/phpunit": "~5.7",
12-
"mockery/mockery": "~0.9.4"
11+
"phpunit/phpunit": "^8.0",
12+
"mockery/mockery": "^1.2.3"
1313
},
1414
"autoload": {
1515
"psr-4": {

phpunit.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
convertNoticesToExceptions="true"
77
convertWarningsToExceptions="true"
88
processIsolation="false"
9-
stopOnFailure="false"
10-
syntaxCheck="false">
9+
stopOnFailure="false">
1110
<testsuites>
1211
<testsuite name="Application Test Suite">
1312
<directory>./tests/</directory>

tests/Tests/DatabaseMySqlSchemaGrammarTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace Tests;
44

5-
use Dyrynda\Database\Blueprint;
65
use Mockery as m;
7-
use PHPUnit_Framework_TestCase;
6+
use Dyrynda\Database\Blueprint;
7+
use PHPUnit\Framework\TestCase;
88

9-
class DatabaseMySqlSchemaGrammarTest extends PHPUnit_Framework_TestCase
9+
class DatabaseMySqlSchemaGrammarTest extends TestCase
1010
{
11-
public function tearDown()
11+
public function tearDown(): void
1212
{
1313
m::close();
1414
}

0 commit comments

Comments
 (0)