Skip to content

Loading…

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

Closed
mattab opened this Issue · 7 comments

1 participant

@mattab
Piwik Open Source Analytics member

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
Piwik Open Source Analytics member

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

@mattab
Piwik Open Source Analytics member

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

@mattab
Piwik Open Source Analytics member

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
Piwik Open Source Analytics member

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
Piwik Open Source Analytics member

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
Piwik Open Source Analytics member

see follow up #4074

@mattab
Piwik Open Source Analytics member

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 pushed a commit to sabl0r/piwik that referenced this issue
@mattab mattab Refs #4059 Work in progress: Conversion to use Namespaces: Period*, M…
…etrics, Segment, SegmentExpression, PluginsManager.

Removed some deprecated code.
aca8ec3
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue
@mattab mattab Refs #4059 Work in progress: Conversion to use Namespaces ae4b1f4
@sabl0r sabl0r pushed a commit to sabl0r/piwik that referenced this issue
@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 pushed a commit to sabl0r/piwik that referenced this issue
@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 pushed a commit to sabl0r/piwik that referenced this issue
@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.