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

Vendor path is coupled to app base path #681

Closed
ItsReddi opened this issue Apr 21, 2023 · 3 comments
Closed

Vendor path is coupled to app base path #681

ItsReddi opened this issue Apr 21, 2023 · 3 comments

Comments

@ItsReddi
Copy link

Octane Version

1.53

Laravel Version

10.8.0

PHP Version

8.2

What server type are you using?

Roadrunner

Server Version

2.12.3

Database Driver & Version

No response

Description

When using octane in a Mono repository. The vendor path is not equivalent to the APP_BASE_PATH.

There is already a pull request that would fix that issue.
#555

Steps To Reproduce

Please have a look to #555

@driesvints
Copy link
Member

What do you mean with "Mono repository"?

@ItsReddi
Copy link
Author

- vendor
- package
  |-- laravel-app-1
  |-- laravel-app-2
  |-- laravel-package-x

Vendor only exists in root & not in the apps / packages.

The comment from the pull request describes it very well.

@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:

* [[9.x] Update PackageManifest::$vendorPath initialisation for cases, when composer vendor dir is not in project directory framework#41463](https://github.com/laravel/framework/pull/41463)

* [Use COMPOSER_VENDOR_DIR tinker#73](https://github.com/laravel/tinker/pull/73)

Since you asked about mono repository:
What is a mono repository?
https://semaphoreci.com/blog/what-is-monorepo

PHP Tooling example:
https://github.com/symplify/monorepo-builder

@driesvints
Copy link
Member

We don't support any such architecture sorry.

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

2 participants