doctrine / doctrine/DoctrinePHPCRBundle
Add possibility to configure sessions over dsn
- Dominant language
- PHP
- Stars
- 158
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
I would think it would be great to configure sessions over DSN.
Currently a config for `doctrine_dbal` looks like the following in [sulu](https://github.com/sulu/skeleton/blob/23e64dcd12e72668b6c6f4d8785a843f8ecd8304/config/packages/sulu_document_manager.yaml#L9-L16):
```yaml
sessions:
default:
backend:
type: doctrinedbal
workspace: "%env(PHPCR_WORKSPACE)%"
live:
backend:
type: doctrinedbal
workspace: "%env(PHPCR_WORKSPACE)%_live"
```
And config for `jackrabbit` look like this in [sulu](https://github.com/sulu/sulu-docs/blob/458b82dab628454be48a8b255b611ff13c621edf/cookbook/jackrabbit.rst):
```yaml
parameters:
env(JACKRABBIT_URL): 'http://localhost:8080/server/'
env(PHPCR_USER): 'admin'
env(PHPCR_PASSWORD): 'admin'
# ...
sessions:
default:
backend:
type: jackrabbit
url: "%env(JACKRABBIT_URL)%"
workspace: "%env(PHPCR_WORKSPACE)%"
username: "%env(PHPCR_USER)%"
password: "%env(PHPCR_PASSWORD)%"
live:
backend:
type: jackrabbit
url: "%env(JACKRABBIT_URL)%"
workspace: "%env(PHPCR_WORKSPACE)%_live"
username: "%env(PHPCR_USER)%"
password: "%env(PHPCR_PASSWORD)%"
```
So the dsn can be very different I think, currently I would go with something like:
```bash
PHPCR_DSN=doctrindbal://default
PHPCR_DSN=jackrabbit://admin:admin@localhost:8080/server/?workspace=default
```
Which can be configured this way:
```yaml
sessions:
default:
dsn: "%env(PHPCR_DSN)%"
```
I'm not sure about the jackrabbit format and if jackrabbit can be behind `https`?
Contributor guide
Research direction
Start by tracing how the bundle currently reads the sessions configuration for the doctrinedbal and jackrabbit backends. Compare those options with the Sulu configuration examples and the proposed PHPCR_DSN values, including the open questions about Jackrabbit URLs and HTTPS. Done means an agreed DSN format and corresponding session configuration behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100