Skip to content

Commit

Permalink
Update docs for phpunit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ottlinger committed Jan 14, 2025
1 parent 50b772b commit 1177d37
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ Allows sending mails to a configured and given mail address.
## PHP project init
### PHP

Project requires at least PHP 7.3 in order to run with PHPUnit 9.x.
Project requires at least PHP 8.3 in order to run with PHPUnit 11.x.

#### Ubuntu
Depending on your installation you may need to install a more recent PHP version,
as I had to do on Ubuntu 18.0.4 LTS:
https://tecadmin.net/install-php-7-on-ubuntu/

* Upgrade to PHP 7.4
* Upgrade to PHP 8.3
```
sudo apt-get install -y php7.4
sudo apt-get install -y php8.3
```
* Additional modules:
```
sudo apt-get install -y php7.4-xml php7.4-mbstring php7.4-mysql php7.4-intl php7.4-sqlite3 php-xdebug sqlite3
sudo apt-get install -y php-curl php-xml php-mbstring php-mysql php-intl php-sqlite3 php-xdebug sqlite3
```
#### Mac
```
$ brew install php@7.4
$ brew install php@8.3
```
In case you have older versions of PHP installed follow this cleanup procedure:
https://medium.com/@romaninsh/install-php-7-2-xdebug-on-macos-high-sierra-with-homebrew-july-2018-d7968fe7e8b8
Expand All @@ -60,6 +60,7 @@ Above example was performed with version 1.8.4.

```
$ ./composer.phar init
$ ./composer.phar validate
```

#### Project layout
Expand All @@ -82,10 +83,10 @@ tests/ # test code

#### PHPUnit setup

https://phpunit.de/getting-started/phpunit-9.html
https://phpunit.de/getting-started/phpunit-11.html

```
$ composer require --dev phpunit/phpunit ^9 (needs a modern PHP)
$ ./composer.phar require --dev phpunit/phpunit ^11
```

#### PHPMailer integration
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ottlinger/mailform",
"description": "Web application that sends out mails via a contact form.",
"type": "application",
"license": " Apache-2.0",
"license": "Apache-2.0",
"authors": [
{
"name": "Hugo Hirsch",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1177d37

Please sign in to comment.