Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
Upgrade to PHP 8.0 (#76)
Browse files Browse the repository at this point in the history
* Remove PHP 7.4 from CI builds.

* Update Docker to PHP 8.

* Update .gitattributes.

* Update packages to PHP 8.

* Install Rector.

* Add Rector alias.

* Configure Rector.

* Upgrade code to PHP 8.
  • Loading branch information
ziadoz authored Dec 21, 2021
1 parent 36026e0 commit d8725de
Show file tree
Hide file tree
Showing 8 changed files with 556 additions and 486 deletions.
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/.semaphore export-ignore
/.github export-ignore
/docker export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/composer.lock export-ignore
/LICENSE export-ignore
/phpunit.xml.dist export-ignore
/php-email-tokens export-ignore
/README.md export-ignore
1 change: 0 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
steps:
- uses: actions/checkout@v2
Expand Down
7 changes: 6 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
return FusionsPim\PhpCsFixer\Factory::fromDefaults([
$config = FusionsPim\PhpCsFixer\Factory::fromDefaults([
'ordered_class_elements' => true, // Order methods too (our default is to leave methods alone)
]);

return $config->setFinder(
$config->getFinder()
->notName('rector.php')
);
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
"token"
],
"require": {
"php": "^7.4 || ^8.0",
"ext-mbstring": "^7.4 || ^8.0",
"php": "^8.0",
"ext-mbstring": "^8.0",
"nesbot/carbon": "^2.0",
"tuupola/base62": "^2.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.6",
"fusionspim/php-cs-fixer-config": "^9.0",
"phpunit/phpunit": "^9.0.0"
"phpunit/phpunit": "^9.0.0",
"rector/rector": "^0.12.8"
},
"autoload": {
"psr-4": {
Expand All @@ -29,6 +30,7 @@
"php-cs-fixer fix --config=.php-cs-fixer.dist.php; echo",
"composer normalize; echo"
],
"fix-rector": "vendor/bin/rector process src tests",
"test": [
"phpunit --stop-on-failure --stop-on-error; echo"
]
Expand Down
Loading

0 comments on commit d8725de

Please sign in to comment.