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

Separate Core and Command-line into separate package #97

Open
mtangoo opened this issue Apr 16, 2023 · 5 comments
Open

Separate Core and Command-line into separate package #97

mtangoo opened this issue Apr 16, 2023 · 5 comments

Comments

@mtangoo
Copy link

mtangoo commented Apr 16, 2023

Currently when you install Gii, it installs a lot of dependencies,
like view. In many cases it might be okay, but in some cases like in API, these dependencies are not desirable. It would be nice if you could only use command-line with core of Gii without all these extra dependencies.

@samdark
Copy link
Member

samdark commented Apr 16, 2023

Interesting. Are you sure it installs view package? https://github.com/yiisoft/yii-gii/blob/master/composer.json#L21

@mtangoo
Copy link
Author

mtangoo commented Apr 16, 2023

Yes it did despite what is in the JSON. I don't understand the magic happening.
To test it, install the API template and then try installing Gii and see what happens!

@xepozz
Copy link
Member

xepozz commented Apr 17, 2023

Which one, yiisoft/app-api?

@mtangoo
Copy link
Author

mtangoo commented Apr 18, 2023

Yes

@mtangoo
Copy link
Author

mtangoo commented Apr 18, 2023

Here is full composer.json

{
    "name": "yiisoft/app-api",
    "type": "project",
    "description": "Yii Framework API project template",
    "keywords": [
        "yii3",
        "app",
        "api",
        "rest"
    ],
    "homepage": "https://github.com/yiisoft/app-api/",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/app-api/issues?state=open",
        "forum": "https://www.yiiframework.com/forum/",
        "wiki": "https://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/app-api"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "php": "^8.0",
        "cebe/markdown": "^1.2@dev",
        "httpsoft/http-message": "^1.0.5",
        "myclabs/php-enum": "^1.7",
        "psr/container": "^2.0",
        "psr/http-factory": "^1.0",
        "psr/http-message": "^1.0",
        "psr/http-server-handler": "^1.0",
        "psr/http-server-middleware": "^1.0",
        "psr/log": "^3.0",
        "vlucas/phpdotenv": "^5.3",
        "yiisoft/access": "^1.0",
        "yiisoft/active-record": "^3.0@dev",
        "yiisoft/auth": "^3.0",
        "yiisoft/cache": "^3.0",
        "yiisoft/cache-file": "^3.0",
        "yiisoft/config": "^1.0",
        "yiisoft/data": "^1.0",
        "yiisoft/data-response": "^2.0",
        "yiisoft/db-pgsql": "@dev",
        "yiisoft/definitions": "^3.0",
        "yiisoft/di": "^1.2",
        "yiisoft/error-handler": "^3.0",
        "yiisoft/factory": "^1.1",
        "yiisoft/files": "^2.0",
        "yiisoft/http": "^1.2",
        "yiisoft/injector": "^1.1",
        "yiisoft/log": "^2.0",
        "yiisoft/log-target-file": "^3.0",
        "yiisoft/request-body-parser": "^1.1",
        "yiisoft/request-model": "^1.0@dev",
        "yiisoft/router": "^3.0",
        "yiisoft/router-fastroute": "^3.0",
        "yiisoft/security": "^1.0",
        "yiisoft/translator": "^3.0",
        "yiisoft/translator-message-php": "^1.1",
        "yiisoft/user": "^2.0",
        "yiisoft/validator": "^1.0",
        "yiisoft/yii-console": "^2.0",
        "yiisoft/yii-debug": "^3.0@dev",
        "yiisoft/yii-debug-api": "^3.0@dev",
        "yiisoft/yii-event": "^2.0",
        "yiisoft/yii-http": "^1.0",
        "yiisoft/yii-middleware": "dev-master",
        "yiisoft/yii-runner-console": "^2.0",
        "yiisoft/yii-runner-http": "^2.0",
        "yiisoft/yii-swagger": "^2.0"
    },
    "require-dev": {
        "codeception/c3": "^2.6",
        "codeception/codeception": "^5.0",
        "codeception/lib-innerbrowser": "^3.0",
        "codeception/module-asserts": "^3.0",
        "codeception/module-cli": "^2.0",
        "codeception/module-db": "^3.0",
        "codeception/module-phpbrowser": "^3.0",
        "codeception/module-rest": "^3.0",
        "phpunit/phpunit": "^9.5",
        "roave/infection-static-analysis-plugin": "^1.16",
        "spatie/phpunit-watcher": "^1.23",
        "vimeo/psalm": "^4.18",
        "yiisoft/json": "^1.0",
        "yiisoft/yii-debug-viewer": "^3.0@dev",
        "yiisoft/yii-testing": "dev-master"
    },
    "autoload": {
        "psr-4": {
            "App\\": "src"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/",
            "App\\Tests\\Acceptance\\": "tests/acceptance/",
            "App\\Tests\\Functional\\": "tests/functional/"
        }
    },
    "scripts": {
        "serve": "./yii serve",
        "post-update-cmd": [
            "App\\Installer::postUpdate",
            "App\\Installer::copyEnvFile"
        ],
        "post-create-project-cmd": [
            "App\\Installer::copyEnvFile"
        ],
        "test": "codecept run",
        "test-watch": "phpunit-watcher watch"
    },
    "extra": {
        "branch-alias": {
            "dev-master": "1.0.x-dev"
        },
        "config-plugin-file": "configuration.php"
    },
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "codeception/c3": true,
            "infection/extension-installer": true,
            "composer/package-versions-deprecated": true,
            "yiisoft/config": true
        }
    }
}

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

No branches or pull requests

3 participants