Skip to content

fix: 237 #238

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

Open
wants to merge 1 commit into
base: v4.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions architecture/service-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Continuing with the example above, the following will work out of the box (assum
class MyService:
def __init__(self, some_other_dependency: SomeOtherClass):
pass

def do_something(self):
pass

Expand Down Expand Up @@ -254,13 +254,13 @@ If you need to utilize a container outside the normal flow of Masonite like insi
This would look something like:

```python
from wsgi import container
from masonite.container import Container
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this even right? shouldnt it be

from wsgi import application
from masonite import Queue
...
def handle(self):
        queue = application.make(Queue)
        queue.push(..)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I don't know what is the correct way to do it.
I tried to follow the documentation and I couldn't so if you think that's the correct way I believe you.

from masonite import Queue

class SomeCommand:

def handle(self):
queue = container.make(Queue)
queue = Container().make(Queue)
queue.push(..)
```

Expand Down