Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI-Test not working #1

Open
thewulf00 opened this issue Jul 4, 2016 · 1 comment
Open

CLI-Test not working #1

thewulf00 opened this issue Jul 4, 2016 · 1 comment

Comments

@thewulf00
Copy link

I am just trying to start with laravel-vfs.
I worte some test to use laravel vfs storage instead of sFTP-storage. The provider is not able to create a directory.

Steps:

  1. composer require mmieluch/laravel-vfs-provider
  2. Register new service provider in config/app.php
  3. Update config/filesystems.php file
  4. Started a simple test.

Environment:

  • Windows 10
  • PHPStorm 2016.1
  • Laravel Framework version 5.2.39
  • PHP 7.0.0 (cli) (built: Dec 3 2015 09:31:42) ( ZTS )

Error message:

mkdir(): Invalid argument
 \vendor\league\flysystem\src\Adapter\Local.php:357
 \vendor\league\flysystem\src\Filesystem.php:259
 \vendor\laravel\framework\src\Illuminate\Filesystem\FilesystemAdapter.php:304
 \tests\RenderTest.php:8

Errornous line debugged details:

mkdir('phpvfs577a380d4a238:\\test', 0755, true)

Test function:

class RenderTest extends TestCase
{
    public function testFirst()
    {
        $storage = Storage::disk('virtual');
        $storage->makeDirectory('test');
        print_r($storage->allFiles());
    }
}

filesystems.php:

    'disks' => [

        'local' => [
            'driver' => 'local',
            'root' => storage_path('app'),
        ],

        'virtual' => [
            'driver' => 'vfs',
        ],
// ...

composer.json:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "kirkbushell/eloquence": "~2.0",
        "doctrine/dbal": "~2.3",
        "chumper/zipper": "^0.6",
        "league/flysystem-sftp": "~1.0",
        "mmieluch/laravel-vfs-provider": "^0.0.2"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "symfony/css-selector": "2.8.*|3.0.*",
        "symfony/dom-crawler": "2.8.*|3.0.*",
        "barryvdh/laravel-ide-helper": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan clear-compiled",
            "php artisan ide-helper:generate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}
@mmieluch
Copy link
Owner

mmieluch commented Jul 5, 2016

I'll have a look in a spare moment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants