Skip to content

Commit

Permalink
Replace references of Entrecore and Opsbears for LightningStudio and …
Browse files Browse the repository at this point in the history
…as such this will break older versions because of the namespace change.
  • Loading branch information
philcook committed Feb 16, 2021
1 parent 9a6bf78 commit 94cefd8
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 45 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017-2021 Phil Cook

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
29 changes: 18 additions & 11 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
Copyright (c) 2015 Opsbears
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
Copyright (c) 2017-2021 Phil Cook

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
25 changes: 6 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@
[![Packagist](https://img.shields.io/packagist/v/philcook/gtmetrix.svg)](https://packagist.org/packages/philcook/gtmetrix)
[![Packagist](https://img.shields.io/packagist/l/philcook/gtmetrix.svg)](https://packagist.org/packages/philcook/gtmetrix)

## License

Copyright (c) 2017 Opsbears

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## Installing

This client library can be installed using [composer](https://getcomposer.org/):
Expand All @@ -29,8 +12,8 @@ This client library can be installed using [composer](https://getcomposer.org/):
## Using

```php
use Entrecore\GTMetrixClient\GTMetrixClient;
use Entrecore\GTMetrixClient\GTMetrixTest;
use LightningStudio\GTMetrixClient\GTMetrixClient;
use LightningStudio\GTMetrixClient\GTMetrixTest;

$client = new GTMetrixClient();
$client->setUsername('your@email.com');
Expand All @@ -47,3 +30,7 @@ while ($test->getState() != GTMetrixTest::STATE_COMPLETED &&
sleep(5);
}
```

## Update information

From version 2.0 references to Entrecore have been replace with LightningStudio due to Entrecore no longer existing and therefore avoiding confusion for users.
Binary file removed assets/entrecore.png
Binary file not shown.
Binary file removed assets/opsbears.png
Binary file not shown.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"autoload": {
"psr-4": {
"Entrecore\\GTMetrixClient\\": "src/"
"LightningStudio\\GTMetrixClient\\": "src/"
}
},
"require": {
Expand Down
2 changes: 1 addition & 1 deletion src/GTMetrixBrowser.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace Entrecore\GTMetrixClient;
namespace LightningStudio\GTMetrixClient;

/**
* GTMetrix browser object
Expand Down
2 changes: 1 addition & 1 deletion src/GTMetrixClient.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Entrecore\GTMetrixClient;
namespace LightningStudio\GTMetrixClient;

/**
* The basic GTMetrix client class.
Expand Down
4 changes: 2 additions & 2 deletions src/GTMetrixConfigurationException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php


namespace Entrecore\GTMetrixClient;
namespace LightningStudio\GTMetrixClient;

/**
* Configuration problem exception.
*/
class GTMetrixConfigurationException extends GTMetrixException {

}
}
4 changes: 2 additions & 2 deletions src/GTMetrixException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php


namespace Entrecore\GTMetrixClient;
namespace LightningStudio\GTMetrixClient;

/**
* Generic GTMetrix exception
*/
class GTMetrixException extends \Exception {

}
}
4 changes: 2 additions & 2 deletions src/GTMetrixLocation.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace Entrecore\GTMetrixClient;
namespace LightningStudio\GTMetrixClient;

/**
* GTMetrix location object.
Expand Down Expand Up @@ -97,4 +97,4 @@ public function fromArray($data) {
public function __toString() {
return $this->getId();
}
}
}
2 changes: 1 addition & 1 deletion src/GTMetrixTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace Entrecore\GTMetrixClient;
namespace LightningStudio\GTMetrixClient;

/**
* GTMetrix test object
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractGTMetrixTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Entrecore\GTMetrixClient\GTMetrixClient;
use LightningStudio\GTMetrixClient\GTMetrixClient;
use PHPUnit\Framework\TestCase;

/**
Expand Down
8 changes: 4 additions & 4 deletions tests/GTMetrixFunctionalTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Entrecore\GTMetrixClient\GTMetrixTest;
use LightningStudio\GTMetrixClient\GTMetrixTest;

require_once(__DIR__ . '/AbstractGTMetrixTest.php');

Expand All @@ -11,19 +11,19 @@ class GTMetrixFunctionalTest extends AbstractGTMetrixTest {
public function testGetBrowsers() {
$browsers = $this->client->getBrowsers();
foreach ($browsers as $browser) {
$this->assertInstanceOf('Entrecore\GTMetrixClient\GTMetrixBrowser', $browser);
$this->assertInstanceOf('LightningStudio\GTMetrixClient\GTMetrixBrowser', $browser);
}
}

public function testGetLocations() {
$locations = $this->client->getLocations();
foreach ($locations as $location) {
$this->assertInstanceOf('Entrecore\GTMetrixClient\GTMetrixLocation', $location);
$this->assertInstanceOf('LightningStudio\GTMetrixClient\GTMetrixLocation', $location);
}
}

public function testStart() {
$test = $this->client->startTest('http://www.entrecore.com/');
$test = $this->client->startTest('https://www.wikipedia.org/');
$this->assertNotEmpty($test->getId());
while ($test->getState() != GTMetrixTest::STATE_COMPLETED &&
$test->getState() != GTMetrixTest::STATE_ERROR) {
Expand Down

0 comments on commit 94cefd8

Please sign in to comment.