Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Convert Piwik classes (core + plugins) to use PHP Namespaces #4059

Closed
mattab opened this Issue · 7 comments

1 participant

@mattab
Owner

As discussed in #3741, Piwik 2 will make use of the namespace feature of PHP 5.3. This implementation of best practises of modern PHP will lead to more readable code and overall better Piwik platform for developers.

@mattab
Owner

In aca8ec3: Refs #4059 Work in progress: Conversion to use Namespaces: Period*, Metrics, Segment, SegmentExpression, PluginsManager.
Removed some deprecated code.

@mattab
Owner

In ae4b1f4: Refs #4059 Work in progress: Conversion to use Namespaces

@mattab
Owner

In 5104d94: Refs #4059 Work in progress: Conversion to use Namespaces of dozen more classes
Removed many Piwik_ functions, in Piwik 2 it is best practise to use the methods calls instead

Todo: finish converting core/ classes + convert plugins/ classes to use \Piwik\Plugin namespace + fix build + Merge master

@mattab
Owner

Remaining Tasks for a beautiful namespaced Piwik:

  • Simplify auto loader (reuse this)
  • Convert plugins/ to use \Piwik\Plugin namespace
  • Search for Piwik_ in source code and fix them all
  • remove unprefixClass
  • Convert tests/ to use \Piwik\Tests
  • ...?
@mattab
Owner

In a96ec40: Refs #4059 Converting dozens of plugins/* classes to use Namespaces, \Piwik\Plugins*
Added namespaces to functions.php files in the five plugins that had one
Work in progress

@mattab
Owner

see follow up #4074

@mattab
Owner

In b738433: Refs #4059 Converting updates files to use namespaces

@mattab mattab added this to the 2.0 - Piwik 2.0 milestone
@mattab mattab self-assigned this
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab mattab Refs #4059 Work in progress: Conversion to use Namespaces: Period*, M…
…etrics, Segment, SegmentExpression, PluginsManager.

Removed some deprecated code.
aca8ec3
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab mattab Refs #4059 Work in progress: Conversion to use Namespaces of dozen mo…
…re classes

Removed many Piwik_ functions, in Piwik 2 it is best practise to use the methods calls instead

Todo: finish converting core/ classes + convert plugins/ classes to use \Piwik\Plugin namespace + fix build + Merge master
5104d94
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab mattab Refs #4059 Converting dozens of plugins/* classes to use Namespaces, …
…\Piwik\Plugins\*

Added namespaces to functions.php files in the five plugins that had one
Work in progress
a96ec40
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@mattab mattab Refs #4059 Converting updates files to use namespaces b738433
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.