diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-03-10 05:43:57 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-03-10 05:59:46 +0300 |
commit | 87577b6d8d1b3e1ca083f0a5d895a5643fd88339 (patch) | |
tree | db8cbe095cc77beae216bf23eb707772351cff0e | |
parent | fb42debbaa840791b658041c83fcd6909880e06e (diff) |
Remove deprecated Period::factory()
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | core/Period.php | 12 | ||||
-rw-r--r-- | core/Plugin.php | 3 |
3 files changed, 7 insertions, 13 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f1a8eb4e96..d252e23600 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API's, Plugins, Themes, etc will be listed here. +## Piwik 2.12.0 + +### Breaking Changes +* The deprecated method `Period::factory()` has been removed. Use `Period\Factory` instead. + ## Piwik 2.11.0 ### Breaking Changes diff --git a/core/Period.php b/core/Period.php index d4044ed68e..b924e981c8 100644 --- a/core/Period.php +++ b/core/Period.php @@ -9,7 +9,6 @@ namespace Piwik; use Piwik\Container\StaticContainer; -use Piwik\Period\Factory as PeriodFactory; use Piwik\Period\Range; use Piwik\Translation\Translator; @@ -66,17 +65,6 @@ abstract class Period } /** - * @deprecated Use Factory::build instead - * @param $period - * @param $date - * @return Period - */ - public static function factory($period, $date) - { - return PeriodFactory::build($period, $date); - } - - /** * Returns true if `$dateString` and `$period` represent multiple periods. * * Will return true for date/period combinations where date references multiple diff --git a/core/Plugin.php b/core/Plugin.php index af564a002b..bb361b5bb5 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -8,6 +8,7 @@ */ namespace Piwik; +use Piwik\Container\StaticContainer; use Piwik\Plugin\Dependency; use Piwik\Plugin\MetadataLoader; @@ -359,7 +360,7 @@ class Plugin $this->cache->save($cacheId, $classname); } - return new $classname; + return StaticContainer::get($classname); } public function findMultipleComponents($directoryWithinPlugin, $expectedSubclass) |