From d80180c2b97cefac15df2cfdfc725276c91de297 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 18 Jul 2012 14:57:17 +0200 Subject: [PATCH] Allow notifyUrl to be a complete URL --- src/Composer/Repository/ComposerRepository.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index c6861c78d..e6ea42d28 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -87,7 +87,11 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository $data = $json->read(); if (!empty($data['notify'])) { - $this->notifyUrl = preg_replace('{(https?://[^/]+).*}i', '$1' . $data['notify'], $this->url); + if ('/' === $data['notify'][0]) { + $this->notifyUrl = preg_replace('{(https?://[^/]+).*}i', '$1' . $data['notify'], $this->url); + } else { + $this->notifyUrl = $data['notify']; + } } $this->cache->write('packages.json', json_encode($data));