diff --git a/.gitattributes b/.gitattributes old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 8b7ef350..e8f94b70 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vendor composer.lock +/.idea diff --git a/.travis.yml b/.travis.yml old mode 100644 new mode 100755 diff --git a/CHANGELOG.md b/CHANGELOG.md old mode 100644 new mode 100755 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/bootstrap.php b/bootstrap.php old mode 100644 new mode 100755 diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 index 49505a5b..03612068 --- a/composer.json +++ b/composer.json @@ -13,11 +13,11 @@ ], "require": { "php": ">=5.4.0", - "illuminate/console": "5.*", - "illuminate/database": "5.*", - "illuminate/events": "5.*", - "illuminate/filesystem": "5.*", - "illuminate/support": "5.*" + "illuminate/console": "*", + "illuminate/database": "*", + "illuminate/events": "*", + "illuminate/filesystem": "*", + "illuminate/support": "*" }, "require-dev": { "phpunit/phpunit": "~4.0", diff --git a/phpunit.xml b/phpunit.xml old mode 100644 new mode 100755 diff --git a/src/Baum/Console/BaumCommand.php b/src/Baum/Console/BaumCommand.php old mode 100644 new mode 100755 diff --git a/src/Baum/Console/InstallCommand.php b/src/Baum/Console/InstallCommand.php old mode 100644 new mode 100755 diff --git a/src/Baum/Extensions/Eloquent/Collection.php b/src/Baum/Extensions/Eloquent/Collection.php old mode 100644 new mode 100755 diff --git a/src/Baum/Extensions/Eloquent/Model.php b/src/Baum/Extensions/Eloquent/Model.php old mode 100644 new mode 100755 diff --git a/src/Baum/Extensions/Query/Builder.php b/src/Baum/Extensions/Query/Builder.php old mode 100644 new mode 100755 diff --git a/src/Baum/Generators/Generator.php b/src/Baum/Generators/Generator.php old mode 100644 new mode 100755 index de02fab4..0360e9d8 --- a/src/Baum/Generators/Generator.php +++ b/src/Baum/Generators/Generator.php @@ -2,6 +2,7 @@ namespace Baum\Generators; use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Str; abstract class Generator { @@ -78,7 +79,7 @@ protected function parseStub($stub, $replacements=array()) { * @return string */ protected function classify($input) { - return studly_case(str_singular($input)); + return Str::studly(Str::singular($input)); } /** @@ -88,6 +89,6 @@ protected function classify($input) { * @return string */ protected function tableize($input) { - return snake_case(str_plural($input)); + return Str::snake(Str::plural($input)); } } diff --git a/src/Baum/Generators/MigrationGenerator.php b/src/Baum/Generators/MigrationGenerator.php old mode 100644 new mode 100755 diff --git a/src/Baum/Generators/ModelGenerator.php b/src/Baum/Generators/ModelGenerator.php old mode 100644 new mode 100755 diff --git a/src/Baum/Generators/stubs/migration.php b/src/Baum/Generators/stubs/migration.php old mode 100644 new mode 100755 diff --git a/src/Baum/Generators/stubs/model.php b/src/Baum/Generators/stubs/model.php old mode 100644 new mode 100755 diff --git a/src/Baum/Move.php b/src/Baum/Move.php old mode 100644 new mode 100755 index 8abed059..83af0c07 --- a/src/Baum/Move.php +++ b/src/Baum/Move.php @@ -352,7 +352,11 @@ protected function fireMoveEvent($event, $halt = true) { // but we relay the event into the node instance. $event = "eloquent.{$event}: ".get_class($this->node); - $method = $halt ? 'until' : 'fire'; + if (version_compare(app()->version(), '5.8.0', '>=')) { + $method = $halt ? 'until' : 'dispatch'; + } else { + $method = $halt ? 'until' : 'fire'; + } return static::$dispatcher->$method($event, $this->node); } diff --git a/src/Baum/MoveNotPossibleException.php b/src/Baum/MoveNotPossibleException.php old mode 100644 new mode 100755 diff --git a/src/Baum/Node.php b/src/Baum/Node.php old mode 100644 new mode 100755 diff --git a/src/Baum/Providers/BaumServiceProvider.php b/src/Baum/Providers/BaumServiceProvider.php old mode 100644 new mode 100755 diff --git a/src/Baum/SetBuilder.php b/src/Baum/SetBuilder.php old mode 100644 new mode 100755 diff --git a/src/Baum/SetMapper.php b/src/Baum/SetMapper.php old mode 100644 new mode 100755 index a44dabab..01148206 --- a/src/Baum/SetMapper.php +++ b/src/Baum/SetMapper.php @@ -2,6 +2,7 @@ namespace Baum; use \Closure; +use Illuminate\Support\Arr; use Illuminate\Support\Contracts\ArrayableInterface; use Baum\Node; @@ -128,13 +129,13 @@ protected function mapTreeRecursive(array $tree, $parentKey = null, &$affectedKe protected function getSearchAttributes($attributes) { $searchable = array($this->node->getKeyName()); - return array_only($attributes, $searchable); + return Arr::only($attributes, $searchable); } protected function getDataAttributes($attributes) { $exceptions = array($this->node->getKeyName(), $this->getChildrenKeyName()); - return array_except($attributes, $exceptions); + return Arr::except($attributes, $exceptions); } protected function firstOrNew($attributes) { diff --git a/src/Baum/SetValidator.php b/src/Baum/SetValidator.php old mode 100644 new mode 100755 diff --git a/tests/config/database.php b/tests/config/database.php old mode 100644 new mode 100755 diff --git a/tests/migrators/CategoryMigrator.php b/tests/migrators/CategoryMigrator.php old mode 100644 new mode 100755 diff --git a/tests/migrators/ClusterMigrator.php b/tests/migrators/ClusterMigrator.php old mode 100644 new mode 100755 diff --git a/tests/models/Category.php b/tests/models/Category.php old mode 100644 new mode 100755 diff --git a/tests/models/Cluster.php b/tests/models/Cluster.php old mode 100644 new mode 100755 diff --git a/tests/seeders/CategorySeeder.php b/tests/seeders/CategorySeeder.php old mode 100644 new mode 100755 diff --git a/tests/seeders/ClusterSeeder.php b/tests/seeders/ClusterSeeder.php old mode 100644 new mode 100755 diff --git a/tests/suite/BaumTestCase.php b/tests/suite/BaumTestCase.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryColumnsTest.php b/tests/suite/Category/CategoryColumnsTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryCustomEventsTest.php b/tests/suite/Category/CategoryCustomEventsTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryHierarchyTest.php b/tests/suite/Category/CategoryHierarchyTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryMovementTest.php b/tests/suite/Category/CategoryMovementTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryRelationsTest.php b/tests/suite/Category/CategoryRelationsTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryScopedTest.php b/tests/suite/Category/CategoryScopedTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategorySoftDeletesTest.php b/tests/suite/Category/CategorySoftDeletesTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryTreeMapperTest.php b/tests/suite/Category/CategoryTreeMapperTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryTreeRebuildingTest.php b/tests/suite/Category/CategoryTreeRebuildingTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Category/CategoryTreeValidationTest.php b/tests/suite/Category/CategoryTreeValidationTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/CategoryTestCase.php b/tests/suite/CategoryTestCase.php old mode 100644 new mode 100755 diff --git a/tests/suite/Cluster/ClusterColumnsTest.php b/tests/suite/Cluster/ClusterColumnsTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Cluster/ClusterHierarchyTest.php b/tests/suite/Cluster/ClusterHierarchyTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/Cluster/ClusterMovementTest.php b/tests/suite/Cluster/ClusterMovementTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/ClusterTestCase.php b/tests/suite/ClusterTestCase.php old mode 100644 new mode 100755 diff --git a/tests/suite/NodeModelExtensionsTest.php b/tests/suite/NodeModelExtensionsTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/QueryBuilderExtensionTest.php b/tests/suite/QueryBuilderExtensionTest.php old mode 100644 new mode 100755 diff --git a/tests/suite/support.php b/tests/suite/support.php old mode 100644 new mode 100755 index 54c7777f..715879f6 --- a/tests/suite/support.php +++ b/tests/suite/support.php @@ -18,7 +18,7 @@ function hmap(array $nodes, $preserve = null) { } else { $preserve = is_string($preserve) ? array($preserve) : $preserve; - $current = array_only($node, $preserve); + $current = \Illuminate\Support\Arr::only($node, $preserve); if ( array_key_exists('children', $node) ) { $children = $node['children'];