diff --git a/bin/composer.phar b/bin/composer.phar index 3c67d5983..10c245e28 100755 Binary files a/bin/composer.phar and b/bin/composer.phar differ diff --git a/composer.lock b/composer.lock index 9af35cddf..633f54786 100644 --- a/composer.lock +++ b/composer.lock @@ -427,16 +427,16 @@ }, { "name": "monolog/monolog", - "version": "1.17.2", + "version": "1.18.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24" + "reference": "e19b764b5c855580e8ffa7e615f72c10fd2f99cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bee7f0dc9c3e0b69a6039697533dca1e845c8c24", - "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e19b764b5c855580e8ffa7e615f72c10fd2f99cc", + "reference": "e19b764b5c855580e8ffa7e615f72c10fd2f99cc", "shasum": "" }, "require": { @@ -465,6 +465,7 @@ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", "ext-mongo": "Allow sending log messages to a MongoDB server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", "php-console/php-console": "Allow sending log messages to Google Chrome", "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", @@ -474,7 +475,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -500,7 +501,7 @@ "logging", "psr-3" ], - "time": "2015-10-14 12:51:02" + "time": "2016-03-01 18:00:40" }, { "name": "mrclay/minify", diff --git a/system/src/Grav/Common/GPM/Remote/GravCore.php b/system/src/Grav/Common/GPM/Remote/GravCore.php index f41bb056d..2c16bbb70 100644 --- a/system/src/Grav/Common/GPM/Remote/GravCore.php +++ b/system/src/Grav/Common/GPM/Remote/GravCore.php @@ -18,23 +18,27 @@ class GravCore extends AbstractPackageCollection */ public function __construct($refresh = false, $callback = null) { - $cache_dir = Grav::instance()['locator']->findResource('cache://gpm', true, true); - $this->cache = new FilesystemCache($cache_dir); - $this->raw = $this->cache->fetch(md5($this->repository)); + $cache_dir = Grav::instance()['locator']->findResource('cache://gpm', true, true); + $this->cache = new FilesystemCache($cache_dir); + $this->repository .= '?v=' . GRAV_VERSION; + $this->raw = $this->cache->fetch(md5($this->repository)); $this->fetch($refresh, $callback); - $this->data = json_decode($this->raw, true); + $this->data = json_decode($this->raw, true); $this->version = isset($this->data['version']) ? $this->data['version'] : '-'; - $this->date = isset($this->data['date']) ? $this->data['date'] : '-'; + $this->date = isset($this->data['date']) ? $this->data['date'] : '-'; - if (isset($this->data['assets'])) foreach ($this->data['assets'] as $slug => $data) { - $this->items[$slug] = new Package($data); + if (isset($this->data['assets'])) { + foreach ($this->data['assets'] as $slug => $data) { + $this->items[$slug] = new Package($data); + } } } /** * Returns the list of assets associated to the latest version of Grav + * * @return array list of assets */ public function getAssets() @@ -44,6 +48,7 @@ class GravCore extends AbstractPackageCollection /** * Returns the changelog list for each version of Grav + * * @param string $diff the version number to start the diff from * * @return array changelog list for each version @@ -58,7 +63,9 @@ class GravCore extends AbstractPackageCollection foreach ($this->data['changelog'] as $version => $changelog) { preg_match("/[\w-\.]+/", $version, $cleanVersion); - if (!$cleanVersion || version_compare($diff, $cleanVersion[0], ">=")) { continue; } + if (!$cleanVersion || version_compare($diff, $cleanVersion[0], ">=")) { + continue; + } $diffLog[$version] = $changelog; } @@ -66,17 +73,9 @@ class GravCore extends AbstractPackageCollection return $diffLog; } - /** - * Returns the latest version of Grav available remotely - * @return string - */ - public function getVersion() - { - return $this->version; - } - /** * Return the release date of the latest Grav + * * @return string */ public function getDate() @@ -89,6 +88,16 @@ class GravCore extends AbstractPackageCollection return version_compare(GRAV_VERSION, $this->getVersion(), '<'); } + /** + * Returns the latest version of Grav available remotely + * + * @return string + */ + public function getVersion() + { + return $this->version; + } + public function isSymlink() { return is_link(GRAV_ROOT . DS . 'index.php'); diff --git a/system/src/Grav/Common/GPM/Remote/Plugins.php b/system/src/Grav/Common/GPM/Remote/Plugins.php index e32cb7b4f..074e5d039 100644 --- a/system/src/Grav/Common/GPM/Remote/Plugins.php +++ b/system/src/Grav/Common/GPM/Remote/Plugins.php @@ -12,7 +12,7 @@ class Plugins extends AbstractPackageCollection */ protected $type = 'plugins'; - protected $repository = 'https://getgrav.org/downloads/plugins.json?v='; + protected $repository = 'https://getgrav.org/downloads/plugins.json'; /** * Local Plugins Constructor @@ -21,7 +21,7 @@ class Plugins extends AbstractPackageCollection */ public function __construct($refresh = false, $callback = null) { - $this->repository .= GRAV_VERSION; + $this->repository .= '?v=' . GRAV_VERSION; parent::__construct($this->repository, $refresh, $callback); } diff --git a/system/src/Grav/Common/GPM/Remote/Themes.php b/system/src/Grav/Common/GPM/Remote/Themes.php index 637e20431..cc4af7d02 100644 --- a/system/src/Grav/Common/GPM/Remote/Themes.php +++ b/system/src/Grav/Common/GPM/Remote/Themes.php @@ -12,7 +12,7 @@ class Themes extends AbstractPackageCollection */ protected $type = 'themes'; - protected $repository = 'https://getgrav.org/downloads/themes.json?v='; + protected $repository = 'https://getgrav.org/downloads/themes.json'; /** * Local Themes Constructor @@ -21,7 +21,7 @@ class Themes extends AbstractPackageCollection */ public function __construct($refresh = false, $callback = null) { - $this->repository .= GRAV_VERSION; + $this->repository .= '?v=' . GRAV_VERSION; parent::__construct($this->repository, $refresh, $callback); }