Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: php
php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
dist: trusty
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
}
],
"require": {
"php": ">=5.5.9",
"jgrossi/corcel": "~2.1"
"php": ">=7.2",
"jgrossi/corcel": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
"phpunit/phpunit": "^8.0"
},
"autoload": {
"psr-4": {
Expand Down
1,340 changes: 946 additions & 394 deletions composer.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/AdvancedCustomFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Corcel\Acf\Exception\MissingFieldNameException;
use Corcel\Model;
use Illuminate\Support\Str;

/**
* Class AdvancedCustomFields.
Expand Down Expand Up @@ -53,7 +54,7 @@ public function __call($name, $arguments)
throw new MissingFieldNameException('The field name is missing');
}

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

return $field ? $field->get() : null;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/BasicFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @author Junior Grossi <[email protected]>
*/
class BasicFieldsTest extends PHPUnit_Framework_TestCase
class BasicFieldsTest extends PHPUnit\Framework\TestCase
{
/**
* @var Post
Expand All @@ -18,7 +18,7 @@ class BasicFieldsTest extends PHPUnit_Framework_TestCase
/**
* Setup a base $this->post object to represent the page with the basic fields.
*/
protected function setUp()
protected function setUp(): void
{
$this->post = Post::find(11); // it' a page with the custom fields
}
Expand Down
4 changes: 2 additions & 2 deletions tests/ChoicesFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
*
* @author Junior Grossi <[email protected]>
*/
class ChoicesFieldsTest extends PHPUnit_Framework_TestCase
class ChoicesFieldsTest extends PHPUnit\Framework\TestCase
{
/**
* @var Post
*/
protected $post;

public function setUp()
protected function setUp(): void
{
$this->post = Post::find(44);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/ContentFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author Junior Grossi <[email protected]>
*/
class ContentFieldsTest extends PHPUnit_Framework_TestCase
class ContentFieldsTest extends PHPUnit\Framework\TestCase
{
/**
* @var Post
Expand All @@ -21,7 +21,7 @@ class ContentFieldsTest extends PHPUnit_Framework_TestCase
/**
* Setup a base $this->post object to represent the page with the content fields.
*/
protected function setUp()
protected function setUp(): void
{
$this->post = Post::find(21); // it' a page with the custom fields
}
Expand Down
2 changes: 1 addition & 1 deletion tests/CorcelIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Junior Grossi <[email protected]>
*/
class CorcelIntegrationTest extends PHPUnit_Framework_TestCase
class CorcelIntegrationTest extends PHPUnit\Framework\TestCase
{
public function testIfCorcelIntegrationIsWorking()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/EmptyBasicFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author Junior Grossi <[email protected]>
*/
class EmptyBasicFieldsTest extends PHPUnit_Framework_TestCase
class EmptyBasicFieldsTest extends PHPUnit\Framework\TestCase
{
/**
* @var Post
Expand All @@ -19,7 +19,7 @@ class EmptyBasicFieldsTest extends PHPUnit_Framework_TestCase
/**
* Setup a base $this->post object to represent the page with the basic fields.
*/
protected function setUp()
protected function setUp(): void
{
$this->post = Post::find(91); // it' a page with empty custom fields
}
Expand Down
2 changes: 1 addition & 1 deletion tests/FieldFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @author Junior Grossi <[email protected]>
*/
class FieldFactoryTest extends PHPUnit_Framework_TestCase
class FieldFactoryTest extends PHPUnit\Framework\TestCase
{
public function testInvalidFieldName()
{
Expand Down
6 changes: 3 additions & 3 deletions tests/JqueryFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
use Corcel\Acf\Field\Text;
use Corcel\Model\Post;

class JqueryFieldsTests extends PHPUnit_Framework_TestCase
class JqueryFieldsTests extends PHPUnit\Framework\TestCase
{
/**
* @var Post
*/
protected $post;

public function setUp()
protected function setUp(): void
{
$this->post = Post::find(65);
}

public function testGoogleMapField()
{
// Google Map field is not working at this moment
$this->markTestSkipped('Google Map field i s not working at the moment');
}

public function testDatePickerField()
Expand Down
2 changes: 1 addition & 1 deletion tests/LayoutFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author Junior Grossi <[email protected]>
*/
class LayoutFieldsTest extends PHPUnit_Framework_TestCase
class LayoutFieldsTest extends PHPUnit\Framework\TestCase
{
public function testRepeaterField()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/RelationalFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
*
* @author Junior Grossi <[email protected]>
*/
class RelationalFieldsTests extends PHPUnit_Framework_TestCase
class RelationalFieldsTests extends PHPUnit\Framework\TestCase
{
/**
* @var Post
*/
protected $post;

public function setUp()
protected function setUp(): void
{
$this->post = Post::find(56);
}
Expand Down