Skip to content

Commit 8cb8d88

Browse files
authored
Merge pull request #53 from dunglas/symfony-ns
Use Symfony as root namespace
2 parents bc34931 + b4f27d7 commit 8cb8d88

30 files changed

+69
-69
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Use [Composer](https://getcomposer.org/) to install Panthère in your project. Y
3737

3838
require __DIR__.'/vendor/autoload.php'; // Composer's autoloader
3939

40-
$client = \Panthere\Client::createChromeClient();
40+
$client = \Symfony\Component\Panthere\Client::createChromeClient();
4141
$crawler = $client->request('GET', 'http://api-platform.com'); // Yes, this website is 100% in JavaScript
4242

4343
$link = $crawler->selectLink('Support')->link();
@@ -59,7 +59,7 @@ It extends [PHPUnit](https://phpunit.de/)'s `TestCase` and provide all testing t
5959
```php
6060
<?php
6161

62-
use Panthere\PanthereTestCase;
62+
use Symfony\Component\Panthere\PanthereTestCase;
6363

6464
class E2eTest extends PanthereTestCase
6565
{
@@ -96,7 +96,7 @@ to authenticate to an external SSO server, do I want to access the kernel of the
9696
```php
9797
<?php
9898

99-
use Panthere\PanthereTestCase;
99+
use Symfony\Component\Panthere\PanthereTestCase;
100100

101101
class E2eTest extends PanthereTestCase
102102
{

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"symfony/browser-kit": "4.1.0"
2727
},
2828
"autoload": {
29-
"psr-4": { "Panthere\\": "src/" }
29+
"psr-4": { "Symfony\\Component\\Panthere\\": "src/" }
3030
},
3131
"autoload-dev": {
32-
"psr-4": { "Panthere\\Tests\\": "tests/" }
32+
"psr-4": { "Symfony\\Component\\Panthere\\Tests\\": "tests/" }
3333
},
3434
"extra": {
3535
"branch-alias": {

examples/basic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
require __DIR__.'/../vendor/autoload.php'; // Composer's autoloader
1515

16-
$client = \Panthere\Client::createChromeClient();
16+
$client = \Symfony\Component\Panthere\Client::createChromeClient();
1717
$crawler = $client->request('GET', 'http://api-platform.com'); // Yes, this website is 100% in JavaScript
1818

1919
$link = $crawler->selectLink('Support')->link();

src/Client.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111

1212
declare(strict_types=1);
1313

14-
namespace Panthere;
14+
namespace Symfony\Component\Panthere;
1515

1616
use Facebook\WebDriver\WebDriver;
1717
use Facebook\WebDriver\WebDriverBy;
1818
use Facebook\WebDriver\WebDriverCapabilities;
1919
use Facebook\WebDriver\WebDriverExpectedCondition;
20-
use Panthere\Cookie\CookieJar;
21-
use Panthere\DomCrawler\Crawler;
22-
use Panthere\DomCrawler\Form as PanthereForm;
23-
use Panthere\DomCrawler\Link as PanthereLink;
24-
use Panthere\ProcessManager\BrowserManagerInterface;
25-
use Panthere\ProcessManager\ChromeManager;
26-
use Panthere\ProcessManager\SeleniumManager;
2720
use Symfony\Component\BrowserKit\Client as BaseClient;
2821
use Symfony\Component\BrowserKit\Request;
2922
use Symfony\Component\BrowserKit\Response;
3023
use Symfony\Component\DomCrawler\Form;
3124
use Symfony\Component\DomCrawler\Link;
25+
use Symfony\Component\Panthere\Cookie\CookieJar;
26+
use Symfony\Component\Panthere\DomCrawler\Crawler;
27+
use Symfony\Component\Panthere\DomCrawler\Form as PanthereForm;
28+
use Symfony\Component\Panthere\DomCrawler\Link as PanthereLink;
29+
use Symfony\Component\Panthere\ProcessManager\BrowserManagerInterface;
30+
use Symfony\Component\Panthere\ProcessManager\ChromeManager;
31+
use Symfony\Component\Panthere\ProcessManager\SeleniumManager;
3232

3333
/**
3434
* @author Kévin Dunglas <[email protected]>

src/Cookie/CookieJar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
declare(strict_types=1);
1313

14-
namespace Panthere\Cookie;
14+
namespace Symfony\Component\Panthere\Cookie;
1515

1616
use Facebook\WebDriver\Cookie as WebDriverCookie;
1717
use Facebook\WebDriver\WebDriver;
18-
use Panthere\ExceptionThrower;
1918
use Symfony\Component\BrowserKit\Cookie;
2019
use Symfony\Component\BrowserKit\CookieJar as BaseCookieJar;
2120
use Symfony\Component\BrowserKit\Response;
21+
use Symfony\Component\Panthere\ExceptionThrower;
2222

2323
/**
2424
* @author Kévin Dunglas <[email protected]>

src/DomCrawler/Crawler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
declare(strict_types=1);
1313

14-
namespace Panthere\DomCrawler;
14+
namespace Symfony\Component\Panthere\DomCrawler;
1515

1616
use Facebook\WebDriver\Exception\NoSuchElementException;
1717
use Facebook\WebDriver\WebDriver;
1818
use Facebook\WebDriver\WebDriverBy;
1919
use Facebook\WebDriver\WebDriverElement;
20-
use Panthere\ExceptionThrower;
2120
use Symfony\Component\DomCrawler\Crawler as BaseCrawler;
21+
use Symfony\Component\Panthere\ExceptionThrower;
2222

2323
/**
2424
* @author Kévin Dunglas <[email protected]>

src/DomCrawler/Field/ChoiceFormField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
declare(strict_types=1);
1313

14-
namespace Panthere\DomCrawler\Field;
14+
namespace Symfony\Component\Panthere\DomCrawler\Field;
1515

1616
use Facebook\WebDriver\WebDriverSelect;
1717
use Facebook\WebDriver\WebDriverSelectInterface;
18-
use Panthere\WebDriver\WebDriverCheckbox;
1918
use Symfony\Component\DomCrawler\Field\ChoiceFormField as BaseChoiceFormField;
19+
use Symfony\Component\Panthere\WebDriver\WebDriverCheckbox;
2020

2121
/**
2222
* @author Kévin Dunglas <[email protected]>

src/DomCrawler/Field/FormFieldTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
declare(strict_types=1);
1313

14-
namespace Panthere\DomCrawler\Field;
14+
namespace Symfony\Component\Panthere\DomCrawler\Field;
1515

1616
use Facebook\WebDriver\WebDriverElement;
17-
use Panthere\ExceptionThrower;
17+
use Symfony\Component\Panthere\ExceptionThrower;
1818

1919
/**
2020
* @internal

src/DomCrawler/Field/InputFormField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
declare(strict_types=1);
1313

14-
namespace Panthere\DomCrawler\Field;
14+
namespace Symfony\Component\Panthere\DomCrawler\Field;
1515

1616
use Symfony\Component\DomCrawler\Field\InputFormField as BaseInputFormField;
1717

src/DomCrawler/Field/TextareaFormField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
declare(strict_types=1);
1313

14-
namespace Panthere\DomCrawler\Field;
14+
namespace Symfony\Component\Panthere\DomCrawler\Field;
1515

1616
use Symfony\Component\DomCrawler\Field\TextareaFormField as BaseTextareaFormField;
1717

0 commit comments

Comments
 (0)