Skip to content

Commit 2e64da5

Browse files
committed
post install script
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
1 parent db767f2 commit 2e64da5

File tree

5 files changed

+35
-128
lines changed

5 files changed

+35
-128
lines changed

.github/workflows/codecov.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ jobs:
4444
- name: Install dependencies with composer
4545
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4646

47-
- name: Setup project
48-
run: |
49-
mv config/autoload/local.php.dist config/autoload/local.php
50-
mv config/autoload/mail.local.php.dist config/autoload/mail.local.php
51-
mv config/autoload/local.test.php.dist config/autoload/local.test.php
52-
5347
- name: Collect code coverage with PHPUnit
5448
run: vendor/bin/phpunit --colors=always --coverage-clover clover.xml
5549

.github/workflows/static-analysis.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,5 @@ jobs:
4444
- name: Install dependencies with composer
4545
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4646

47-
- name: Setup project
48-
run: |
49-
mv config/autoload/local.php.dist config/autoload/local.php
50-
mv config/autoload/mail.local.php.dist config/autoload/mail.local.php
51-
mv config/autoload/local.test.php.dist config/autoload/local.test.php
52-
5347
- name: Run static analysis with PHPStan
5448
run: vendor/bin/phpstan analyse

.laminas-ci/pre-run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ if [[ ${COMMAND} =~ phpunit ]];then
99
apt-get install php"${PHP_VERSION}"-sqlite3
1010

1111
cp config/autoload/local.php.dist config/autoload/local.php
12-
cp config/autoload/mail.local.php.dist config/autoload/mail.local.php
1312
cp config/autoload/local.test.php.dist config/autoload/local.test.php
1413

1514
fi
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
// phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols
6+
7+
function copyFile(array $file): void
8+
{
9+
if (is_readable($file['destination'])) {
10+
echo "File {$file['destination']} already exists." . PHP_EOL;
11+
} else {
12+
if (! copy($file['source'], $file['destination'])) {
13+
echo "Cannot copy {$file['source']} file to {$file['destination']}" . PHP_EOL;
14+
} else {
15+
echo "File {$file['source']} copied successfully to {$file['destination']}." . PHP_EOL;
16+
}
17+
}
18+
}
19+
20+
$files = [
21+
[
22+
'source' => 'config/autoload/local.php.dist',
23+
'destination' => 'config/autoload/local.php',
24+
],
25+
[
26+
'source' => 'config/autoload/local.test.php.dist',
27+
'destination' => 'config/autoload/local.test.php',
28+
],
29+
[
30+
'source' => 'vendor/dotkernel/dot-mail/config/mail.global.php.dist',
31+
'destination' => 'config/autoload/mail.global.php',
32+
],
33+
];
34+
35+
array_walk($files, 'copyFile');

config/autoload/mail.local.php.dist

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)