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

Resolve custom vendor folder #555

Closed
wants to merge 1 commit into from
Closed

Conversation

oleksiikhr
Copy link

https://getcomposer.org/doc/03-cli.md#composer-vendor-dir

Support of a running worker using a custom vendor folder.

@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!

If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

@oleksiikhr
Copy link
Author

@taylorotwell Thanks for the reply, sorry for not explaining the problem right away.

I currently have a custom architecture that looks something like this:

- apps
  |-- src
  |-- ui
      |-- app1
          |-- bin
          |-- bootstrap
          |-- config
          |-- public
          |-- ...
      |-- app2
      |-- app3
- src (DDD architecture)
- vendor

So, I have several projects that work on a single code base.

In each application:

  • base_path: path to apps/ui/{project}.
  • namespace: overriden in Illuminate\Foundation\Application.

I.e. everything works fine except laravel/octane, which has a hardcoded path to the vendor folder.


Even if I don't run the roadrunner with the artisan command, I still can't do it, because inside bin/bootstrap it tries to take vendor from base_path, which I don't have.


Similar Pull Requests:

@oleksiikhr
Copy link
Author

@taylorotwell Sorry for another ping, but in case you didn't see the previous message.

If the changes look too extensive, can we make edits only in the bin/bootstrap.php file? That would be enough to be able to run bin/roadrunner-worker or bin/swoole-server with a different path to the vendor folder without linking to the laravel base path.

That would already be enough to implement, at least with my configs/commands.

Can we make these changes?

If necessary, I can make a test repository to show the problem.

Please, let me know if we can't do that.

@gawsoftpl
Copy link

gawsoftpl commented Sep 12, 2022

I agree with @oleksiikhr. Octane dont work correct with monorepo without custom vendor dir path. This path in main repo will be great. Without this I have to make manually link to vendor directory in staging and in production

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

Successfully merging this pull request may close these issues.

None yet

3 participants