#StackBounty: #php #yii2 #xampp #composer-php Unable to open yii2 application using xampp

Bounty: 50

I have just installed xampp, placed the project folder in htdocs. Install the composer. But when I try to open my web-interface I am getting the error

Fatal error: Cannot use ‘Object’ as class name as it is reserved in F:xampphtdocsinventory-webvendoryiisoftyii2baseObject.php on line 77

I searched for the solution and found this Composer Update. So I tried to update the composer

F:xampphtdocsinventory-web>composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)

After that, I got below error

Your requirements could not be resolved to an installable set of packages.

Problem 1
    - kartik-v/yii2-date-range dev-master requires kartik-v/yii2-krajee-base >=2.0.0 -> satisfiable by kartik-v/yii2-krajee-base[dev-master, 2.0.x-dev, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5] but these conflict with your requirements or minimum-stability.
    - kartik-v/yii2-date-range dev-master requires kartik-v/yii2-krajee-base >=2.0.0 -> satisfiable by kartik-v/yii2-krajee-base[dev-master, 2.0.x-dev, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5] but these conflict with your requirements or minimum-stability.
    - Installation request for kartik-v/yii2-date-range dev-master -> satisfiable by kartik-v/yii2-date-range[dev-master].

Composer.json

{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Project Template",
"keywords": ["yii2", "framework", "advanced", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
    "issues": "https://github.com/yiisoft/yii2/issues?state=open",
    "forum": "http://www.yiiframework.com/forum/",
    "wiki": "http://www.yiiframework.com/wiki/",
    "irc": "irc://irc.freenode.net/yii",
    "source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": "~2.0.6",
    "yiisoft/yii2-bootstrap": "~2.0.0",
    "yiisoft/yii2-swiftmailer": "~2.0.0",
    "luoxiaojun1992/yii2-tinker": "*",
    "kartik-v/yii2-grid": "@dev",
    "kartik-v/yii2-widget-select2": "@dev",
    "kartik-v/yii2-mpdf": "*",
    "moonlandsoft/yii2-phpexcel": "*",
    "nirvana-msu/yii2-showloading": "1.0.*@dev",
    "kartik-v/yii2-krajee-base": "~1.7",
    "kartik-v/yii2-widget-spinner": "@dev",
    "edwinhaq/yii2-simple-loading": "*",
    "c006/yii2-submit-spinner": "*",
    "kartik-v/yii2-detail-view": "*",
    "fedemotta/yii2-cronjob": "*",
    "kartik-v/yii2-widget-datetimepicker": "*",
    "kartik-v/yii2-date-range": "dev-master",
    "phpoffice/phpspreadsheet": "^1.2",
    "linslin/yii2-curl": "*",
    "kartik-v/yii2-widget-fileinput": "@dev",
    "kartik-v/yii2-dialog": "*",
    "google/apiclient": "^2.0",
    "delight-im/str": "^2.4",
    "mongosoft/yii2-soap-client": "*"


},
"require-dev": {
    "yiisoft/yii2-debug": "~2.0.0",
    "yiisoft/yii2-gii": "~2.0.0",
    "yiisoft/yii2-faker": "~2.0.0",

    "codeception/base": "^2.2.3",
    "codeception/verify": "~0.3.1"
},
"config": {
    "process-timeout": 1800
},
"extra": {
    "asset-installer-paths": {
        "npm-asset-library": "vendor/npm",
        "bower-asset-library": "vendor/bower"
    }
},
"scripts": {
    "post-install-cmd": "php init --env=Development --overwrite=n"
},
"autoload": {
    "psr-4": {
        "kartik\spinner\": "",
        "nirvana\showloading\": ""
    }
}
}

Update 1

In my composer.json file I updated "minimum-stability": "stable" to ‘ “minimum-stability”: “dev”‘ and then again tried to update composer. Now I am getting error

Your requirements could not be resolved to an installable set of packages.

Problem 1
    - mongosoft/yii2-soap-client dev-master requires ext-soap * -> the requested PHP extension soap is missing from your system.
    - mongosoft/yii2-soap-client 0.1.0 requires ext-soap * -> the requested PHP extension soap is missing from your system.
    - mongosoft/yii2-soap-client 0.1.0 requires ext-soap * -> the requested PHP extension soap is missing from your system.
    - Installation request for mongosoft/yii2-soap-client * -> satisfiable by mongosoft/yii2-soap-client[0.1.0, dev-master].

  To enable extensions, verify that they are enabled in your .ini files:
    - F:xamppphpphp.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Update 2

As per suggestion, I have changed "kartik-v/yii2-krajee-base": "~1.7" to "kartik-v/yii2-krajee-base": "^2.0" in my composer.json and then I run the command composer update via cmd, there were no errors and all the updates were successfully done. After that, I tried to run the application but still, it’s showing me

Fatal error: Cannot use ‘Object’ as class name as it is reserved in
F:xampphtdocsinventory-webvendoryiisoftyii2baseObject.php on
line 77

How can I get rid of this issue?

Any help would be highly appreciated


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.