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

Could you explain if your bundle workable and how to set up it? #1

Open
shtumi opened this issue Nov 29, 2013 · 8 comments
Open

Could you explain if your bundle workable and how to set up it? #1

shtumi opened this issue Nov 29, 2013 · 8 comments

Comments

@shtumi
Copy link

shtumi commented Nov 29, 2013

I need to integrate sabredav server to my Symfony 2 application in order to provide calDAV to our users. And i want to use your bundle.
But i faced with some problems during integration your bundle. Here is no documentation. But as i understand i need to define collection with tag secotrust.sabredav.collection. But how should looks this collection? Could you provide any example?

Thanks!

@snc
Copy link
Member

snc commented Nov 29, 2013

Currently only WebDAV is supported, but I just added the needed CalDAV plugin configuration to the bundle.

As far as I understand reading the calendarserver.php of SabreDAV you need an implementation of Sabre\DAVACL\PrincipalBackend\BackendInterface and Sabre\CalDAV\Backend\BackendInterface in addition to an implementation of Sabre\DAV\Auth\Backend\BackendInterface where Secotrust\Bundle\SabreDavBundle\SabreDav\AuthBackend could be used.

You could try the following configuration:

secotrust_sabre_dav:
    base_uri: /app_dev.php/dav/
    plugins:
        acl: true
        auth: true
        browser: true
        caldav: true

services:
    caldav.principal.backend:
        class: My\PrincipalBackend
    caldav.calendar.backend:
        class: My\CalDAVBackend
    caldav.principal.collection:
        class: Sabre\CalDAV\Principal\Collection
        arguments:
            - @caldav.principal.backend
        tags:
            - { name: secotrust.sabredav.collection }
    caldav.calendarrootnode:
        class: Sabre\CalDAV\CalendarRootNode
        arguments:
            - @caldav.principal.backend
            - @caldav.calendar.backend
        tags:
            - { name: secotrust.sabredav.collection }

@shtumi
Copy link
Author

shtumi commented Dec 16, 2013

Thank you a lot!
I finally integrated calDav to my project.
Could you also update your bundle version at packagist website?

@snc
Copy link
Member

snc commented Dec 17, 2013

Well there is no concrete version at packagist, this bundle is not really in a stage where a version number makes sense. Using "secotrust/sabredav-bundle": "1.0.*@dev" will already fetch the latest version. Is this OK for you?

@databoy
Copy link

databoy commented Apr 2, 2014

This looks very interesting. Have you considered adding the above example to the Docs?

@snc
Copy link
Member

snc commented Apr 3, 2014

Definitely, time is the only problem currently ;-)

@databoy
Copy link

databoy commented May 8, 2014

I'm about to give this a go... What configuration would you recommend for a basic WebDAV implementation in Symfony 2.4?

UPDATE: I was able to get it working (with only a rudimentary knowledge of how to put it all together), but I'd be grateful if you can provide an example configuration and a controller that shows how to integrate Gaufrette collections and Doctrine and while it's at it make coffee... :-)

@snc
Copy link
Member

snc commented May 14, 2014

A sample config using the gaufrette local adapter:

secotrust_sabre_dav:
    base_uri: /app_dev.php/dav/
    plugins:
        browser: true

services:
    gaufrette.adapter:
        class: Gaufrette\Adapter\Local
        arguments:
            - "%kernel.root_dir%/../web/uploads"
    gaufrette.filesystem:
        class: Gaufrette\Filesystem
        arguments:
            - @gaufrette.adapter
    gaufrette.dav.collection:
        class: Secotrust\Bundle\SabreDavBundle\SabreDav\Gaufrette\Collection
        arguments:
            - @gaufrette.filesystem
        tags:
            - { name: secotrust.sabredav.collection }

I never created a doctrine implementation and I think that you will always need a custom implementation to create a directory tree and serve the files. This bundle could provide base classes for this tasks.

@databoy
Copy link

databoy commented May 14, 2014

Wow! Exactly. I didn't have Gaufrette configured as a service, and I was stuck using the filesystem adapter separately.

This. Is. Great. Thanks!

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

No branches or pull requests

3 participants