Skip to content

Commit a36b57e

Browse files
Merge pull request #648 from haeber/master
add PHPUnit 12 compatibility; typos; PHP 8.4 compatibility; some cleanup; drop PHP 7.4
2 parents f2c43ab + c1cadd5 commit a36b57e

23 files changed

+75
-42
lines changed

.github/workflows/qa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run: rm -v composer.json
1515

1616
- name: PHP-CS-Fixer
17-
uses: docker://jakzal/phpqa:1.58.7-php7.4-alpine
17+
uses: docker://jakzal/phpqa:1.58.7-php8.0-alpine
1818
with:
1919
args: php-cs-fixer --dry-run --diff --no-interaction --ansi fix
2020

.github/workflows/tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
symfony-version: ['^6.4']
1818
phpunit-version: ['^9.6']
1919
include:
20-
- php-version: 7.4
20+
- php-version: 8.0
2121
symfony-version: "^5.4"
2222
phpunit-version: '^9.6'
2323
composer-flags: "--prefer-lowest"
@@ -48,6 +48,9 @@ jobs:
4848
- php-version: 8.4
4949
symfony-version: "^7.0"
5050
phpunit-version: "^11.0"
51+
- php-version: 8.4
52+
symfony-version: "^7.0"
53+
phpunit-version: "^12.0"
5154

5255
steps:
5356
- name: Checkout
@@ -88,12 +91,7 @@ jobs:
8891
8992
# This is needed to fix builds where the `annotation_reader` service may not be set up if
9093
# the Annotations package is not in the production dependencies
91-
- name: Require Annotations v1 to require for PHP 7
92-
if: startsWith(matrix.php-version, '7.')
93-
run: composer require --no-update "doctrine/annotations:^1.8.0"
94-
9594
- name: Require Annotations v1/v2 to require for PHP 8+
96-
if: startsWith(matrix.php-version, '7.') != true
9795
run: composer require --no-update "doctrine/annotations:^1.8.0|^2.0"
9896

9997
- name: Install Composer dependencies

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
composer.lock
22
vendor
33
.php_cs.cache
4+
.idea
45

56
# Ignore files created during tests
67
/cov/

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
Removed features deprecated in [4.6](#46)
66

7+
## 4.14
8+
Drop support for PHP 7.4 (it does not support Attributes, which are obligatory for compatibility with PHPUnit 12)
9+
710
## 4.10
811

912
Drop support for php 7.2, 7.3

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
"authors": [
88
{
99
"name": "Liip AG",
10-
"homepage": "http://www.liip.ch/"
10+
"homepage": "https://www.liip.ch/"
1111
},
1212
{
1313
"name": "Community contributions",
1414
"homepage": "https://github.com/liip/LiipFunctionalTestBundle/contributors"
1515
}
1616
],
1717
"require": {
18-
"php": "^7.4 || ^8.0",
19-
"phpunit/phpunit": "^9.6 || ^10.0 || ^11.0",
18+
"php": "^8.0",
19+
"phpunit/phpunit": "^9.6 || ^10.0 || ^11.0 || ^12.0",
2020
"symfony/browser-kit": "^5.4 || ^6.4 || ^7.0",
2121
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0"
2222
},

doc/basic.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class MyControllerTest extends WebTestCase
140140

141141
##### fetchCrawler()
142142

143-
Get a [Crawler](http://api.symfony.com/master/Symfony/Component/DomCrawler/Crawler.html) instance from an URL:
143+
Get a [Crawler](http://api.symfony.com/master/Symfony/Component/DomCrawler/Crawler.html) instance from a URL:
144144

145145
```php
146146
$crawler = $this->fetchCrawler('/contact');
@@ -176,7 +176,7 @@ class MyControllerTest extends WebTestCase
176176

177177
##### fetchContent()
178178

179-
Get the content of an URL:
179+
Get the content of a URL:
180180

181181
```php
182182
$content = $this->fetchContent('/contact');
@@ -213,7 +213,7 @@ class MyControllerTest extends WebTestCase
213213

214214
##### getURL()
215215

216-
Generate an URL from a route:
216+
Generate a URL from a route:
217217

218218
```php
219219
$path = $this->getUrl(

doc/caveats.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ AnnotationRegistry::registerLoader([$loader, 'loadClass']);
4545
AnnotationReader::addGlobalIgnoredName('group');
4646
```
4747

48-
Set path to this file in your PHPUnit configuration file (eg. `phpunit.xml.dist`):
48+
Set path to this file in your PHPUnit configuration file (e.g. `phpunit.xml.dist`):
4949

5050
```xml
5151
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
52-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.5/phpunit.xsd"
52+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
5353
bootstrap="tests/bootstrap.php"
5454
5555
>

doc/command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MyTestCase extends WebTestCase {
2424
}
2525
```
2626

27-
Depending where your tests are running, you might want to disable the output
27+
Depending on where your tests are running, you might want to disable the output
2828
decorator:
2929
```yaml
3030
# app/config/config_test.yml

doc/fastest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ You can use the following command:
4747
find src/*/*/Tests/ -name "*Test.php" | vendor/bin/fastest "vendor/bin/phpunit -c app/phpunit.xml.dist {};"
4848
```
4949

50-
Otherwise you'll have to adapt the paths.
50+
Otherwise, you'll have to adapt the paths.
5151

5252
[Caveats](./caveats.md)

doc/logged.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Create an already logged client
44
> [!TIP]
55
> Some methods provided by this bundle have been implemented in Symfony. Alternative ways will be shown below.
66
7-
The `WebTestCase` provides a conveniency method to create an already logged in client using the first parameter of
7+
The `WebTestCase` provides a convenience method to create an already logged in client using the first parameter of
88
`WebTestCase::makeClient()`.
99

1010
You have three alternatives to create an already logged in client:
@@ -77,14 +77,14 @@ framework:
7777
### Recommendations to use already logged in clients
7878

7979
As [recommended by the Symfony Cookbook](http://symfony.com/doc/current/cookbook/testing/http_authentication.html) in
80-
the chapter about Testing, it is a good idea to to use HTTP Basic Auth for you tests. You can configure the
80+
the chapter about Testing, it is a good idea to use HTTP Basic Auth for you tests. You can configure the
8181
authentication method in your `config_test.yml`:
8282

8383
```yaml
8484
# The best practice in symfony is to put a HTTP basic auth
8585
# for the firewall in test env, so that not to have to
8686
# make a request to the login form every single time.
87-
# http://symfony.com/doc/current/cookbook/testing/http_authentication.html
87+
# https://symfony.com/doc/current/cookbook/testing/http_authentication.html
8888
security:
8989
firewalls:
9090
NAME_OF_YOUR_FIREWALL:

0 commit comments

Comments
 (0)