Skip to content

Commit

Permalink
Merge pull request #18 from Soullivaneuh/points-collection-deprecation
Browse files Browse the repository at this point in the history
Deprecate PointsCollection class
  • Loading branch information
Algatux committed Jun 3, 2016
2 parents d58ef5a + 94d4065 commit 9aa7987
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions UPGRADE-1.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Some class are deprecated and should not be used anymore:
* `Algatux\InfluxDbBundle\Services\Clients\InfluxDbClientFactory`
* `Algatux\InfluxDbBundle\Services\Clients\WriterClient`
* `Algatux\InfluxDbBundle\Services\Clients\ReaderClient`
* `Algatux\InfluxDbBundle\Model\PointsCollection`

## Deprecated interfaces

Expand Down
7 changes: 7 additions & 0 deletions src/Model/PointsCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@
use InfluxDB\Database;
use InfluxDB\Point;

@trigger_error(
'The '.__NAMESPACE__.'\PointsCollection class is deprecated since version 1.1 and will be removed in 2.0.',
E_USER_DEPRECATED
);

/**
* Class PointsCollection.
*
* @deprecated Since version 1.1, to be removed in 2.0.
*/
class PointsCollection extends ArrayCollection
{
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/Events/InfluxDbEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

class InfluxDbEventTest extends \PHPUnit_Framework_TestCase
{
/**
* @group legacy
*/
public function test_event_interface()
{
$event = new HttpEvent(new PointsCollection([1, 2, 3]), ClientInterface::HTTP_CLIENT);
Expand Down

0 comments on commit 9aa7987

Please sign in to comment.