Composer Error

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Bevi
Posts: 33
Joined: 25 Sep 2017, 20:57

Composer Error

Post by Bevi » 26 Oct 2017, 16:38

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.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Composer Error

Post by aimeos » 26 Oct 2017, 20:17

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Bevi
Posts: 33
Joined: 25 Sep 2017, 20:57

Re: Composer Error

Post by Bevi » 26 Oct 2017, 21:41

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,
        ],

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Composer Error

Post by aimeos » 27 Oct 2017, 23:22

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Bevi
Posts: 33
Joined: 25 Sep 2017, 20:57

Re: Composer Error

Post by Bevi » 30 Oct 2017, 21:52

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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Composer Error

Post by aimeos » 31 Oct 2017, 11:14

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Bevi
Posts: 33
Joined: 25 Sep 2017, 20:57

Re: Composer Error

Post by Bevi » 05 Nov 2017, 13:59

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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Composer Error

Post by aimeos » 06 Nov 2017, 11:24

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply