Skip to content

Commit 085c554

Browse files
authored
Update codebase to PHP 7.4 (#82)
1 parent 4ed6ad5 commit 085c554

File tree

11 files changed

+555
-533
lines changed

11 files changed

+555
-533
lines changed

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name":"codeception/module-webdriver",
33
"description":"WebDriver module for Codeception",
44
"keywords":["codeception", "browser-testing", "acceptance-testing"],
5-
"homepage":"http://codeception.com/",
5+
"homepage":"https://codeception.com/",
66
"type":"library",
77
"license":"MIT",
88
"authors":[
@@ -19,7 +19,9 @@
1919
"minimum-stability": "RC",
2020

2121
"require": {
22-
"php": ">=5.6.0 <9.0",
22+
"php": "^7.4 | ^8.0",
23+
"ext-json": "*",
24+
"ext-mbstring": "*",
2325
"codeception/codeception": "^4.0",
2426
"php-webdriver/webdriver": "^1.8.0"
2527
},

readme.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# WebDriver module for Codeception
1+
# Codeception Module WebDriver
2+
3+
A WebDriver module for Codeception.
24

35
[![Chrome Tests](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome.yml/badge.svg)](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome.yml)
46
[![Chrome Headless Tests](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome-headless.yml/badge.svg)](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome-headless.yml)
@@ -7,7 +9,7 @@
79
## Installation
810

911
```
10-
composer require --dev "codeception/module-webdriver"
12+
composer require "codeception/module-webdriver" --dev
1113
```
1214

1315
## Documentation
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?php
2+
3+
declare(strict_types=1);
4+
25
namespace Codeception\Exception;
36

4-
class ConnectionException extends \RuntimeException
7+
use RuntimeException;
8+
9+
class ConnectionException extends RuntimeException
510
{
611
}

src/Codeception/Lib/Interfaces/ScreenshotSaver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Codeception\Lib\Interfaces;
34

45
interface ScreenshotSaver
@@ -10,7 +11,6 @@ interface ScreenshotSaver
1011
* $this->getModule('{{MODULE_NAME}}')->_saveScreenshot(codecept_output_dir().'screenshot_1.png');
1112
* ```
1213
* @api
13-
* @param $filename
1414
*/
15-
public function _saveScreenshot($filename);
15+
public function _saveScreenshot(string $filename);
1616
}

src/Codeception/Lib/Interfaces/SessionSnapshot.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Codeception\Lib\Interfaces;
34

45
interface SessionSnapshot
@@ -27,32 +28,28 @@ interface SessionSnapshot
2728
* // saving snapshot
2829
* $I->saveSessionSnapshot('login');
2930
* }
30-
* ?>
3131
* ```
3232
*
33-
* @param $name
3433
* @return mixed
3534
*/
36-
public function saveSessionSnapshot($name);
35+
public function saveSessionSnapshot(string $name);
3736

3837
/**
3938
* Loads cookies from a saved snapshot.
4039
* Allows to reuse same session across tests without additional login.
4140
*
4241
* See [saveSessionSnapshot](#saveSessionSnapshot)
4342
*
44-
* @param $name
4543
* @return mixed
4644
*/
47-
public function loadSessionSnapshot($name);
45+
public function loadSessionSnapshot(string $name);
4846

4947
/**
5048
* Deletes session snapshot.
5149
*
5250
* See [saveSessionSnapshot](#saveSessionSnapshot)
5351
*
54-
* @param $name
5552
* @return mixed
5653
*/
57-
public function deleteSessionSnapshot($name);
54+
public function deleteSessionSnapshot(string $name);
5855
}

0 commit comments

Comments
 (0)