Require using local storage provider#33
Require using local storage provider#33iMattPro wants to merge 5 commits intophpbb-extensions:mainfrom
Conversation
e9a8594 to
3d43791
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 84 87 +3
===========================================
Files 8 8
Lines 305 314 +9
===========================================
+ Hits 305 314 +9 ☔ View full report in Codecov by Sentry. |
3d43791 to
e3e4255
Compare
|
👍 I think it should be only for resync, the upload is ok |
I'm not sure if I want these files being served from anything other than local disk. I tried to use your DB adapter extension. It was broken, so I fixed the issues but still can't use it. Something about the system still wants to validate paths even though the DB doesn't have a path field. Otherwise I would have tested if files from another provider would even work for my purposes here. Because if they could work, then yeah this would only need to apply to the resync method. |
|
If you want to use files only in local, then maybe should not use storage, and the filespec classes should not be deprecated, not sure |
|
I've put too much work and time into switching away from the deprecated class to go back. 🤭 |
|
You can use storage, but for loading the icons you will need to use the storage controller |
|
I will implement the storage controller after the core implements stateless routes as seen here phpbb/phpbb@master...marc1706:phpbb:feature/stateless_sessions Also the storage system will need to implement stateless routing as well by changing, for example: phpbb_storage_avatar:
path: /avatar/{file}
defaults:
_controller: storage.controller.avatar:handleto phpbb_storage_avatar:
path: /avatar/{file}
defaults:
_controller: storage.controller.avatar:handle
stateless: true |
16da4a9 to
0cf4638
Compare
0cf4638 to
eb068eb
Compare
|
There should be a way to restrict adapter options to only |
I was going to say the same thing. There should be a method in the main storage class perhaps, to have something like allowed providers? So we can do stuff like: |
|
I was thinking in something like this if is possible to disable configure it from acp phpbb.pwakit.storage:
class: phpbb\pwakit\storage\storage
arguments:
- '@dbal.conn'
- '@cache.driver'
- '@storage.adapter.factory'
- 'phpbb_pwakit'
- '%tables.storage%'
tags:
- { name: storage }
editable: false |
|
That would be cool too, but only if it prevents editing of the adapter/provider thingy. being able to change the path is still very useful to let admins do. |
One option to allow to update the adapter/provider and other to update the options or something like that |
|
👍🏻
…On Jan 21, 2025 at 8:11 AM -0800, Ruben ***@***.***>, wrote:
> That would be cool too, but only if it prevents editing of the adapter/provider thingy. being able to change the path is still very useful to let admins do.
One option to allow to update the adapter/provider and other to update the options or something like that
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
An option might be to use method calls: phpbb.pwakit.storage:
class: phpbb\pwakit\storage\storage
arguments:
- '@dbal.conn'
- '@cache.driver'
- '@storage.adapter.factory'
- 'phpbb_pwakit'
- '%tables.storage%'
tags:
- { name: storage }
calls:
- [allowed_providers, ['@storage.provider.local']]
- [set_options, []]But then of course in the storage classes you'd need |
# Conflicts: # adm/style/acp_pwakit.html # helper/helper.php
@rubencm Trying this approach here instead. Only allow icon management if the storage provider for Web App Icons is set to Local.
So with these settings:

You can do:

Otherwise, we say no and why not:
