Page 1 of 1

Composer Error

Posted: 26 Oct 2017, 16:38
by Bevi
Hi, I'm getting this error when trying to update the composer:
Image

Here's my composer.json

Code: Select all

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
	"prefer-stable": true,
    "minimum-stability": "dev",
    "require": {
		"aimeos/aimeos-laravel": "~2017.10",
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~6.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ],
		"post-update-cmd": [
            "php artisan vendor:publish --tag=public --force",
            "php artisan vendor:publish",
            "php artisan migrate"
            
        ]
		
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}
I could be wrong, but it looks like "php artisan vendor:publish" is expecting some parameter that is not given, and "php artisan migrate" is executed while "php artisan vendor:publish" is still waiting for that parameter.

Re: Composer Error

Posted: 26 Oct 2017, 20:17
by aimeos
This question is new in Laravel 5.5 and caused by "php artisan vendor:publish". If it doesn't work in Windows environments, you can remove that line from "post-update-cmd" and execute it manually.

Re: Composer Error

Posted: 26 Oct 2017, 21:41
by Bevi
Now I'm gettin an error when executing the following command:

Code: Select all

php artisan migrate

Error:

Image

Here's my DB settings in .ENV

Code: Select all

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
and my mysql array in config/database.php

Code: Select all

 'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'unix_socket' => env('DB_SOCKET', ''),
			'charset' => 'utf8',
			'collation' => 'utf8_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
        ],

Re: Composer Error

Posted: 27 Oct 2017, 23:22
by aimeos
Do you use the Vagrant Homestead box? If not, you need a local running MySQL server with a database and an MySQL account you can use in your .env file

Re: Composer Error

Posted: 30 Oct 2017, 21:52
by Bevi
aimeos wrote:Do you use the Vagrant Homestead box? If not, you need a local running MySQL server with a database and an MySQL account you can use in your .env file
I'm using Laragon, which automatically creates a local running mysql server.
I had no problem with Laravel 2017.07.3, but now I'm trying to run 2017.10

Re: Composer Error

Posted: 31 Oct 2017, 11:14
by aimeos
Don't think that this is a problem of Aimeos. The credentials in the Laravel .env file doesn't allow the Laravel migrations to access the database or at least the MySQL information schema.

Re: Composer Error

Posted: 05 Nov 2017, 13:59
by Bevi
aimeos wrote:Don't think that this is a problem of Aimeos. The credentials in the Laravel .env file doesn't allow the Laravel migrations to access the database or at least the MySQL information schema.
Hello again, Sir.
I didn't change any credential in the .env file, so the attributes are the default ones.
Since I'm trying to run the whole thing on a dedicated server (AWS Lightsail) , I tried to forward the following ports for both Windows firewall and AWS web interface:
MySQL = 3306
Serve port: 8000
I forwarded the Laragon application as well.
The error I'm getting now is the following:
Image

Re: Composer Error

Posted: 06 Nov 2017, 11:24
by aimeos
That you didn't change the credentials in your .env file is exactly your problem! The MySQL server in your new environment doesn't accept the user name and password of the Homestead VM box