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

Using Yii3 as a micro framework #32

Open
jasonmccallister opened this issue Oct 28, 2019 · 5 comments
Open

Using Yii3 as a micro framework #32

jasonmccallister opened this issue Oct 28, 2019 · 5 comments
Assignees
Labels
status:under development Someone is working on a pull request. type:feature New feature
Milestone

Comments

@jasonmccallister
Copy link

What steps will reproduce the problem?

I setup a boilerplace to build a minimal version of Yii3 for a project. See the composer.json

{
    "minimum-stability": "dev",
    "require": {
        "php": ">=7.2.0",
        "yiisoft/yii-web": "^3.0@dev",
        "yiisoft/di": "^3.0@dev",
        "yiisoft/log": "^3.0@dev",
        "yiisoft/cache": "^3.0@dev"
    }
}

What is the expected result?

I should be able to install dependencies.

What do you get instead?

I receive the following message:

Problem 1
    - Installation request for yiisoft/yii-web ^3.0@dev -> satisfiable by yiisoft/yii-web[3.0.x-dev].
    - yiisoft/yii-web 3.0.x-dev requires psr/http-factory-implementation 1.0 -> no matching package found.

Additional info

Q A
Version 3.0
PHP version 7.3.9
Operating system macOS Catalina
@jasonmccallister jasonmccallister changed the title Using Yii3 as a microframework Using Yii3 as a micro framework Oct 28, 2019
@samdark
Copy link
Member

samdark commented Oct 29, 2019

Yes, you need PSR HTTP factory. I recommend using nyholm/psr7.

@samdark samdark transferred this issue from yiisoft/yii-web Oct 29, 2019
@samdark samdark self-assigned this Oct 29, 2019
@jasonmccallister
Copy link
Author

Sorry made this PR in a rush and more of documentation. I think it’s not clear in the installation and can lead to confusion, especially for first time users.

@samdark
Copy link
Member

samdark commented Oct 29, 2019

I think it's interesting enough use case to be part of the guide.

@samdark samdark added the type:feature New feature label Oct 29, 2019
@jasonmccallister
Copy link
Author

Ok, any guidance on how to write this up? I think I'm going to take the same approach from the 2x version of writing a micro framework... but highlighting the psr dependency.

@samdark
Copy link
Member

samdark commented Oct 30, 2019

Oh, you want to do it? Great! Then https://www.yiiframework.com/doc/guide/2.0/en/tutorial-yii-as-micro-framework is a good start. Document should be placed into tutorial/yii-as-micro-framework.md

@samdark samdark assigned jasonmccallister and unassigned samdark Oct 30, 2019
@samdark samdark added the status:under development Someone is working on a pull request. label Oct 30, 2019
@samdark samdark added this to the 3.0.0-alpha1 milestone Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:under development Someone is working on a pull request. type:feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants