-
Notifications
You must be signed in to change notification settings - Fork 48
feat: Store documentation file on a configurable directory #152
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
base: master
Are you sure you want to change the base?
Changes from 12 commits
748d424
cc6d056
4e1970f
7d08de0
a97158e
10705ea
8d25c0f
db649e9
9dd4951
0fa0b4b
4a387c2
b665010
ebef239
cef046b
83b43b3
999f2c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,33 +7,45 @@ | |||||
|
|
||||||
| class LocalDriver extends BaseDriver | ||||||
| { | ||||||
| protected ?string $prodFilePath; | ||||||
| protected ?string $mainFilePath; | ||||||
| private ?array $config; | ||||||
|
|
||||||
| public function __construct() | ||||||
| { | ||||||
| parent::__construct(); | ||||||
|
|
||||||
| $this->prodFilePath = config('auto-doc.drivers.local.production_path'); | ||||||
| $this->config = config('auto-doc.drivers.local'); | ||||||
hans-thomas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| if (empty($this->prodFilePath)) { | ||||||
| $directory = str_ends_with($this->config['directory'], DIRECTORY_SEPARATOR) | ||||||
|
||||||
| $directory = str_ends_with($this->config['directory'], DIRECTORY_SEPARATOR) | |
| $directory = (str_ends_with($this->config['directory'], DIRECTORY_SEPARATOR)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this change but I can't understand the difference.
hans-thomas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Copilot
AI
Aug 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The directory path construction is inconsistent with the mainFilePath construction. When config['directory'] already ends with DIRECTORY_SEPARATOR, this will create the wrong directory path. Should use the same normalized $directory variable from lines 19-21.
hans-thomas marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,34 +10,41 @@ | |||||
| class StorageDriver extends BaseDriver | ||||||
| { | ||||||
| protected Filesystem $disk; | ||||||
| protected ?string $prodFilePath; | ||||||
| protected ?string $mainFilePath; | ||||||
| protected array $config; | ||||||
|
|
||||||
| public function __construct() | ||||||
| { | ||||||
| parent::__construct(); | ||||||
|
|
||||||
| $this->disk = Storage::disk(config('auto-doc.drivers.storage.disk')); | ||||||
| $this->prodFilePath = config('auto-doc.drivers.storage.production_path'); | ||||||
| $this->config = config('auto-doc.drivers.storage'); | ||||||
| $this->disk = Storage::disk($this->config['disk']); | ||||||
|
|
||||||
| if (empty($this->prodFilePath)) { | ||||||
| $directory = str_ends_with($this->config['directory'], DIRECTORY_SEPARATOR) | ||||||
|
||||||
| $directory = str_ends_with($this->config['directory'], DIRECTORY_SEPARATOR) | |
| $directory = (str_ends_with($this->config['directory'], DIRECTORY_SEPARATOR)) |
Uh oh!
There was an error while loading. Please reload this page.