Skip to content

Commit 813ffb4

Browse files
authored
Merge pull request #83 from corcel/develop
Update to Corcel 3.0
2 parents 8091c7c + 52eb388 commit 813ffb4

13 files changed

+967
-417
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
language: php
22
php:
3-
- '5.6'
4-
- '7.0'
5-
- '7.1'
63
- '7.2'
74
- '7.3'
85
dist: trusty

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=5.5.9",
15-
"jgrossi/corcel": "~2.1"
14+
"php": ">=7.2",
15+
"jgrossi/corcel": "^3.0"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "~4.8"
18+
"phpunit/phpunit": "^8.0"
1919
},
2020
"autoload": {
2121
"psr-4": {

composer.lock

Lines changed: 946 additions & 394 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AdvancedCustomFields.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Corcel\Acf\Exception\MissingFieldNameException;
66
use Corcel\Model;
7+
use Illuminate\Support\Str;
78

89
/**
910
* Class AdvancedCustomFields.
@@ -53,7 +54,7 @@ public function __call($name, $arguments)
5354
throw new MissingFieldNameException('The field name is missing');
5455
}
5556

56-
$field = FieldFactory::make($arguments[0], $this->post, snake_case($name));
57+
$field = FieldFactory::make($arguments[0], $this->post, Str::snake($name));
5758

5859
return $field ? $field->get() : null;
5960
}

tests/BasicFieldsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* @author Junior Grossi <[email protected]>
1010
*/
11-
class BasicFieldsTest extends PHPUnit_Framework_TestCase
11+
class BasicFieldsTest extends PHPUnit\Framework\TestCase
1212
{
1313
/**
1414
* @var Post
@@ -18,7 +18,7 @@ class BasicFieldsTest extends PHPUnit_Framework_TestCase
1818
/**
1919
* Setup a base $this->post object to represent the page with the basic fields.
2020
*/
21-
protected function setUp()
21+
protected function setUp(): void
2222
{
2323
$this->post = Post::find(11); // it' a page with the custom fields
2424
}

tests/ChoicesFieldsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
*
1010
* @author Junior Grossi <[email protected]>
1111
*/
12-
class ChoicesFieldsTest extends PHPUnit_Framework_TestCase
12+
class ChoicesFieldsTest extends PHPUnit\Framework\TestCase
1313
{
1414
/**
1515
* @var Post
1616
*/
1717
protected $post;
1818

19-
public function setUp()
19+
protected function setUp(): void
2020
{
2121
$this->post = Post::find(44);
2222
}

tests/ContentFieldsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* @author Junior Grossi <[email protected]>
1313
*/
14-
class ContentFieldsTest extends PHPUnit_Framework_TestCase
14+
class ContentFieldsTest extends PHPUnit\Framework\TestCase
1515
{
1616
/**
1717
* @var Post
@@ -21,7 +21,7 @@ class ContentFieldsTest extends PHPUnit_Framework_TestCase
2121
/**
2222
* Setup a base $this->post object to represent the page with the content fields.
2323
*/
24-
protected function setUp()
24+
protected function setUp(): void
2525
{
2626
$this->post = Post::find(21); // it' a page with the custom fields
2727
}

tests/CorcelIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @author Junior Grossi <[email protected]>
99
*/
10-
class CorcelIntegrationTest extends PHPUnit_Framework_TestCase
10+
class CorcelIntegrationTest extends PHPUnit\Framework\TestCase
1111
{
1212
public function testIfCorcelIntegrationIsWorking()
1313
{

tests/EmptyBasicFieldsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @author Junior Grossi <[email protected]>
1111
*/
12-
class EmptyBasicFieldsTest extends PHPUnit_Framework_TestCase
12+
class EmptyBasicFieldsTest extends PHPUnit\Framework\TestCase
1313
{
1414
/**
1515
* @var Post
@@ -19,7 +19,7 @@ class EmptyBasicFieldsTest extends PHPUnit_Framework_TestCase
1919
/**
2020
* Setup a base $this->post object to represent the page with the basic fields.
2121
*/
22-
protected function setUp()
22+
protected function setUp(): void
2323
{
2424
$this->post = Post::find(91); // it' a page with empty custom fields
2525
}

tests/FieldFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* @author Junior Grossi <[email protected]>
1010
*/
11-
class FieldFactoryTest extends PHPUnit_Framework_TestCase
11+
class FieldFactoryTest extends PHPUnit\Framework\TestCase
1212
{
1313
public function testInvalidFieldName()
1414
{

0 commit comments

Comments
 (0)