AgenDAV now using Composer

177 views
Skip to first unread message

Jorge López Pérez

unread,
Sep 30, 2012, 2:10:19 PM9/30/12
to agend...@googlegroups.com
Dear all,

as you may have noticed by reading last commit messages, AgenDAV is now
using Composer (http://getcomposer.org/). It's a great tool to reuse PHP
packages and it's currently used to load some AgenDAV classes that have
been rewritten to be PSR-0 standard compliant (see
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md ).

So if you want to try latest changes you'll have to install Composer and
make it download AgenDAV dependencies.

This information will be included on the documentation/release notes for
next release, but in the meanwhile you can do it by following the
following micro-guide:

$ cd web/
$ curl -s https://getcomposer.org/installer | php
$ ./composer install

I'm planning to add a blog to the AgenDAV website to talk about this
kind of news, stay tuned!

Regards.

--
Jorge López Pérez
http://adobo.org
Jabber: jor...@jabberes.org

Hossam El Naggar

unread,
Sep 30, 2012, 5:02:26 PM9/30/12
to agend...@googlegroups.com
Ok I ran those commands (I think) and AgenDAV loads and I can log in,
but then I get the error bubble pop-up "no calendars available".

On 09/30/12 9:10 pm, Jorge López Pérez wrote:

> Dear all,
>
> as you may have noticed by reading last commit messages, AgenDAV is
> now
> using Composer (http://getcomposer.org/ [1]). It's a great tool to
> reuse
> PHP
> packages and it's currently used to load some AgenDAV classes that
> have
> been rewritten to be PSR-0 standard compliant (see
>
> https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
> [2] ).
>
> So if you want to try latest changes you'll have to install Composer
> and
> make it download AgenDAV dependencies.
>
> This information will be included on the documentation/release notes
> for
> next release, but in the meanwhile you can do it by following the
> following micro-guide:
>
> $ cd web/
> $ curl -s https://getcomposer.org/installer [3] | php
> $ ./composer install
>
> I'm planning to add a blog to the AgenDAV website to talk about this
> kind of news, stay tuned!
>
> Regards.



Links:
------
[1] http://getcomposer.org/
[2]
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
[3] https://getcomposer.org/installer

Jorge López Pérez

unread,
Oct 1, 2012, 2:18:03 AM10/1/12
to agend...@googlegroups.com
Hi Hossam,

El 30/09/12 23:02, Hossam El Naggar escribió:
> Ok I ran those commands (I think) and AgenDAV loads and I can log in,
> but then I get the error bubble pop-up "no calendars available".

My fault again. You're finding all my oversights, don't you? I'm OK with
that :-P. Thank you for pointing it out, I forgot to comment this change
to the list.

The 'caldav_calendar_root' configuration option from CalDAV
configuration file (caldav.php) has been renamed to a more appropiate
name, 'caldav_calendar_homeset_template'.

This change can be found at the following commit:
https://github.com/adobo/agendav/commit/32d26f8e1e61fff485dd76fbf9a08a80096e3b83#L2L75
.

Let me know if AgenDAV works again for you.

Regards.

--
Jorge López Pérez
http://adobo.org
jabber: jor...@jabberes.org

Hossam El Naggar

unread,
Oct 1, 2012, 7:15:05 PM10/1/12
to agend...@googlegroups.com
Ermmm,

I did a sudo git checkout 32d26f8e1e61fff485dd76fbf9a08a80096e3b83
And it seems like it all went well but AgenDAV stil displays the same error.

Jorge López Pérez

unread,
Oct 2, 2012, 2:04:06 AM10/2/12
to agend...@googlegroups.com
Hi,

El 02/10/12 01:15, Hossam El Naggar escribió:

> I did a sudo git checkout 32d26f8e1e61fff485dd76fbf9a08a80096e3b83

I think you got me wrong.

If you're using latest commit from develop branch you should update your
caldav.php configuration file to use 'caldav_calendar_homeset_template'
instead of 'caldav_calendar_root'. Just rename it, syntax remains unchanged.

lorenzfx

unread,
Oct 3, 2012, 2:05:14 PM10/3/12
to agend...@googlegroups.com

Hi,
I pulled the latest version today, changed the config file and installed composer. Now I cannot login anymore, but get the message "Invalid username or password". Any version prior to 2012-09-21 works. There are no messages in the logfile, even though I enabled 'INTERNALS' logging. I'm using postgres on FreeBSD. Do You have any idea what could be the root of this?

Thanks

Jorge López Pérez

unread,
Oct 3, 2012, 2:09:31 PM10/3/12
to agend...@googlegroups.com
Hi,

El 03/10/12 20:05, lorenzfx escribió:

> I pulled the latest version today, changed the config file and installed
> composer.

Did you run './composer.phar install' too?

What do your webserver logs say about this? Do you see any activity on
the CalDAV server logs?

Regards.

--
Jorge López Pérez
http://adobo.org
Jabber: jor...@jabberes.org

Jorge López Pérez

unread,
Oct 3, 2012, 2:46:00 PM10/3/12
to agend...@googlegroups.com
Hi again,

maybe your problem is that you didn't update your caldav.php
configuration file. Some options changed its name since 1.2.6.

I'm afraid that some minutes ago I did some more changes to caldav.php
configuration file to keep naming consistency, so I recommend to pull
latest commits and create a new caldav.php file using the provided
caldav.php.template.

I'm so sorry about this renaming mess. You'll find latest docs on
caldav.php configuration file at
http://agendav.org/doc/latest/admin/configuration.html#caldav-specific-options-caldav-php
.

Best regards.

El 03/10/12 20:09, Jorge López Pérez escribió:

lorenzfx

unread,
Oct 6, 2012, 7:58:43 AM10/6/12
to agend...@googlegroups.com
Hi,
sorry for my late reply. I made sure to use the latest configs, actually I just checked out the latest version of agendav and started fresh. Sadly, it is still the same behaviour. The only thing I see in the davical server log is this:

::1 - - [06/Oct/2012:13:41:52 +0200] "OPTIONS /davical HTTP/1.1" 301 233 "-" "AgenDAV v1.3.0-dev"

so to me it looks like the url building does not work. The lines from my caldav.php files look like this:

$config['caldav_base_url'] = 'http://localhost/davical';
$config['caldav_principal_template'] = '/caldav.php/%u/';
$config['caldav_calendar_homeset_template'] = '/caldav.php/%u/';

I'm thankfull if you have any ideas


Jorge López Pérez

unread,
Oct 6, 2012, 11:57:25 AM10/6/12
to agend...@googlegroups.com
Hi,

El 06/10/12 13:58, lorenzfx escribió:

> Sadly, it is still the same behaviour. The only thing I see in the
> davical server log is this:
>
> ::1 - - [06/Oct/2012:13:41:52 +0200] "OPTIONS /davical HTTP/1.1" 301 233
> "-" "AgenDAV v1.3.0-dev"

Seems that first request to CalDAV server was lacking the trailing slash
for CalDAV servers located in a relative path.

I have commited a fix for this. Can you check if this one works as it
should?

Regards!

lorenzfx

unread,
Oct 6, 2012, 1:04:44 PM10/6/12
to agend...@googlegroups.com

Hi,
I can now log in, and agendav shows all my calendars but no events at all, I now get some warnings in the agendav log:
INTERNALS - 2012-10-06 18:55:43 --> 13.134.133.58 Received 0 entries
INTERNALS - 2012-10-06 18:55:43 --> 13.134.133.58 Sending to client 0 event(s) on calendar /davical/caldav.php/testuser/work/ [0.0046/0.0002/0.0048]
INTERNALS - 2012-10-06 18:55:43 --> 13.134.133.58 Received 0 entries
INTERNALS - 2012-10-06 18:55:43 --> 13.134.133.58 Sending to client 0 event(s) on calendar /davical/caldav.php/testuser/home/ [0.0028/0.0002/0.0030

I get this in the davical access log:
::1 - testuser [06/Oct/2012:18:58:51 +0200] "OPTIONS /davical/ HTTP/1.1" 200 - "-" "AgenDAV v1.3.0-dev"
::1 - testuser [06/Oct/2012:18:58:52 +0200] "PROPFIND /davical/caldav.php/testuser/ HTTP/1.1" 207 3748 "-" "AgenDAV v1.3.0-dev"
::1 - - [06/Oct/2012:18:58:52 +0200] "REPORT /davical/davical/caldav.php/testuser/work/ HTTP/1.1" 405 263 "-" "AgenDAV v1.3.0-dev"
::1 - - [06/Oct/2012:18:58:52 +0200] "REPORT /davical/davical/caldav.php/testuser/home/ HTTP/1.1" 405 263 "-" "AgenDAV v1.3.0-dev"

so I guess their is now one "davical/" to much.

Regards

Jorge López Pérez

unread,
Oct 8, 2012, 3:19:42 AM10/8/12
to agend...@googlegroups.com
Hi,

El 06/10/12 19:04, lorenzfx escribió:

> so I guess their is now one "davical/" to much.

You're right again! Seems that I only fixed a part of the problem, but
not the whole bug.

Please, fetch latest commit and apply the following changes to your
caldav.php configuration file:

* caldav_base_url has to be set to your root URL (i.e. don't specify
here the '/davical' part)
* caldav_principal_template and caldav_calendar_homeset_template have to
be specified using your relative path (i.e. '/davical/caldav.php...')

Please, tell us if AgenDAV works now for relative URLs after applying
these changes. I have done some tests and it should work now.

Regards.

--
Jorge López Pérez
http://adobo.org
jabber: jor...@jabberes.org

lorenzfx

unread,
Oct 8, 2012, 7:54:32 AM10/8/12
to agend...@googlegroups.com


On Monday, October 8, 2012 9:19:46 AM UTC+2, Jorge Lopez wrote:

Please, tell us if AgenDAV works now for relative URLs after applying
these changes. I have done some tests and it should work now.


Hi,
it is working now.

Thanks for all your work!

sciurius

unread,
Oct 11, 2012, 5:05:13 PM10/11/12
to AgenDAV development
This is what I get after installing Composer:

PHP Fatal error: Class 'Pimple' not found in /home/jv/wrk/adobo-
agendav-0c56cfe/web/application/core/MY_Controller.php on line 26,
referer: http://phoenix.squirrel.nl/agendav/index.php/main

sciurius

unread,
Oct 11, 2012, 5:11:56 PM10/11/12
to AgenDAV development
Ok, that's solved by a new checkout.
Reply all
Reply to author
Forward
0 new messages