diff --git a/Dockerfile b/Dockerfile index dc3de15..4ea5fc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ LABEL "org.opencontainers.image.source"="https://github.com/rtCamp/action-deploy ENV PATH="/composer/vendor/bin:~/.local/bin:$PATH" ENV COMPOSER_ALLOW_SUPERUSER=1 ENV COMPOSER_HOME=/composer -ENV DEFAULT_PHP_VERSION=7.4 +ENV DEFAULT_PHP_VERSION=8.4 RUN apt update && \ apt install -y \ @@ -27,8 +27,8 @@ RUN apt update && \ software-properties-common && \ add-apt-repository ppa:ondrej/php && \ apt update && \ - apt-get install -y php7.4-cli php7.4-curl php7.4-json php7.4-mbstring php7.4-xml php7.4-iconv php7.4-yaml && \ - pip3 install shyaml --break-system-packages && \ + apt-get install -y php8.4-cli php8.4-curl php8.4-mbstring php8.4-xml php8.4-iconv php8.4-yaml && \ + pip3 install shyaml pyyaml --break-system-packages && \ rm -rf /var/lib/apt/lists/* # Setup wp-cli diff --git a/composer.json b/composer.json index 37e862f..36f2759 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,10 @@ { "require": { - "deployer/deployer": "^6.8", - "deployer/recipes": "^6.2" + "deployer/deployer": "^7.0" }, "config": { "platform": { - "php": "7.4.33" + "php": "8.4.0" } } } diff --git a/composer.lock b/composer.lock index 825ee34..70f7ad4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,46 +4,37 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "23d6b306534888f1b6db8a98cccf2677", + "content-hash": "9b55c42d8b33a4e0148cd2dec8cc828d", "packages": [ { "name": "deployer/deployer", - "version": "v6.9.0", + "version": "v7.5.12", "source": { "type": "git", "url": "https://github.com/deployphp/deployer.git", - "reference": "c4380effdc9f6d9c6ae549bb76f0a22bcb1d31d2" + "reference": "efc71dac9ccc86b3f9946e75d50cb106b775aae2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/deployphp/deployer/zipball/c4380effdc9f6d9c6ae549bb76f0a22bcb1d31d2", - "reference": "c4380effdc9f6d9c6ae549bb76f0a22bcb1d31d2", + "url": "https://api.github.com/repos/deployphp/deployer/zipball/efc71dac9ccc86b3f9946e75d50cb106b775aae2", + "reference": "efc71dac9ccc86b3f9946e75d50cb106b775aae2", "shasum": "" }, "require": { - "deployer/phar-update": "~2.2", - "php": "^7.2 || ^8.0", - "pimple/pimple": "~3.0", - "symfony/console": "~2.7|~3.0|~4.0|~5.0", - "symfony/process": "~2.7|~3.0|~4.0|~5.0", - "symfony/yaml": "~2.7|~3.0|~4.0|~5.0" + "ext-json": "*", + "php": "^8.0|^7.3" }, "require-dev": { - "phpunit/phpunit": "^8" + "friendsofphp/php-cs-fixer": "^3.64", + "pestphp/pest": "^3.3", + "phpstan/phpstan": "^1.4", + "phpunit/php-code-coverage": "^11.0", + "phpunit/phpunit": "^11.4" }, "bin": [ "bin/dep" ], "type": "library", - "autoload": { - "files": [ - "src/Support/helpers.php", - "src/functions.php" - ], - "psr-4": { - "Deployer\\": "src/" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -63,1194 +54,11 @@ }, "funding": [ { - "url": "https://github.com/antonmedv", - "type": "github" - } - ], - "time": "2022-08-03T18:09:01+00:00" - }, - { - "name": "deployer/phar-update", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/deployphp/phar-update.git", - "reference": "9ad07422f2cd43a1382ee8e134bdcd3a374848e3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/deployphp/phar-update/zipball/9ad07422f2cd43a1382ee8e134bdcd3a374848e3", - "reference": "9ad07422f2cd43a1382ee8e134bdcd3a374848e3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/console": "~2.7|~3.0|~4.0|~5.0" - }, - "require-dev": { - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*", - "symfony/process": "~2.7|~3.0|~4.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Deployer\\Component\\PHPUnit\\": "src/PHPUnit/", - "Deployer\\Component\\Version\\": "src/Version/", - "Deployer\\Component\\PharUpdate\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - }, - { - "name": "Anton Medvedev", - "email": "anton@medv.io", - "homepage": "https://medv.io" - } - ], - "description": "Integrates Phar Update to Symfony Console.", - "homepage": "https://github.com/deployphp/phar-update", - "keywords": [ - "console", - "phar", - "update" - ], - "support": { - "issues": "https://github.com/deployphp/phar-update/issues", - "source": "https://github.com/deployphp/phar-update/tree/v2.2.0" - }, - "abandoned": true, - "time": "2019-12-12T13:45:57+00:00" - }, - { - "name": "deployer/recipes", - "version": "6.2.2", - "source": { - "type": "git", - "url": "https://github.com/deployphp/recipes.git", - "reference": "84b3229c518c094a950e1fe785b7b8f9598770fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/deployphp/recipes/zipball/84b3229c518c094a950e1fe785b7b8f9598770fe", - "reference": "84b3229c518c094a950e1fe785b7b8f9598770fe", - "shasum": "" - }, - "require": { - "php": "~7.0" - }, - "require-dev": { - "deployer/deployer": "^6.3" - }, - "type": "library", - "autoload": { - "files": [ - "autoload.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anton Medvedev", - "email": "anton@medv.io" - } - ], - "description": "3rd party deployer recipes", - "homepage": "https://github.com/deployphp/recipes", - "keywords": [ - "cachetool", - "cloudflare", - "deploy", - "deployer", - "deployment", - "hipchat", - "newrelic", - "rabbit", - "recipes", - "sentry", - "slack", - "yarn" - ], - "support": { - "issues": "https://github.com/deployphp/recipes/issues", - "source": "https://github.com/deployphp/recipes" - }, - "abandoned": true, - "time": "2019-06-27T06:47:18+00:00" - }, - { - "name": "pimple/pimple", - "version": "v3.6.2", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "8cfe7f74ac22a433d303914eba9ea4c2a834edce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/8cfe7f74ac22a433d303914eba9ea4c2a834edce", - "reference": "8cfe7f74ac22a433d303914eba9ea4c2a834edce", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1 || ^2.0" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", - "keywords": [ - "container", - "dependency injection" - ], - "support": { - "source": "https://github.com/silexphp/Pimple/tree/v3.6.2" - }, - "time": "2026-02-26T08:23:44+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.47", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", - "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command-line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.47" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-11-06T11:30:55+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918", - "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "2.5-dev" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:11:13+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.37.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "141046a8f9477948ff284fa65be2095baafb94f2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", - "reference": "141046a8f9477948ff284fa65be2095baafb94f2", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2026-04-10T16:19:22+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.38.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "e9247d281d694a5120554d9afaf54e070e88a603" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e9247d281d694a5120554d9afaf54e070e88a603", - "reference": "e9247d281d694a5120554d9afaf54e070e88a603", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.38.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", + "url": "https://github.com/sponsors/antonmedv", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2026-05-26T05:58:03+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.38.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b", - "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2026-05-25T13:48:31+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.38.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/14c5439eec4ccff081ac14eca2dc57feb2a66d92", - "reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "php": ">=7.2" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2026-05-26T12:51:13+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.37.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.37.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.37.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", - "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2026-04-10T16:19:22+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.51", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "467bfc56f18f5ef6d5ccb09324d7e988c1c0a98f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/467bfc56f18f5ef6d5ccb09324d7e988c1c0a98f", - "reference": "467bfc56f18f5ef6d5ccb09324d7e988c1c0a98f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.51" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2026-01-26T15:53:37+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v1.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", - "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "suggest": { - "psr/container": "", - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.1.2" - }, - "time": "2019-05-28T07:50:59+00:00" - }, - { - "name": "symfony/string", - "version": "v5.4.47", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.4.47" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-11-10T20:33:58+00:00" - }, - { - "name": "symfony/yaml", - "version": "v5.4.53", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ae0bbb46f77ff56591d0a0259c7f458f4b3e1f77" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ae0bbb46f77ff56591d0a0259c7f458f4b3e1f77", - "reference": "ae0bbb46f77ff56591d0a0259c7f458f4b3e1f77", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.53" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2026-05-20T17:13:41+00:00" + "time": "2025-02-19T16:45:27+00:00" } ], "packages-dev": [], @@ -1262,7 +70,7 @@ "platform": {}, "platform-dev": {}, "platform-overrides": { - "php": "7.4.33" + "php": "8.4.0" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/deploy.php b/deploy.php index 7a838ec..21effcd 100644 --- a/deploy.php +++ b/deploy.php @@ -5,13 +5,31 @@ // adds common necessities for the deployment. require 'recipe/common.php'; -set( 'ssh_type', 'native' ); set( 'ssh_multiplexing', true ); +// Deployer 7 raised the default from 5 to 10; keep the v6-era behavior so +// server disk usage doesn't double for existing sites. +set( 'keep_releases', 5 ); + +// Deployer 7 numbers releases from .dep/latest_release. Two states break a +// naive read of that file: Deployer 6 never wrote it (existing v6 sites have +// numbered release dirs but no counter), and a deploy that dies after mkdir +// releases/N but before persisting the counter leaves it stale at N-1. Both +// would collide on the next deploy with "Release name already exists", so +// reconcile the counter against the highest numbered directory in releases/ +// and take whichever is greater. +set( 'release_name', function () { + return within( '{{deploy_path}}', function () { + $counter = test( '[ -f .dep/latest_release ]' ) ? intval( run( 'cat .dep/latest_release' ) ) : 0; + $highest = intval( run( "ls -1 releases 2>/dev/null | grep -E '^[0-9]+$' | sort -n | tail -n 1 || echo 0" ) ); + return strval( max( $counter, $highest ) + 1 ); + } ); +} ); +set( 'ssh_arguments', [ '-o UserKnownHostsFile=/dev/null', '-o StrictHostKeyChecking=no' ] ); -if ( file_exists( 'vendor/deployer/recipes/recipe/rsync.php' ) ) { - require 'vendor/deployer/recipes/recipe/rsync.php'; +if ( file_exists( 'vendor/deployer/deployer/contrib/rsync.php' ) ) { + require 'vendor/deployer/deployer/contrib/rsync.php'; } else { - require getenv( 'COMPOSER_HOME' ) . '/vendor/deployer/recipes/recipe/rsync.php'; + require getenv( 'COMPOSER_HOME' ) . '/vendor/deployer/deployer/contrib/rsync.php'; } set( 'shared_dirs', [ 'wp-content/uploads' ] ); @@ -19,18 +37,7 @@ 'wp-content', 'wp-content/uploads', ] ); -inventory( '/hosts.yml' ); - -$deployer = Deployer::get(); -$hosts = $deployer->hosts; - -foreach ( $hosts as $host ) { - $host - ->addSshOption( 'UserKnownHostsFile', '/dev/null' ) - ->addSshOption( 'StrictHostKeyChecking', 'no' ); - - $deployer->hosts->set( $host->getHostname(), $host ); -} +import( '/hosts.yml' ); // Add tests and other directory unnecessary things for // production to exclude block. @@ -111,6 +118,7 @@ echo 'Not using EasyEngine.'; } + $output = ''; if ( false !== strpos( $ee_version, 'EasyEngine v3' ) ) { $output = run( 'php {{release_path}}/cachetool.phar opcache:reset --fcgi=127.0.0.1:9070' ); @@ -138,6 +146,7 @@ echo 'Not using EasyEngine.'; } + $output = ''; if ( false !== strpos( $ee_version, 'EasyEngine v3' ) ) { $output = run( 'cd {{release_path}} && wp core update-db' ); @@ -183,7 +192,12 @@ after( 'deploy:shared', 'llms:link' ); $wp_tasks = [ - 'deploy:prepare', + // Deployer 7's deploy:prepare is a group task that runs deploy:update_code + // (fails without a 'repository' config — this action deploys via rsync) + // and duplicates lock/release/shared, so its sub-tasks are listed + // explicitly instead. + 'deploy:info', + 'deploy:setup', 'deploy:unlock', 'deploy:lock', 'deploy:release', @@ -196,11 +210,12 @@ 'opcache:reset', 'core_db:update', 'deploy:unlock', - 'cleanup', + 'deploy:cleanup', ]; $non_wp_tasks = [ - 'deploy:prepare', + 'deploy:info', + 'deploy:setup', 'deploy:unlock', 'deploy:lock', 'deploy:release', @@ -208,7 +223,7 @@ 'deploy:shared', 'deploy:symlink', 'deploy:unlock', - 'cleanup', + 'deploy:cleanup', ]; if ( 'true' === getenv( 'SKIP_WP_TASKS' ) ) { @@ -225,4 +240,4 @@ /* deployment task */ desc( 'Deploy the project' ); task( 'deploy', $tasks ); -after( 'deploy', 'success' ); +after( 'deploy', 'deploy:success' ); diff --git a/main.sh b/main.sh index 7fcb471..ff59fe2 100755 --- a/main.sh +++ b/main.sh @@ -39,8 +39,31 @@ function init_checks() { function setup_hosts_file() { - # Setup hosts file - rsync -av "$hosts_file" /hosts.yml + # Deployer 7's import() validates hosts.yml against a strict schema: + # hosts must live under a top-level 'hosts:' key and the SSH user key is + # 'remote_user' (Deployer 6's inventory() accepted flat branch keys and + # 'user'). Consumer repos keep the v6-era flat format; transform it here + # so nothing downstream has to change. A file that already has a + # top-level 'hosts:' key is re-serialized unchanged (only the flat + # format is rewritten; comments and key order are not preserved). + python3 - "$hosts_file" >/hosts.yml <<-'PYEOF' + import sys, yaml + + with open(sys.argv[1]) as f: + data = yaml.safe_load(f) or {} + + if 'hosts' not in data: + hosts = {} + for alias, cfg in data.items(): + cfg = dict(cfg or {}) + if 'user' in cfg: + cfg['remote_user'] = cfg.pop('user') + hosts[alias] = cfg + data = {'hosts': hosts} + + yaml.safe_dump(data, sys.stdout, default_flow_style=False) + PYEOF + cat /hosts.yml }