Skip to content

Commit

Permalink
v5.0.0-beta, Flysystem v3, PHP8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
banago committed Mar 6, 2025
1 parent 6d272e9 commit e1267cb
Show file tree
Hide file tree
Showing 40 changed files with 4,857 additions and 3,231 deletions.
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

24 changes: 0 additions & 24 deletions Dockerfile

This file was deleted.

29 changes: 29 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM php:8.2-cli

# Install Git and other dependencies
RUN apt-get update && apt-get install -y \
git \
zip \
unzip \
libssh2-1-dev \
&& docker-php-ext-install ftp \
&& pecl install ssh2-1.3.1 \
&& docker-php-ext-enable ssh2

# Configure Git
RUN git config --global user.email "[email protected]" \
&& git config --global user.name "PHPloy Test"

WORKDIR /app

# Install composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Copy composer files
COPY composer.json composer.lock ./

# Install dependencies
RUN composer install --no-interaction --no-plugins --no-scripts

# Copy the rest of the application
COPY . .
19 changes: 10 additions & 9 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@ $phar = new Phar(

$phar->startBuffering();

// Adding folders
// https://bugs.php.net/bug.php?id=58169
$phar->buildFromDirectory(
dirname(__FILE__),
'/(vendor\/composer|vendor\/league|vendor\/phpseclib|vendor\/seld|vendor\/symfony|vendor\/myclabs)\/.*/'
);
// Add all files from vendor and src
$phar->buildFromDirectory(dirname(__FILE__), '/^(?!.*\/(\.git|tests|build|dist)).*$/');


// Adding main file
// Adding main files
$phar->addFile('phploy.php');
$phar->addFile('phploy.ini');
$phar->addFile('src/Git.php');
$phar->addFile('src/utils.php');
$phar->addFile('src/Cli.php');
$phar->addFile('src/Git.php');
$phar->addFile('src/Config.php');
$phar->addFile('src/PHPloy.php');
$phar->addFile('src/Options.php');
$phar->addFile('src/Connection.php');
$phar->addFile('src/Deployment.php');
$phar->addFile('src/Traits/DebugTrait.php');
// Autoloader
$phar->addFile('vendor/autoload.php');

// Create a stub and add the shebang
Expand Down
36 changes: 28 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "banago/phploy",
"version": "5.0.0-beta",
"description": "PHPloy - Incremental Git (S)FTP deployment tool that supports submodules, multiple servers and rollbacks.",
"license": "MIT",
"keywords": ["deploy", "ftp", "sftp", "git"],
Expand All @@ -11,15 +12,15 @@
"role": "Developer"
}
],
"require-dev": {
"pestphp/pest": "^2.0"
},
"require": {
"php": "^7.3",
"php": "^8.0",
"league/climate": "^3.0",
"league/flysystem": "^1.0",
"league/flysystem-sftp": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"teqneers/php-stream-wrapper-for-git": ">=1.0.1 <2"
"league/flysystem": "^3.0",
"league/flysystem-sftp-v3": "^3.0",
"league/flysystem-ftp": "^3.0"
},
"autoload": {
"psr-4": {
Expand All @@ -29,5 +30,24 @@
"src/utils.php"
]
},
"bin": ["bin/phploy"]
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"test": "docker compose up -d && docker compose exec phploy-test ./vendor/bin/pest && docker compose down",
"test:up": "docker compose up -d",
"test:down": "docker compose down",
"test:exec": "docker compose exec phploy-test ./vendor/bin/pest",
"lint": "phpcs --standard=PSR12 src/ tests/",
"lint:fix": "phpcbf --standard=PSR12 src/ tests/",
"analyze": "phpstan analyze src/ tests/ --level=max"
},
"bin": ["bin/phploy"],
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}
Loading

0 comments on commit e1267cb

Please sign in to comment.