Skip to content

Commit

Permalink
Merge pull request #28 from likesistemas/feature/php-81
Browse files Browse the repository at this point in the history
🐳 Adicionando suporte ao PHP 8.1
  • Loading branch information
ricardoapaes committed Jun 1, 2022
2 parents 1abedb2 + 67323f4 commit 1259ec2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
test:
strategy:
matrix:
PHP: [56, 73, 74, 80]
PHP: [56, 73, 74, 80, 81]

runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
test:
strategy:
matrix:
PHP: [56, 73, 74, 80]
PHP: [56, 73, 74, 80, 81]

runs-on: ubuntu-latest

Expand Down
20 changes: 20 additions & 0 deletions docker-compose-81.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.5'

services:

app:
command: app create && add-new-config php version 8.1
environment:
- DB_HOST_SLAVE=mysql_slave
- MEMCACHE_HOST=memcache
- MEMCACHE_PORT=11212
- [email protected]
- EMAIL_SENHA=123456
- [email protected]
- EMAIL_NOME=Ricardo
- AWS_KEY=like123456
- AWS_SECRET=78910

nginx:
environment:
- INDEX_FILE=index.php
11 changes: 7 additions & 4 deletions www80/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
testWriteFile("files/");
testWriteFile("files/produto/", true);

$versaoPhp = explode('.', phpversion());
$versaoPhpFormatada = $versaoPhp[0] . $versaoPhp[1];
$versaoPhpFormatadaComPonto = $versaoPhp[0] . '.' . $versaoPhp[1];

$config = parse_ini_file(__DIR__ . "/../config.ini", true);
$expectedConfig = [
'bd' => [
Expand All @@ -36,7 +40,7 @@
'secret' => '78910'
],
'php' => [
'version' => '8.0'
'version' => $versaoPhpFormatadaComPonto
]
];

Expand Down Expand Up @@ -68,6 +72,5 @@
exit(1);
}

$versaoPhp = explode('.', phpversion());
echo "core" . "|" .
$versaoPhp[0] . $versaoPhp[1];

echo "core" . "|" . $versaoPhpFormatada;

0 comments on commit 1259ec2

Please sign in to comment.