Skip to content

Commit

Permalink
fix(ci): remove network setting on the ftp server
Browse files Browse the repository at this point in the history
  • Loading branch information
papac committed Dec 14, 2024
1 parent 4ac97d2 commit 15a003a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysql, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, redis
coverage: none

- run: docker run --net=host -p 21:21 -p 20:20 -p 12020:12020 -p 12021:12021 -p 12022:12022 -p 12023:12023 -p 12024:12024 -p 12025:12025 -e USER=$FTP_USER -e PASS=$FTP_PASSWORD -d --name ftp -v $(pwd)/:/ftp/$FTP_USER papacdev/vsftpd
- run: docker run -p 21:21 -p 20:20 -p 12020:12020 -p 12021:12021 -p 12022:12022 -p 12023:12023 -p 12024:12024 -p 12025:12025 -e USER=$FTP_USER -e PASS=$FTP_PASSWORD -d --name ftp papacdev/vsftpd
- run: docker run -p 1080:1080 -p 1025:1025 -d --name maildev soulteary/maildev
- run: docker run -p 6379:6379 -d --name redis redis
- run: docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres -e POSTGRES_PASSWORD=postgres -d postgis/postgis
Expand Down
4 changes: 2 additions & 2 deletions src/Storage/Service/FTPService.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function connect()

$this->login();
$this->changePath();
$this->setConnectionPassiveMode();
$this->activePassiveMode();
}

/**
Expand Down Expand Up @@ -642,7 +642,7 @@ private function readStream(string $path): mixed
*
* @throws RuntimeException
*/
private function setConnectionPassiveMode()
private function activePassiveMode()
{
if (!ftp_pasv($this->connection, $this->use_passive_mode)) {
throw new RuntimeException(
Expand Down
2 changes: 1 addition & 1 deletion tests/Config/stubs/storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'password' => app_env('FTP_PASSWORD', 'password'),
'username' => app_env('FTP_USERNAME', 'username'),
'port' => app_env('FTP_PORT', 21),
'root' => app_env('FTP_ROOT', sys_get_temp_dir()), // Start directory
'root' => app_env('FTP_ROOT', '/tmp'), // Start directory
'tls' => app_env('FTP_SSL', false), // `true` enable the secure connexion.
'timeout' => app_env('FTP_TIMEOUT', 90) // Temps d'attente de connection
],
Expand Down

0 comments on commit 15a003a

Please sign in to comment.