diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index bc2800951..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: antonmedv diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 534a8a3bd..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve. -title: '' -labels: '' -assignees: '' ---- -- Deployer version: -- Deployment OS: - - Please, provide a minimal reproducible example of deploy.php diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index e4626d2ba..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Ask question - url: https://github.com/deployphp/deployer/discussions/category_choices - about: Please ask questions in discussions. - - name: 💰 Paid Support - url: https://github.com/deployphp/deployer/discussions/3031 - about: We can offer a paid support for Deployer. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 3e9561cf8..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project. -title: '' -labels: '' -assignees: '' ---- diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 3f7bff1e8..000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -- [ ] Bug fix #…? -- [ ] New feature? -- [ ] BC breaks? -- [ ] Tests added? -- [ ] Docs added? - - Please, regenerate docs by running next command: - $ php bin/docgen diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index 0dd9b0c4e..000000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: check - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - phpstan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress - - - name: Run test suite - run: composer phpstan - - phpcs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress - - - name: Run test suite - run: composer phpcs diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 4dd06de77..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: doc - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - docgen: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress - - - name: Run docgen - run: php bin/docgen - - - name: Check for uncommitted changes - run: | - status=$(git status --porcelain docs/); - [ -z "$status" ] || { - echo "Please, run bin/docgen and commit next files:"; - echo $status; - exit 1; - } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 7b62b4d6e..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: release - -on: - release: - types: - - created - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Get version - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV - - - name: Build phar - run: php -d phar.readonly=0 bin/build -v"$RELEASE_VERSION" - - - name: Verify version - run: php deployer.phar -V - - - name: Upload phar - run: gh release upload v"$RELEASE_VERSION" deployer.phar - env: - GITHUB_TOKEN: ${{ secrets.MY_TOKEN }} - - - name: Calculate sha1 - run: echo "SHA1=$(sha1sum deployer.phar | awk '{print $1;}')" >> $GITHUB_ENV - - - name: Update manifest - uses: deployphp/action@v1 - with: - private-key: ${{ secrets.PRIVATE_KEY }} - deployer-binary: bin/dep - dep: -f deploy.yaml release -o sha1=${{ env.SHA1 }} -o version=${{ env.RELEASE_VERSION }} - - - name: Add deployer.phar - shell: bash - run: | - set -x - git checkout -b dist - mv deployer.phar dep - chmod +x dep - git add -f dep - - - name: Remove obsolete files & dirs - shell: bash - run: | - set -x - git rm -r .github/ bin/ docs/ tests/ *.lock *.yaml *.xml *.neon - - - name: Update composer.json - shell: bash - run: | - set -x - cat composer.json | jq 'del(.autoload) | del(.scripts) | del(.require) | del(."require-dev") | setpath(["bin"]; "dep")' > composer-new.json - mv composer-new.json composer.json - git add composer.json - - - name: Push release tag - shell: bash - run: | - set -x - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions" - git commit -m "Deployer $RELEASE_VERSION" - git tag "v$RELEASE_VERSION" --force - git push origin "v$RELEASE_VERSION" --force diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml deleted file mode 100644 index 9da229034..000000000 --- a/.github/workflows/sync.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: sync - -on: - push: - branches: [ master ] - -jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress - - - name: Run docgen - run: php bin/docgen - - - name: Add & Commit - uses: EndBug/add-and-commit@v7 - with: - add: 'docs' - message: '[automatic] Update docs with bin/docgen' - - - name: Deploy docs - run: gh --repo "$REPO" workflow run deploy-docs - env: - GITHUB_TOKEN: ${{ secrets.MY_TOKEN }} - REPO: ${{ secrets.DOCS_REPO }} - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index e7398c110..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: test - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - unit: - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: [ '7.3', '7.4', '8.0', '8.1', '8.2' ] - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, intl - coverage: xdebug - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress - - - name: Run test suite - run: composer test - - e2e: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: satackey/action-docker-layer-caching@v0.0.8 - continue-on-error: true - - - name: Build the docker-compose stack - run: cd tests/docker && docker-compose build - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress - - - name: Run E2E test suite - run: cd tests/docker && docker-compose up --abort-on-container-exit diff --git a/bin/build b/bin/build deleted file mode 100755 index 1f34e3c81..000000000 --- a/bin/build +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (ini_get('phar.readonly') === '1') { - throw new \Exception('Writing to phar files is disabled. Change your `php.ini` or append `-d phar.readonly=false` to the shebang, if supported by your `env` executable.'); -} - -define('__ROOT__', realpath(__DIR__ . '/..')); -chdir(__ROOT__); - -$opt = getopt('v:', ['nozip']); - -$version = $opt['v'] ?? null; -if (empty($version)) { - echo "Please, specify version as \"-v7.0.0-beta.42\".\n"; - exit(1); -} -if (!preg_match('/^\d+\.\d+\.\d+(\-\w+(\.\d+)?)?$/', $version)) { - echo "Version must be \"7.0.0-beta.42\". Got \"$version\".\n"; - exit(1); -} - -`composer install --no-dev --prefer-dist --optimize-autoloader`; - -$pharName = "deployer.phar"; -$pharFile = __ROOT__ . '/' . $pharName; -if (file_exists($pharFile)) { - unlink($pharFile); -} - -$ignore = [ - '.anton', - '.git', - 'Tests', - 'tests', - 'deploy.php', -]; - -$phar = new \Phar($pharFile, 0, $pharName); -$phar->setSignatureAlgorithm(\Phar::SHA1); -$phar->startBuffering(); -$iterator = new RecursiveDirectoryIterator(__ROOT__, FilesystemIterator::SKIP_DOTS); -$iterator = new RecursiveCallbackFilterIterator($iterator, function (SplFileInfo $fileInfo) use ($ignore) { - return !in_array($fileInfo->getBasename(), $ignore, true); -}); -$iterator = new RecursiveIteratorIterator($iterator); -$iterator = new CallbackFilterIterator($iterator, function (SplFileInfo $fileInfo) { - return in_array($fileInfo->getExtension(), ['php', 'exe'], true); -}); - -foreach ($iterator as $fileInfo) { - $file = str_replace(__ROOT__, '', $fileInfo->getRealPath()); - echo "Add file: " . $file . "\n"; - $phar->addFile($fileInfo->getRealPath(), $file); - - if (!array_key_exists('nozip', $opt)) { - $phar[$file]->compress(Phar::GZ); - - if (!$phar[$file]->isCompressed()) { - echo "Could not compress File: $file\n"; - } - } -} - -// Add schema.json -echo "Add file: /src/schema.json\n"; -$phar->addFile(realpath(__DIR__ . '/../src/schema.json'), '/src/schema.json'); - -// Add bin/dep file -echo "Add file: /bin/dep\n"; -$depContent = file_get_contents(__ROOT__ . '/bin/dep'); -$depContent = str_replace("#!/usr/bin/env php\n", '', $depContent); -$depContent = str_replace('__FILE__', 'str_replace("phar://", "", Phar::running())', $depContent); -$depContent = preg_replace("/run\('.+?'/", "run('$version'", $depContent); -$phar->addFromString('bin/dep', $depContent); -$phar->setStub(<<stopBuffering(); -unset($phar); - -echo "$pharName was created successfully.\n"; diff --git a/bin/dep b/bin/dep deleted file mode 100755 index 2bfa43b83..000000000 --- a/bin/dep +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -// Detect deploy.php location -$deployFile = null; -foreach ($argv as $i => $arg) { - if (preg_match('/^(-f|--file)$/', $arg, $match) && $i + 1 < count($argv)) { - $deployFile = $argv[$i + 1]; - break; - } - if (preg_match('/^--file=(?.+)$/', $arg, $match)) { - $deployFile = $match['file']; - break; - } - if (preg_match('/^-f=?(?.+)$/', $arg, $match)) { - $deployFile = $match['file']; - break; - } -} -if (!empty($deployFile)) { - $deployFile = realpath($deployFile); -} -$lookUp = function (string $name): ?string { - $dir = getcwd(); - for ($i = 0; $i < 10; $i++) { - $path = "$dir/$name"; - if (is_readable($path)) { - return $path; - } - $dir = dirname($dir); - } - return ''; -}; -if (empty($deployFile)) { - $deployFile = $lookUp('deploy.php'); -} -if (empty($deployFile)) { - $deployFile = $lookUp('deploy.yaml'); -} -if (empty($deployFile)) { - $deployFile = $lookUp('deploy.yml'); -} - -// Detect autoload location -$autoload = [ - __DIR__ . '/../vendor/autoload.php', // The dep located at "deployer.phar/bin" or in development. - __DIR__ . '/../../../autoload.php', // The dep located at "vendor/deployer/deployer/bin". - __DIR__ . '/../autoload.php', // The dep located at "vendor/bin". -]; -$includes = [ - __DIR__ . '/..', - __DIR__ . '/../../../deployer/deployer', - __DIR__ . '/../deployer/deployer', -]; -$includePath = false; -for ($i = 0; $i < count($autoload); $i++) { - if (file_exists($autoload[$i]) && is_dir($includes[$i])) { - require $autoload[$i]; - $includePath = $includes[$i]; - break; - } -} -if (empty($includePath)) { - fwrite(STDERR, "Error: The `autoload.php` file not found in:\n"); - for ($i = 0; $i < count($autoload); $i++) { - $a = file_exists($autoload[$i]) ? 'true' : 'false'; - $b = is_dir($includes[$i]) ? 'true' : 'false'; - fwrite(STDERR, " - file_exists($autoload[$i]) = $a\n"); - fwrite(STDERR, " is_dir($includes[$i]) = $b\n"); - } - exit(1); -} - -// Errors to exception -set_error_handler(function ($severity, $message, $filename, $lineno) { - if (error_reporting() == 0) { - return; - } - if (error_reporting() & $severity) { - throw new ErrorException($message, 0, $severity, $filename, $lineno); - } -}); - -// Enable recipe loading -set_include_path($includePath . PATH_SEPARATOR . get_include_path()); - -// Deployer constants -define('DEPLOYER', true); -define('DEPLOYER_BIN', __FILE__); -define('DEPLOYER_DEPLOY_FILE', $deployFile); - -Deployer\Deployer::run('master', $deployFile); diff --git a/bin/docgen b/bin/docgen deleted file mode 100755 index 645358e04..000000000 --- a/bin/docgen +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Deployer\Documentation\ApiGen; -use Deployer\Documentation\DocGen; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Output\ConsoleOutput; - -require __DIR__ . '/../vendor/autoload.php'; - -chdir(realpath(__DIR__ . '/..')); - -$input = new ArgvInput(); -$output = new ConsoleOutput(); -$app = new Application('DocGen', '1.0.0'); -$app->setDefaultCommand('all'); - -$api = function () use ($output) { - $parser = new ApiGen(); - $parser->parse(file_get_contents(__DIR__ . '/../src/functions.php')); - $md = $parser->markdown(); - file_put_contents(__DIR__ . '/../docs/api.md', $md); - $output->writeln('API Reference documentation updated.'); -}; - -$recipes = function () use ($input, $output) { - $docgen = new DocGen(__DIR__ . '/..'); - $docgen->parse(__DIR__ . '/../recipe'); - $docgen->parse(__DIR__ . '/../contrib'); - - if ($input->getOption('json')) { - echo json_encode($docgen->recipes, JSON_PRETTY_PRINT); - return; - } - - $docgen->gen(__DIR__ . '/../docs'); - $output->writeln('Recipes documentation updated.'); -}; - -$app->register('api')->setCode($api); -$app->register('recipes')->setCode($recipes)->addOption('json'); -$app->register('all')->setCode(function () use ($recipes, $api) { - $api(); - $recipes(); - echo `git status`; -})->addOption('json'); - -$app->run($input, $output); diff --git a/composer.json b/composer.json index 7adf3f22b..5bd9de8e0 100644 --- a/composer.json +++ b/composer.json @@ -1,70 +1,32 @@ { - "name": "deployer/deployer", - "description": "Deployment Tool", - "license": "MIT", - "homepage": "https://deployer.org", - "support": { - "docs": "https://deployer.org/docs", - "source": "https://github.com/deployphp/deployer", - "issues": "https://github.com/deployphp/deployer/issues" - }, - "authors": [ - { - "name": "Anton Medvedev", - "email": "anton@medv.io" - } - ], - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/antonmedv" - } - ], - "autoload": { - "psr-4": { - "Deployer\\": "src/" - }, - "files": [ - "src/Support/helpers.php", - "src/functions.php" - ] - }, - "scripts": { - "test": "pest", - "test:e2e": "pest --config tests/e2e/phpunit-e2e.xml", - "phpcs": "phpcs", - "fix": "phpcbf", - "phpstan": "phpstan analyse -c phpstan.neon", - "phpstan:baseline": "@phpstan --generate-baseline tests/phpstan-baseline.neon" - }, - "bin": [ - "bin/dep" - ], - "require": { - "php": "^8.0|^7.3", - "ext-json": "*", - "justinrainbow/json-schema": "^5.2", - "psr/http-message": "^1", - "react/http": "^1.5", - "symfony/console": "^5.4.9", - "symfony/polyfill-php80": "^1.22", - "symfony/process": "^5", - "symfony/yaml": "^5" - }, - "require-dev": { - "pestphp/pest": "^1.0", - "phpstan/phpstan": "^1.4", - "phpunit/php-code-coverage": "^9.2", - "phpunit/phpunit": "^9.3", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "config": { - "sort-packages": true, - "process-timeout": 0, - "allow-plugins": { - "pestphp/pest-plugin": true, - "dealerdirect/phpcodesniffer-composer-installer": true - } + "name": "deployer/deployer", + "description": "Deployment Tool", + "license": "MIT", + "homepage": "https://deployer.org", + "support": { + "docs": "https://deployer.org/docs", + "source": "https://github.com/deployphp/deployer", + "issues": "https://github.com/deployphp/deployer/issues" + }, + "authors": [ + { + "name": "Anton Medvedev", + "email": "anton@medv.io" } + ], + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/antonmedv" + } + ], + "bin": "dep", + "config": { + "sort-packages": true, + "process-timeout": 0, + "allow-plugins": { + "pestphp/pest-plugin": true, + "dealerdirect/phpcodesniffer-composer-installer": true + } + } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index db6d70ce2..000000000 --- a/composer.lock +++ /dev/null @@ -1,4819 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "443f126c4b688aa349d3607009d03a20", - "packages": [ - { - "name": "evenement/evenement", - "version": "v3.0.1", - "source": { - "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Evenement": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - } - ], - "description": "Événement is a very simple event dispatching library for PHP", - "keywords": [ - "event-dispatcher", - "event-emitter" - ], - "support": { - "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/master" - }, - "time": "2017-07-23T21:35:13+00:00" - }, - { - "name": "fig/http-message-util", - "version": "1.1.5", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message-util.git", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "suggest": { - "psr/http-message": "The package containing the PSR-7 interfaces" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Fig\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "issues": "https://github.com/php-fig/http-message-util/issues", - "source": "https://github.com/php-fig/http-message-util/tree/1.1.5" - }, - "time": "2020-11-24T22:02:12+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.11", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" - }, - "time": "2021-07-22T09:24:00+00:00" - }, - { - "name": "psr/container", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "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/1.1.1" - }, - "time": "2021-03-05T17:36:06+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "react/cache", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/reactphp/cache.git", - "reference": "4bf736a2cccec7298bdf745db77585966fc2ca7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/cache/zipball/4bf736a2cccec7298bdf745db77585966fc2ca7e", - "reference": "4bf736a2cccec7298bdf745db77585966fc2ca7e", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "react/promise": "^3.0 || ^2.0 || ^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async, Promise-based cache interface for ReactPHP", - "keywords": [ - "cache", - "caching", - "promise", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/cache/issues", - "source": "https://github.com/reactphp/cache/tree/v1.1.1" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2021-02-02T06:47:52+00:00" - }, - { - "name": "react/dns", - "version": "v1.9.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/dns.git", - "reference": "6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb", - "reference": "6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "react/cache": "^1.0 || ^0.6 || ^0.5", - "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.7 || ^1.2.1", - "react/promise-timer": "^1.8" - }, - "require-dev": { - "clue/block-react": "^1.2", - "phpunit/phpunit": "^9.3 || ^4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Dns\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async DNS resolver for ReactPHP", - "keywords": [ - "async", - "dns", - "dns-resolver", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.9.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2021-12-20T08:46:54+00:00" - }, - { - "name": "react/event-loop", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/event-loop.git", - "reference": "be6dee480fc4692cec0504e65eb486e3be1aa6f2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/be6dee480fc4692cec0504e65eb486e3be1aa6f2", - "reference": "be6dee480fc4692cec0504e65eb486e3be1aa6f2", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "suggest": { - "ext-event": "~1.0 for ExtEventLoop", - "ext-pcntl": "For signal handling support when using the StreamSelectLoop", - "ext-uv": "* for ExtUvLoop" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\EventLoop\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", - "keywords": [ - "asynchronous", - "event-loop" - ], - "support": { - "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.2.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2021-07-11T12:31:24+00:00" - }, - { - "name": "react/http", - "version": "v1.6.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/http.git", - "reference": "59961cc4a5b14481728f07c591546be18fa3a5c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/http/zipball/59961cc4a5b14481728f07c591546be18fa3a5c7", - "reference": "59961cc4a5b14481728f07c591546be18fa3a5c7", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "fig/http-message-util": "^1.1", - "php": ">=5.3.0", - "psr/http-message": "^1.0", - "react/event-loop": "^1.2", - "react/promise": "^2.3 || ^1.2.1", - "react/promise-stream": "^1.1", - "react/socket": "^1.9", - "react/stream": "^1.2", - "ringcentral/psr7": "^1.2" - }, - "require-dev": { - "clue/block-react": "^1.5", - "clue/http-proxy-react": "^1.7", - "clue/reactphp-ssh-proxy": "^1.3", - "clue/socks-react": "^1.3", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Http\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Event-driven, streaming HTTP client and server implementation for ReactPHP", - "keywords": [ - "async", - "client", - "event-driven", - "http", - "http client", - "http server", - "https", - "psr-7", - "reactphp", - "server", - "streaming" - ], - "support": { - "issues": "https://github.com/reactphp/http/issues", - "source": "https://github.com/reactphp/http/tree/v1.6.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-02-03T13:17:37+00:00" - }, - { - "name": "react/promise", - "version": "v2.9.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.9.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-02-11T10:27:51+00:00" - }, - { - "name": "react/promise-stream", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise-stream.git", - "reference": "3ebd94fe0d8edbf44937948af28d02d5437e9949" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise-stream/zipball/3ebd94fe0d8edbf44937948af28d02d5437e9949", - "reference": "3ebd94fe0d8edbf44937948af28d02d5437e9949", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/promise": "^2.1 || ^1.2", - "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6" - }, - "require-dev": { - "clue/block-react": "^1.0", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3", - "react/promise-timer": "^1.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\Stream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "The missing link between Promise-land and Stream-land for ReactPHP", - "homepage": "https://github.com/reactphp/promise-stream", - "keywords": [ - "Buffer", - "async", - "promise", - "reactphp", - "stream", - "unwrap" - ], - "support": { - "issues": "https://github.com/reactphp/promise-stream/issues", - "source": "https://github.com/reactphp/promise-stream/tree/v1.3.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2021-10-18T10:47:09+00:00" - }, - { - "name": "react/promise-timer", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise-timer.git", - "reference": "0bbbcc79589e5bfdddba68a287f1cb805581a479" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/0bbbcc79589e5bfdddba68a287f1cb805581a479", - "reference": "0bbbcc79589e5bfdddba68a287f1cb805581a479", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.7.0 || ^1.2.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\Timer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", - "homepage": "https://github.com/reactphp/promise-timer", - "keywords": [ - "async", - "event-loop", - "promise", - "reactphp", - "timeout", - "timer" - ], - "support": { - "issues": "https://github.com/reactphp/promise-timer/issues", - "source": "https://github.com/reactphp/promise-timer/tree/v1.8.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2021-12-06T11:08:48+00:00" - }, - { - "name": "react/socket", - "version": "v1.11.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/socket.git", - "reference": "f474156aaab4f09041144fa8b57c7d70aed32a1c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/f474156aaab4f09041144fa8b57c7d70aed32a1c", - "reference": "f474156aaab4f09041144fa8b57c7d70aed32a1c", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.0", - "react/dns": "^1.8", - "react/event-loop": "^1.2", - "react/promise": "^2.6.0 || ^1.2.1", - "react/promise-timer": "^1.8", - "react/stream": "^1.2" - }, - "require-dev": { - "clue/block-react": "^1.5", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/promise-stream": "^1.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Socket\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", - "keywords": [ - "Connection", - "Socket", - "async", - "reactphp", - "stream" - ], - "support": { - "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.11.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-01-14T10:14:32+00:00" - }, - { - "name": "react/stream", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/stream.git", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.8", - "react/event-loop": "^1.2" - }, - "require-dev": { - "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Stream\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", - "keywords": [ - "event-driven", - "io", - "non-blocking", - "pipe", - "reactphp", - "readable", - "stream", - "writable" - ], - "support": { - "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.2.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2021-07-11T12:37:55+00:00" - }, - { - "name": "ringcentral/psr7", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/ringcentral/psr7.git", - "reference": "360faaec4b563958b673fb52bbe94e37f14bc686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ringcentral/psr7/zipball/360faaec4b563958b673fb52bbe94e37f14bc686", - "reference": "360faaec4b563958b673fb52bbe94e37f14bc686", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "RingCentral\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "PSR-7 message implementation", - "keywords": [ - "http", - "message", - "stream", - "uri" - ], - "support": { - "source": "https://github.com/ringcentral/psr7/tree/master" - }, - "time": "2018-05-29T20:21:04+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.17", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", - "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f", - "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.17" - }, - "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": "2022-12-28T14:15:31+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "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.0" - }, - "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": "2021-07-12T14:48:14+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/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.25.0" - }, - "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": "2021-10-20T20:35:02+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/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.25.0" - }, - "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": "2021-11-23T21:10:46+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/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.25.0" - }, - "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": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/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.25.0" - }, - "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": "2021-11-30T18:21:41+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/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.25.0" - }, - "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": "2021-06-05T21:20:04+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/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.25.0" - }, - "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": "2022-03-04T08:16:47+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "95440409896f90a5f85db07a32b517ecec17fa4c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/95440409896f90a5f85db07a32b517ecec17fa4c", - "reference": "95440409896f90a5f85db07a32b517ecec17fa4c", - "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.5" - }, - "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": "2022-01-30T18:16:22+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "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/v2.5.0" - }, - "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": "2021-11-04T16:48:04+00:00" - }, - { - "name": "symfony/string", - "version": "v5.4.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", - "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.3" - }, - "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": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/yaml", - "version": "v5.4.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2", - "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.3" - }, - "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": "2022-01-26T16:32:32+00:00" - } - ], - "packages-dev": [ - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - }, - { - "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2022-02-04T12:51:07+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "facade/ignition-contracts", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition-contracts.git", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v2.15.8", - "phpunit/phpunit": "^9.3.11", - "vimeo/psalm": "^3.17.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Facade\\IgnitionContracts\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://flareapp.io", - "role": "Developer" - } - ], - "description": "Solution contracts for Ignition", - "homepage": "https://github.com/facade/ignition-contracts", - "keywords": [ - "contracts", - "flare", - "ignition" - ], - "support": { - "issues": "https://github.com/facade/ignition-contracts/issues", - "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" - }, - "time": "2020-10-16T08:27:54+00:00" - }, - { - "name": "filp/whoops", - "version": "2.14.5", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Whoops\\": "src/Whoops/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", - "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" - ], - "support": { - "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.5" - }, - "funding": [ - { - "url": "https://github.com/denis-sokolov", - "type": "github" - } - ], - "time": "2022-01-07T12:00:00+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2022-03-03T13:19:32+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.13.2", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" - }, - "time": "2021-11-30T19:35:32+00:00" - }, - { - "name": "nunomaduro/collision", - "version": "v5.11.0", - "source": { - "type": "git", - "url": "https://github.com/nunomaduro/collision.git", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", - "shasum": "" - }, - "require": { - "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.14.3", - "php": "^7.3 || ^8.0", - "symfony/console": "^5.0" - }, - "require-dev": { - "brianium/paratest": "^6.1", - "fideloper/proxy": "^4.4.1", - "fruitcake/laravel-cors": "^2.0.3", - "laravel/framework": "8.x-dev", - "nunomaduro/larastan": "^0.6.2", - "nunomaduro/mock-final-classes": "^1.0", - "orchestra/testbench": "^6.0", - "phpstan/phpstan": "^0.12.64", - "phpunit/phpunit": "^9.5.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "NunoMaduro\\Collision\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "Cli error handling for console/command-line PHP applications.", - "keywords": [ - "artisan", - "cli", - "command-line", - "console", - "error", - "handling", - "laravel", - "laravel-zero", - "php", - "symfony" - ], - "support": { - "issues": "https://github.com/nunomaduro/collision/issues", - "source": "https://github.com/nunomaduro/collision" - }, - "funding": [ - { - "url": "https://www.paypal.com/paypalme/enunomaduro", - "type": "custom" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" - } - ], - "time": "2022-01-10T16:22:52+00:00" - }, - { - "name": "pestphp/pest", - "version": "v1.21.2", - "source": { - "type": "git", - "url": "https://github.com/pestphp/pest.git", - "reference": "63f009fadf9b37f611fda43928d03336475d5d9f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/63f009fadf9b37f611fda43928d03336475d5d9f", - "reference": "63f009fadf9b37f611fda43928d03336475d5d9f", - "shasum": "" - }, - "require": { - "nunomaduro/collision": "^5.10.0|^6.0", - "pestphp/pest-plugin": "^1.0.0", - "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^9.5.5" - }, - "require-dev": { - "illuminate/console": "^8.47.0", - "illuminate/support": "^8.47.0", - "laravel/dusk": "^6.15.0", - "pestphp/pest-dev-tools": "dev-master", - "pestphp/pest-plugin-parallel": "^1.0" - }, - "bin": [ - "bin/pest" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "pest": { - "plugins": [ - "Pest\\Plugins\\Coverage", - "Pest\\Plugins\\Init", - "Pest\\Plugins\\Version", - "Pest\\Plugins\\Environment" - ] - }, - "laravel": { - "providers": [ - "Pest\\Laravel\\PestServiceProvider" - ] - } - }, - "autoload": { - "files": [ - "src/Functions.php", - "src/Pest.php" - ], - "psr-4": { - "Pest\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "An elegant PHP Testing Framework.", - "keywords": [ - "framework", - "pest", - "php", - "test", - "testing", - "unit" - ], - "support": { - "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v1.21.2" - }, - "funding": [ - { - "url": "https://www.paypal.com/paypalme/enunomaduro", - "type": "custom" - }, - { - "url": "https://github.com/lukeraymonddowning", - "type": "github" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://github.com/octoper", - "type": "github" - }, - { - "url": "https://github.com/olivernybroe", - "type": "github" - }, - { - "url": "https://github.com/owenvoke", - "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" - } - ], - "time": "2022-03-05T19:34:40+00:00" - }, - { - "name": "pestphp/pest-plugin", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/pestphp/pest-plugin.git", - "reference": "fc8519de148699fe612d9c669be60554cd2db4fa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin/zipball/fc8519de148699fe612d9c669be60554cd2db4fa", - "reference": "fc8519de148699fe612d9c669be60554cd2db4fa", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1 || ^2.0", - "php": "^7.3 || ^8.0" - }, - "conflict": { - "pestphp/pest": "<1.0" - }, - "require-dev": { - "composer/composer": "^1.10.19", - "pestphp/pest": "^1.0", - "pestphp/pest-dev-tools": "dev-master" - }, - "type": "composer-plugin", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, - "class": "Pest\\Plugin\\Manager" - }, - "autoload": { - "psr-4": { - "Pest\\Plugin\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "The Pest plugin manager", - "keywords": [ - "framework", - "manager", - "pest", - "php", - "plugin", - "test", - "testing", - "unit" - ], - "support": { - "source": "https://github.com/pestphp/pest-plugin/tree/v1.0.0" - }, - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", - "type": "custom" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" - } - ], - "time": "2021-01-03T15:53:42+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.16.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" - }, - "time": "2022-11-29T15:06:56+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "4cb3021a4e10ffe3d5f94a4c34cf4b3f6de2fa3d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/4cb3021a4e10ffe3d5f94a4c34cf4b3f6de2fa3d", - "reference": "4cb3021a4e10ffe3d5f94a4c34cf4b3f6de2fa3d", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.4.2" - }, - "time": "2022-03-30T13:33:37+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "1.4.10", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "898c479c39caa727bedf4311dd294a8f4e250e72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/898c479c39caa727bedf4311dd294a8f4e250e72", - "reference": "898c479c39caa727bedf4311dd294a8f4e250e72", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "support": { - "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.4.10" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" - } - ], - "time": "2022-03-14T10:25:45+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.15", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-07T09:28:20+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.20", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-04-01T12:37:26+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:52:38+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-11-11T14:18:36+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-03-15T09:54:48+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "7.1", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/b521bd358b5f7a7d69e9637fd139e036d8adeb6f", - "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.4.1", - "squizlabs/php_codesniffer": "^3.6.2" - }, - "require-dev": { - "phing/phing": "2.17.2", - "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.10|1.5.2", - "phpstan/phpstan-deprecation-rules": "1.0.0", - "phpstan/phpstan-phpunit": "1.0.0|1.1.0", - "phpstan/phpstan-strict-rules": "1.1.0", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.19" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.1" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2022-03-29T12:44:16+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.6.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2021-12-12T21:44:58+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^8.0|^7.3", - "ext-json": "*" - }, - "platform-dev": [], - "plugin-api-version": "2.3.0" -} diff --git a/dep b/dep new file mode 100755 index 000000000..284a6e06f Binary files /dev/null and b/dep differ diff --git a/deploy.yaml b/deploy.yaml deleted file mode 100644 index 9caf8fc71..000000000 --- a/deploy.yaml +++ /dev/null @@ -1,22 +0,0 @@ -import: - - src/Support/update_manifest.php - -hosts: - deployer.org: - remote_user: anton - -config: - banner: | - ╭──────────────────────────────────────────────────────╮ - │ │ - │ Update available! Mode info ï.at/update │ - │ │ - ╰──────────────────────────────────────────────────────╯ - -tasks: - release: - - update_manifest - - create_banner: - - desc: Create an update banner - - run: echo $'{{banner}}' > {{site}}/check-updates/{{old_version}} diff --git a/docs/KNOWN_BUGS.md b/docs/KNOWN_BUGS.md deleted file mode 100644 index cfc244925..000000000 --- a/docs/KNOWN_BUGS.md +++ /dev/null @@ -1,59 +0,0 @@ -# Known Bugs - -## Ubuntu 14.04, Coreutils 8.21 - -There are known bug with relative symlinks `ln --relative`, which may fail rollback command. - -Add next line to _deploy.php_ file: - -```php -set('use_relative_symlink', false); -``` - -## OpenSSH_7.2p2 - -ControlPersist causes stderr to be left open until the master connection times out. - -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714526 -- https://bugzilla.mindrot.org/show_bug.cgi?id=1988 - -## cURL 7.29.0 - -Certificate verification fails with multiple https urls. - -- https://bugzilla.redhat.com/show_bug.cgi?id=1241172 - -## Rsync (3.1.3) - -Artifact upload with `rsync` is interrupted after the first chunk of data upload. - -``` -The command "rsync -azP -e 'ssh -A -p *** -o UserKnownHostsFile=/dev/null - -o StrictHostKeyChecking=no' 'artifacts/artifact.tar.gz' 'deploy@ssh.XXX.io:/srv/releases/2009076181'" failed. - -Exit Code: 255(Unknown error) - -Output: -================ -sending incremental file list -artifact.tar.gz - 32,768 0% 0.00kB/s 0:00:00 - -Error Output: -================ -client_loop: send disconnect: Broken pipe - -rsync: [sender] write error: Broken pipe (32) -``` - -In order to resolve (workaround) the issue, you need to add `--bwlimit=4096` to the list of options. - -Example: - -```php -task('artifact:upload', function () { - upload(get('artifact_path'), '{{release_path}}', ['options' => ['--bwlimit=4096']]); -}); -``` - -The issue was also described in the [Github Action](https://github.com/deployphp/action/issues/35). diff --git a/docs/UPGRADE.md b/docs/UPGRADE.md deleted file mode 100644 index 389d68358..000000000 --- a/docs/UPGRADE.md +++ /dev/null @@ -1,255 +0,0 @@ -# Upgrade a major version - -## Upgrade from 6.x to 7.x - -### Step 1: Update deploy.php - -1. Change config `hostname` to `alias`. -2. Change config `real_hostname` to `hostname`. -3. Change config `user` to `remote_user`. -4. Update `host()` definitions: - 1. Add `set` prefix to all setters: `identityFile` -> `setIdentityFile` or `set('identity_file')` - 2. Update `host(...)->addSshOption('UserKnownHostsFile', '/dev/null')` to `host(...)->setSshArguments(['-o UserKnownHostsFile=/dev/null']);` - 3. Replace _stage_ with labels, i.e. - ```php - host('deployer.org') - ->set('labels', ['stage' => 'prod']); - ``` - When deploying instead of `dep deploy prod` use `dep deploy stage=prod`. - 4. `alias()` is deleted, `host()` itself sets alias and hostname, to override hostname use `setHostname()`. -5. Update `task()` definitions. - 1. Replace `onRoles()` with `select()`: - ```php - task(...) - ->select('stage=prod'); - ``` -6. Third party recipes now live inside main Deployer repo in _contrib_: - ```php - require 'contrib/rsync.php'; - ``` -7. Replace `inventory()` with `import()`. It now can import hosts, configs, tasks: - - ```yaml - import: recipe/common.php - - config: - application: deployer - shared_dirs: - - uploads - - storage/logs/ - - storage/db - shared_files: - - .env - - config/test.yaml - keep_releases: 3 - http_user: false - - hosts: - prod: - local: true - - tasks: - deploy: - - deploy:prepare - - deploy:vendors - - deploy:publish - - deploy:vendors: - - run: "cd {{release_path}} && echo {{bin/composer}} {{composer_options}} 2>&1" - ``` - -8. Rename task `success` to `deploy:success` and `cleanup` to `deploy:cleanup`. -9. Verbosity functions (`isDebug()`, etc) got deleted. Use `output()->isDebug()` instead. -10. `runLocally()` commands are executed relative to the recipe file directory. This behaviour can be overridden via an environment variable: - ``` - DEPLOYER_ROOT=. vendor/bin/dep taskname` - ``` -11. Replace `local()` tasks with combination of `once()` and `runLocally()` func. -12. Replace `locateBinaryPath()` with `which()` func. -13. Configuration property `default_stage` is not supported. -14. Replace `onHosts()` and `onStage()` with [labels & selectors](selector.md). -15. Replace `setPrivate()` with [`hidden()`](tasks.md#hidden). - -### Step 2: Deploy - -Since the release history numbering is not compatible between v6 and v7, you need to specify the `release_name` manually for the first time. Otherwise you start with release 1. - -1. Find out next release name (ssh to the host, `ls` releases dir, find the biggest number). Example: `42`. -2. Deploy with release_name: - ``` - dep deploy -o release_name=43 - ``` - -:::note -In case a rollback is needed, manually change the `current` symlink: - -``` -ln -nfs releases/42 current -``` - -::: - -:::note -In case there are multiple hosts with different release names, you should create a `{{deploy_path}}/.dep/latest_release` file in each host with the current release number of that particular host. -::: - -## Upgrade from 5.x to 6.x - -1. Changed branch option priority - - If you have host definition with `branch(...)` parameter, adding `--branch` option will not override it any more. - If no `branch(...)` parameter persists, branch will be fetched from current local git branch. - - ```php - host('prod') - ->set('branch', 'production') - ``` - - In order to return to old behavior add checking of `--branch` option. - - ```php - host('prod') - ->set('branch', function () { - return input()->getOption('branch') ?: 'production'; - }) - ``` - -2. Add `deploy:info` task to the beginning to `deploy` task. -3. `run` returns string instead of `Deployer\Type\Result` - - Now `run` and `runLocally` returns `string` instead of `Deployer\Type\Result`. - Replace method calls as: - - - `run('command')->toString()` → `run('command')` - - `run('if command; then echo "true"; fi;')->toBool()` → `test('command')` - -4. `env_vars` renamed to `env` - - - `set('env_vars', 'FOO=bar');` → `set('env', ['FOO' => 'bar']);` - - If your are using Symfony recipe, then you need to change `env` setting: - - - `set('env', 'prod');` → `set('symfony_env', 'prod');` - -## Upgrade from 4.x to 5.x - -1. Servers to Hosts - - - `server($hostname)` to `host($hostname)`, and `server($name, $hostname)` to `host($name)->hostname($hostname)` - - `localServer($name)` to `localhost()` - - `cluster($name, $nodes, $port)` to `hosts(...$hodes)` - - `serverList($file)` to `inventory($file)` - - If you need to deploy to same server use [host aliases](https://deployer.org/docs/hosts#host-aliases): - - ```php - host('domain.com/green', 'domain.com/blue') - ->set('deploy_path', '~/{{hostname}}') - ... - ``` - - Or you can define different hosts with same hostname: - - ```php - host('production') - ->hostname('domain.com') - ->set('deploy_path', '~/production') - ... - - host('beta') - ->hostname('domain.com') - ->set('deploy_path', '~/beta') - ... - ``` - -2. Configuration options - - - Rename `{{server.name}}` to `{{hostname}}` - -3. DotArray syntax - - In v5 access to nested arrays in config via dot notation was removed. - If you was using it, consider to move to plain config options. - - Refactor this: - - ```php - set('a', ['b' => 1]); - - // ... - - get('a.b'); - ``` - - To: - - ```php - set('a_b', 1); - - // ... - - get('a_b'); - ``` - -4. Credentials - - Best practice in new v5 is to omit credentials for connection in `deploy.php` and write them in `~/.ssh/config` instead. - - - `identityFile($publicKeyFile,, $privateKeyFile, $passPhrase)` to `identityFile($privateKeyFile)` - - `pemFile($pemFile)` to `identityFile($pemFile)` - - `forwardAgent()` to `forwardAgent(true)` - -5. Tasks constraints - - - `onlyOn` to `onHosts` - - `onlyOnStage` to `onStage` - -## Upgrade from 3.x to 4.x - -1. Namespace for functions - - Add to beginning of _deploy.php_ next line: - - ```php - use function Deployer\{server, task, run, set, get, add, before, after}; - ``` - - If you are using PHP version less than 5.6, you can use this: - - ```php - namespace Deployer; - ``` - -2. `env()` to `set()`/`get()` - - Rename all calls `env($name, $value)` to `set($name, $value)`. - - Rename all rvalue `env($name)` to `get($name)`. - - Rename all `server(...)->env(...)` to `server(...)->set(...)`. - -3. Moved _NonFatalException_ - - Rename `Deployer\Task\NonFatalException` to `Deployer\Exception\NonFatalException`. - -4. Prior release cleanup - - Due to changes in release management, the new cleanup task will ignore any prior releases deployed with 3.x. These will need to be manually removed after migrating to and successfully releasing via 4.x. - -## Upgrade from 2.x to 3.x - -1. ### `->path('...')` - - Replace your server paths configuration: - - ```php - server(...) - ->path(...); - ``` - - to: - - ```php - server(...) - ->env('deploy_path', '...'); - ``` diff --git a/docs/api.md b/docs/api.md deleted file mode 100644 index e93a1aee5..000000000 --- a/docs/api.md +++ /dev/null @@ -1,565 +0,0 @@ - - - - -# API Reference - -## host() - -```php -host(string ...$hostname) -``` - -Defines a host or hosts. -```php -host('example.org'); -host('prod.example.org', 'staging.example.org'); -``` - -Inside task can be used to get `Host` instance of an alias. -```php -task('test', function () { - $port = host('example.org')->get('port'); -}); -``` - - - -## localhost() - -```php -localhost(string ...$hostnames) -``` - - - -## currentHost() - -```php -currentHost(): Host -``` - -Returns current host. - - -## select() - -```php -select(string $selector): array -``` - -Returns hosts based on provided selector. - -```php -on(select('stage=prod, role=db'), function (Host $host) { - ... -}); -``` - - - -## selectedHosts() - -```php -selectedHosts(): array -``` - -Returns array of hosts selected by user via CLI. - - - -## import() - -```php -import(string $file): void -``` - -Import other php or yaml recipes. - -```php -import('recipe/common.php'); -``` - -```php -import(__DIR__ . '/config/hosts.yaml'); -``` - - - -## desc() - -```php -desc(?string $title = null): ?string -``` - -Set task description. - - -## task() - -```php -task(string $name, $body = null): Task -``` - -Define a new task and save to tasks list. - -Alternatively get a defined task. - - - -| Argument | Type | Comment | -|---|---|---| -| `$name` | `string` | Name of current task. | -| `$body` | `callable():void` or `array` or `null` | Callable task, array of other tasks names or nothing to get a defined tasks | - -## before() - -```php -before(string $task, $do) -``` - -Call that task before specified task runs. - - - - -| Argument | Type | Comment | -|---|---|---| -| `$task` | `string` | The task before $that should be run. | -| `$do` | `string` or `callable():void` | The task to be run. | - -## after() - -```php -after(string $task, $do) -``` - -Call that task after specified task runs. - - - - -| Argument | Type | Comment | -|---|---|---| -| `$task` | `string` | The task after $that should be run. | -| `$do` | `string` or `callable():void` | The task to be run. | - -## fail() - -```php -fail(string $task, $do) -``` - -Setup which task run on failure of $task. -When called multiple times for a task, previous fail() definitions will be overridden. - - - - -| Argument | Type | Comment | -|---|---|---| -| `$task` | `string` | The task which need to fail so $that should be run. | -| `$do` | `string` or `callable():void` | The task to be run. | - -## option() - -```php -option(string $name, $shortcut = null, ?int $mode = null, string $description = '', $default = null): void -``` - -Add users options. - - - -| Argument | Type | Comment | -|---|---|---| -| `$name` | `string` | The option name | -| `$shortcut` | `string` or `array` or `null` | The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts | -| `$mode` | `int` or `null` | The option mode: One of the VALUE_* constants | -| `$description` | `string` | A description text | -| `$default` | `string` or `string[]` or `int` or `bool` or `null` | The default value (must be null for self::VALUE_NONE) | - -## cd() - -```php -cd(string $path): void -``` - -Change the current working directory. - - -## within() - -```php -within(string $path, callable $callback) -``` - -Execute a callback within a specific directory and revert back to the initial working directory. - - - -## run() - -```php -run(string $command, ?array $options = [], ?int $timeout = null, ?int $idle_timeout = null, ?string $secret = null, ?array $env = null, ?bool $real_time_output = false, ?bool $no_throw = false): string -``` - -Executes given command on remote host. - -Examples: - -```php -run('echo hello world'); -run('cd {{deploy_path}} && git status'); -run('password %secret%', secret: getenv('CI_SECRET')); -run('curl medv.io', timeout: 5); -``` - -```php -$path = run('readlink {{deploy_path}}/current'); -run("echo $path"); -``` - - - - -| Argument | Type | Comment | -|---|---|---| -| `$command` | `string` | Command to run on remote host. | -| `$options` | `array` or `null` | Array of options will override passed named arguments. | -| `$timeout` | `int` or `null` | Sets the process timeout (max. runtime). The timeout in seconds (default: 300 sec; see {{default_timeout}}, `null` to disable). | -| `$idle_timeout` | `int` or `null` | Sets the process idle timeout (max. time since last output) in seconds. | -| `$secret` | `string` or `null` | Placeholder `%secret%` can be used in command. Placeholder will be replaced with this value and will not appear in any logs. | -| `$env` | `array` or `null` | Array of environment variables: `run('echo $KEY', env: ['key' => 'value']);` | -| `$real_time_output` | `bool` or `null` | Print command output in real-time. | -| `$no_throw` | `bool` or `null` | Don't throw an exception of non-zero exit code. | - -## runLocally() - -```php -runLocally(string $command, ?array $options = [], ?int $timeout = null, ?int $idle_timeout = null, ?string $secret = null, ?array $env = null, ?string $shell = null): string -``` - -Execute commands on a local machine. - -Examples: - -```php -$user = runLocally('git config user.name'); -runLocally("echo $user"); -``` - - - - -| Argument | Type | Comment | -|---|---|---| -| `$command` | `string` | Command to run on localhost. | -| `$options` | `array` or `null` | Array of options will override passed named arguments. | -| `$timeout` | `int` or `null` | Sets the process timeout (max. runtime). The timeout in seconds (default: 300 sec, `null` to disable). | -| `$idle_timeout` | `int` or `null` | Sets the process idle timeout (max. time since last output) in seconds. | -| `$secret` | `string` or `null` | Placeholder `%secret%` can be used in command. Placeholder will be replaced with this value and will not appear in any logs. | -| `$env` | `array` or `null` | Array of environment variables: `runLocally('echo $KEY', env: ['key' => 'value']);` | -| `$shell` | `string` or `null` | Shell to run in. Default is `bash -s`. | - -## test() - -```php -test(string $command): bool -``` - -Run test command. -Example: - -```php -if (test('[ -d {{release_path}} ]')) { -... -} -``` - - - -## testLocally() - -```php -testLocally(string $command): bool -``` - -Run test command locally. -Example: - - testLocally('[ -d {{local_release_path}} ]') - - - -## on() - -```php -on($hosts, callable $callback): void -``` - -Iterate other hosts, allowing to call run a func in callback. - -```php -on(select('stage=prod, role=db'), function ($host) { - ... -}); -``` - -```php -on(host('example.org'), function ($host) { - ... -}); -``` - -```php -on(Deployer::get()->hosts, function ($host) { - ... -}); -``` - - - -## invoke() - -```php -invoke(string $taskName): void -``` - -Runs a task. -```php -invoke('deploy:symlink'); -``` - - - -## upload() - -```php -upload($source, string $destination, array $config = []): void -``` - -Upload files or directories to host. - -> To upload the _contents_ of a directory, include a trailing slash (eg `upload('build/', '{{release_path}}/public');`). -> Without the trailing slash, the build directory itself will be uploaded (resulting in `{{release_path}}/public/build`). - - The `$config` array supports the following keys: - -- `flags` for overriding the default `-azP` passed to the `rsync` command -- `options` with additional flags passed directly to the `rsync` command -- `timeout` for `Process::fromShellCommandline()` (`null` by default) -- `progress_bar` to display upload/download progress -- `display_stats` to display rsync set of statistics - -Note: due to the way php escapes command line arguments, list-notation for the rsync `--exclude={'file','anotherfile'}` option will not work. -A workaround is to add a separate `--exclude=file` argument for each exclude to `options` (also, _do not_ wrap the filename/filter in quotes). -An alternative might be to write the excludes to a temporary file (one per line) and use `--exclude-from=temporary_file` argument instead. - - - - -## download() - -```php -download(string $source, string $destination, array $config = []): void -``` - -Download file or directory from host - - - - -## info() - -```php -info(string $message): void -``` - -Writes an info message. - - -## warning() - -```php -warning(string $message): void -``` - -Writes an warning message. - - -## writeln() - -```php -writeln(string $message, int $options = 0): void -``` - -Writes a message to the output and adds a newline at the end. - - -## parse() - -```php -parse(string $value): string -``` - -Parse set values. - - -## set() - -```php -set(string $name, $value): void -``` - -Setup configuration option. - - -## add() - -```php -add(string $name, array $array): void -``` - -Merge new config params to existing config array. - - - -## get() - -```php -get(string $name, $default = null) -``` - -Get configuration value. - - - - -## has() - -```php -has(string $name): bool -``` - -Check if there is such configuration option. - - -## ask() - -```php -ask(string $message, ?string $default = null, ?array $autocomplete = null): ?string -``` - - - -## askChoice() - -```php -askChoice(string $message, array $availableChoices, $default = null, bool $multiselect = false) -``` - - - -## askConfirmation() - -```php -askConfirmation(string $message, bool $default = false): bool -``` - - - -## askHiddenResponse() - -```php -askHiddenResponse(string $message): string -``` - - - -## input() - -```php -input(): InputInterface -``` - - - -## output() - -```php -output(): OutputInterface -``` - - - -## commandExist() - -```php -commandExist(string $command): bool -``` - -Check if command exists - - - -## commandSupportsOption() - -```php -commandSupportsOption(string $command, string $option): bool -``` - - - -## which() - -```php -which(string $name): string -``` - - - -## remoteEnv() - -```php -remoteEnv(): array -``` - -Returns remote environments variables as an array. -```php -$remotePath = remoteEnv()['PATH']; -run('echo $PATH', env: ['PATH' => "/home/user/bin:$remotePath"]); -``` - - -## error() - -```php -error(string $message): Exception -``` - -Creates a new exception. - - -## timestamp() - -```php -timestamp(): string -``` - -Returns current timestamp in UTC timezone in ISO8601 format. - - -## fetch() - -```php -fetch(string $url, string $method = 'get', array $headers = [], ?string $body = null, ?array &$info = null, bool $nothrow = false): string -``` - -Example usage: -```php -$result = fetch('{{domain}}', info: $info); -var_dump($info['http_code'], $result); -``` - - diff --git a/docs/avoid-php-fpm-reloading.md b/docs/avoid-php-fpm-reloading.md deleted file mode 100644 index bb34d85e4..000000000 --- a/docs/avoid-php-fpm-reloading.md +++ /dev/null @@ -1,54 +0,0 @@ -# Avoid PHP-FPM Reloading - -Deployer symlinks _current_ to latest release dir. - -``` -current -> releases/3/ -releases/ - 1/ - 2/ - 3/ -``` - -## The problem - -PHP Opcodes get cached. And if `SCRIPT_FILENAME` contains _current_ symlink, on -new deploy nothing updates. Usually, a solution is simple to reload **php-fpm** -after deploy, but such reload can lead to **dropped** or **failed** requests. -The correct fix is to configure your server set `SCRIPT_FILENAME` to a resolved path. -You can check your server configuration by printing `SCRIPT_FILENAME`. - -```php -echo $_SERVER['SCRIPT_FILENAME']; -``` - -If it prints something like `/home/deployer/example.com/current/index.php` with -_current_ in the path, your server configured incorrectly. - -## Fix for Nginx - -Nginx has special variable `$realpath_root`, use it to set up `SCRIPT_FILENAME`: - -```diff -location ~ \.php$ { - include fastcgi_params; - fastcgi_pass unix:/var/run/php/php-fpm.sock; -- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; -+ fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; -} -``` - -## Fix for Caddy - -:::tip -If you're already using servers provisioned by Deployer, you don't need to fix -anything, as everything is already configured properly. -::: - -Use `resolve_root_symlink`: - -``` -php_fastcgi * unix//run/php/php-fpm.sock { - resolve_root_symlink -} -``` diff --git a/docs/basics.md b/docs/basics.md deleted file mode 100644 index 3e5ed892a..000000000 --- a/docs/basics.md +++ /dev/null @@ -1,234 +0,0 @@ -# Basics - -Deployer has two main concepts: [**hosts**](hosts.md) and [**tasks**](tasks.md). - -A **recipe** is a file containing definitions for **hosts** and **tasks**. - -Deployer CLI requires two arguments to run: a **task** to run and a **selector**. - -``` -$ dep deploy deployer.org - --- ------ ------------ - | | | - | | `--- Selector - | `------------- Task - `------------------ CLI -``` - -Deployer uses the [selector](selector.md) to choose hosts. Next takes the given -task, performs some preparation (described later), and executes the task on all -selected hosts. - -If selector not specified Deployer will ask you to choose host from list. -If your recipe contains only one host, Deployer will automatically choose it. -To select all hosts specify a special selector: `all`. - -The `dep` CLI looks for `deploy.php` or `deploy.yaml` file in current directory. - -Or recipe can be specified explicitly via `-f` or `--file` option. - -``` -$ dep --file=deploy.php deploy deployer.org -``` - -Let's write a recipe. - -```php -// We are going to use functions declared primarily in Deployer namespace, -// to simplify recipe we will use Deployer namespace too. Alternativly, -// you can import individual functions via "use function". -namespace Deployer; - -host('deployer.org'); - -task('my_task', function () { - run('whoami'); -}); -``` - -Let's try to run our task on deployer.org. - -``` -$ dep my_task -task my_task -$ -``` - -But where is our `whoami` command output? By default, Deployer runs with normal verbosity -level and shows only names of executed tasks. Let's increase verbosity to verbose, and -rerun our task. - -Add `-v` option to increase verbosity. Read more about [CLI usage](cli.md). - -``` -$ dep my_task -v -task my_task -[deployer.org] run whoami -[deployer.org] deployer -$ -``` - -Now let's add second host: - -```php -host('deployer.org'); -host('medv.io'); -``` - -How does Deployer know how to connect to a host? It uses same `~/.ssh/config` file as -the `ssh` command. Alternatively, you can specify [connection options](hosts.md) in recipe. - -Let's run `my_task` task on both hosts: - -``` -$ dep my_task -v all -task my_task -[deployer.org] run whoami -[medv.io] run whoami -[medv.io] anton -[deployer.org] deployer -``` - -Deployer runs a task in parallel on each host. This is why the output is mixed. -We can limit it to run only on one host at a time. - -``` -$ dep my_task -v all --limit 1 -task my_task -[deployer.org] run whoami -[deployer.org] deployer -[medv.io] run whoami -[medv.io] deployer -``` - -Limit level also possible to [specified per task](tasks.md#limit). - -Each host has a configuration: a list of key-value pairs. Let's define our first -configuration option for both our hosts: - -```php -host('deployer.org') - ->set('my_config', 'foo'); -host('medv.io') - ->set('my_config', 'bar'); -``` - -In the task we can get current executing host with [currentHost](api.md#currenthost) function: - -```php -task('my_task', function () { - $myConfig = currentHost()->get('my_config'); - writeln("my_config: " . $myConfig); -}); -``` - -Or with [get](api.md#get) function: - -```diff -task('my_task', function () { -- $myConfig = currentHost()->get('my_config'); -+ $myConfig = get('my_config'); - writeln("my_config: " . $myConfig); -}); -``` - -Or via [parse](api.md#parse) function which replaces brackets `{{ ... }}` and value -with of config option. - -All functions (writeln, run, runLocally, cd, upload, etc) call **parse** function -internally. So you don't need to call **parse** function by your self. - -```diff -task('my_task', function () { -- $myConfig = get('my_config'); -- writeln("my_config: " . $myConfig); -+ writeln("my_config: {{my_config}}"); -}); -``` - -Let's try to run our task: - -``` -$ dep my_task all -task my_task -[deployer.org] my_config: foo -[medv.io] my_config: bar -``` - -Awesome! Each host configuration inherits global configuration. Let's refactor -our recipe to define one global config option: - -```php -set('my_config', 'global'); - -host('deployer.org'); -host('medv.io'); -``` - -The config option `my_config` will be equal to `global` on both hosts. - -Also, config option value can be specified as a callback, such callback -executed on first access and returned result saved in host configuration. - -```php -set('whoami', function () { - return run('whoami'); -}); - -task('my_task', function () { - writeln('Who am I? {{whoami}}'); -}); -``` - -Let's try to run it: - -``` -$ dep my_task all -task my_task -[deployer.org] Who am I? deployer -[medv.io] Who am I? anton -``` - -We can use this to create dynamic configuration which uses current host information. - -Only the first call will trigger the callback execution. All subsequent checks use saved value. - -Here is an example: - -```php -set('current_date', function () { - return run('date'); -}); - -task('my_task', function () { - writeln('What time is it? {{current_date}}'); - run('sleep 5'); - writeln('What time is it? {{current_date}}'); -}); -``` - -If we run my_task we will see that `date` is called only once on -`{{current_date}}` access. - -``` -$ dep my_task deployer.org -v -task my_task -[deployer.org] run date -[deployer.org] Wed 03 Nov 2021 01:16:53 PM UTC -[deployer.org] What time is it? Wed 03 Nov 2021 01:16:53 PM UTC -[deployer.org] run sleep 5 -[deployer.org] What time is it? Wed 03 Nov 2021 01:16:53 PM UTC -``` - -We can override a config option via CLI option `-o` like this: - -``` -$ dep my_task deployer.org -v -o current_date="I don't know" -task my_task -[deployer.org] What time is it? I don't know -[deployer.org] run sleep 5 -[deployer.org] What time is it? I don't know -``` - -Since the `current_date` config option is overridden there is no need to call the callback. -So there is no 'run date'. diff --git a/docs/ci-cd.md b/docs/ci-cd.md deleted file mode 100755 index 1904998cc..000000000 --- a/docs/ci-cd.md +++ /dev/null @@ -1,96 +0,0 @@ -# CI/CD - -## GitHub Actions - -Use official [GitHub Action for Deployer](https://github.com/deployphp/action). - -Create `.github/workflows/deploy.yml` file with following content: - -```yaml -name: deploy - -on: - push: - branches: [master] - -concurrency: production_environment - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "8.0" - - - name: Deploy - uses: deployphp/action@v1 - with: - private-key: ${{ secrets.PRIVATE_KEY }} - dep: deploy -``` - -:::warning -The `concurrency: production_environment` is important as it prevents concurrent -deploys. -::: - -## GitLab CI/CD - -Set the following variables in GitLab project: - -- `SSH_KNOWN_HOSTS`: Content of `~/.ssh/known_hosts` file. - The public SSH keys for a host may be obtained using the utility `ssh-keyscan`. - For example: `ssh-keyscan deployer.org`. -- `SSH_PRIVATE_KEY`: Private key for connecting to remote hosts. - To generate private key: `ssh-keygen -t ed25519 -C 'gitlab@deployer.org'`. - -Create .gitlab-ci.yml file with following content: - -```yml -stages: - - deploy - -deploy: - stage: deploy - image: - name: deployphp/deployer:7 - entrypoint: [""] - before_script: - - mkdir -p ~/.ssh - - eval $(ssh-agent -s) - - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - script: - - dep deploy -vvv - resource_group: production - only: - - master -``` - -### Deployment concurrency - -Only one deployment job runs at a time with the [`resource_group` keyword](https://docs.gitlab.com/ee/ci/yaml/index.html#resource_group) in .gitlab-ci.yml. - -In addition, you can ensure that older deployment jobs are cancelled automatically when a newer deployment runs by enabling the [skip outdated deployment jobs](https://docs.gitlab.com/ee/ci/pipelines/settings.html#skip-outdated-deployment-jobs) feature. - -### Deploy secrets - -Is not recommended committing secrets in the repository, you could use a GitLab variable to store them. - -Many frameworks use dotenv to store secrets, let's create a GitLab file variable named `DOTENV`, so it can be deployed along with the code. - -Set up a deployer task to copy secrets to the server: - -```php -task('deploy:secrets', function () { - upload(getenv('DOTENV'), '{{deploy_path}}/shared/.env'); -}); -``` - -Run the task immediately after updating the code. diff --git a/docs/cli.md b/docs/cli.md deleted file mode 100755 index 0ad1ca71e..000000000 --- a/docs/cli.md +++ /dev/null @@ -1,147 +0,0 @@ -# CLI Usage - -We recommend adding next alias to your .bashrc file: - -```bash -alias dep='vendor/bin/dep' -``` - -As well as installing completion script for Deployer, completion supports: - -- tasks, -- options, -- host names, -- and configs. - -For example for macOS run next commands: - -```bash -brew install bash-completion -dep completion bash > /usr/local/etc/bash_completion.d/deployer -``` - -## Overriding configuration options - -For example, if your _deploy.php_ file contains this configuration: - -```php -set('ssh_multiplexing', false); -``` - -And you want to enable [ssh multiplexing](https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing) without modifying the recipe, you can pass the `-o` option to the `dep` command: - -``` -dep deploy -o ssh_multiplexing=true -``` - -To override multiple config options, you can pass multiple `-o` args: - -``` -dep deploy -o ssh_multiplexing=true -o branch=master -``` - -## Running arbitrary commands - -Run any command on one or more hosts: - -``` -dep run 'uptime -p' -``` - -## Tree command - -Deployer has group tasks and before/after hooks, so see task tree use **dep tree** command: - -``` -$ dep tree deploy -The task-tree for deploy: -└── deploy - ├── deploy:prepare - │ ├── deploy:info - │ ├── deploy:setup - │ ├── deploy:lock - │ ├── deploy:release - │ ├── deploy:update_code - │ ├── build // after deploy:update_code - │ ├── deploy:shared - │ └── deploy:writable - ├── deploy:vendors - ├── artisan:storage:link - ├── artisan:config:cache - ├── artisan:route:cache - ├── artisan:view:cache - ├── artisan:migrate - └── deploy:publish - ├── deploy:symlink - ├── deploy:unlock - ├── deploy:cleanup - └── deploy:success -``` - -## Execution plan - -Before executing tasks, Deployer needs to flatten task tree and to decide in which order it will be executing tasks -on which hosts. Use `--plan` option to output table with tasks/hosts: - -``` -$ dep deploy --plan all -┌──────────────────────┬──────────────────────┬──────────────────────┬──────────────────────┐ -│ prod01 │ prod02 │ prod03 │ prod04 │ -├──────────────────────┼──────────────────────┼──────────────────────┼──────────────────────┤ -│ deploy:info │ deploy:info │ deploy:info │ deploy:info │ -│ deploy:setup │ deploy:setup │ deploy:setup │ deploy:setup │ -│ deploy:lock │ deploy:lock │ deploy:lock │ deploy:lock │ -│ deploy:release │ deploy:release │ deploy:release │ deploy:release │ -│ deploy:update_code │ deploy:update_code │ deploy:update_code │ deploy:update_code │ -│ build │ build │ build │ build │ -│ deploy:shared │ deploy:shared │ deploy:shared │ deploy:shared │ -│ deploy:writable │ deploy:writable │ deploy:writable │ deploy:writable │ -│ deploy:vendors │ deploy:vendors │ deploy:vendors │ deploy:vendors │ -│ artisan:storage:link │ artisan:storage:link │ artisan:storage:link │ artisan:storage:link │ -│ artisan:config:cache │ artisan:config:cache │ artisan:config:cache │ artisan:config:cache │ -│ artisan:route:cache │ artisan:route:cache │ artisan:route:cache │ artisan:route:cache │ -│ artisan:view:cache │ artisan:view:cache │ artisan:view:cache │ artisan:view:cache │ -│ artisan:migrate │ artisan:migrate │ artisan:migrate │ artisan:migrate │ -│ deploy:symlink │ - │ - │ - │ -│ - │ deploy:symlink │ - │ - │ -│ - │ - │ deploy:symlink │ - │ -│ - │ - │ - │ deploy:symlink │ -│ deploy:unlock │ deploy:unlock │ deploy:unlock │ deploy:unlock │ -│ deploy:cleanup │ deploy:cleanup │ deploy:cleanup │ deploy:cleanup │ -│ deploy:success │ deploy:success │ deploy:success │ deploy:success │ -└──────────────────────┴──────────────────────┴──────────────────────┴──────────────────────┘ -``` - -The **deploy.php**: - -```php -host('prod[01:04]'); -task('deploy:symlink')->limit(1); -``` - -## The `runLocally` working dir - -By default `runLocally()` commands are executed relative to the recipe file directory. -This can be overridden globally by setting an environment variable: - -``` -DEPLOYER_ROOT=. dep taskname` -``` - -Alternatively the root directory can be overridden per command via the cwd configuration. - -```php -runLocally('ls', ['cwd' => '/root/directory']); -``` - -## Play blackjack - -> Yeah, well. I'm gonna go build my own theme park... with blackjack and hookers! -> -> In fact, forget the park! -> -> — Bender - -``` -dep blackjack -``` diff --git a/docs/contrib/README.md b/docs/contrib/README.md deleted file mode 100644 index 221fbfe1e..000000000 --- a/docs/contrib/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# All Contrib Recipes - -* [Bugsnag Recipe](/docs/contrib/bugsnag.md) -* [Cachetool Recipe](/docs/contrib/cachetool.md) -* [Chatwork Recipe](/docs/contrib/chatwork.md) -* [Cimonitor Recipe](/docs/contrib/cimonitor.md) -* [Cloudflare Recipe](/docs/contrib/cloudflare.md) -* [Cpanel Recipe](/docs/contrib/cpanel.md) -* [Crontab Recipe](/docs/contrib/crontab.md) -* [Directadmin Recipe](/docs/contrib/directadmin.md) -* [Discord Recipe](/docs/contrib/discord.md) -* [Grafana Recipe](/docs/contrib/grafana.md) -* [Hangouts Recipe](/docs/contrib/hangouts.md) -* [Hipchat Recipe](/docs/contrib/hipchat.md) -* [Ispmanager Recipe](/docs/contrib/ispmanager.md) -* [Mattermost Recipe](/docs/contrib/mattermost.md) -* [Ms-teams Recipe](/docs/contrib/ms-teams.md) -* [Newrelic Recipe](/docs/contrib/newrelic.md) -* [Npm Recipe](/docs/contrib/npm.md) -* [Phinx Recipe](/docs/contrib/phinx.md) -* [Php-fpm Recipe](/docs/contrib/php-fpm.md) -* [Rabbit Recipe](/docs/contrib/rabbit.md) -* [Raygun Recipe](/docs/contrib/raygun.md) -* [Rocketchat Recipe](/docs/contrib/rocketchat.md) -* [Rollbar Recipe](/docs/contrib/rollbar.md) -* [Rsync Recipe](/docs/contrib/rsync.md) -* [Sentry Recipe](/docs/contrib/sentry.md) -* [Slack Recipe](/docs/contrib/slack.md) -* [Telegram Recipe](/docs/contrib/telegram.md) -* [Webpack_encore Recipe](/docs/contrib/webpack_encore.md) -* [Workplace Recipe](/docs/contrib/workplace.md) -* [Yammer Recipe](/docs/contrib/yammer.md) -* [Yarn Recipe](/docs/contrib/yarn.md) \ No newline at end of file diff --git a/docs/contrib/bugsnag.md b/docs/contrib/bugsnag.md deleted file mode 100644 index 491874026..000000000 --- a/docs/contrib/bugsnag.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# Bugsnag Recipe - -```php -require 'contrib/bugsnag.php'; -``` - -[Source](/contrib/bugsnag.php) - - - - -## Configuration - -- *bugsnag_api_key* – the API Key associated with the project. Informs Bugsnag which project has been deployed. This is the only required field. -- *bugsnag_provider* – the name of your source control provider. Required when repository is supplied and only for on-premise services. -- *bugsnag_app_version* – the app version of the code you are currently deploying. Only set this if you tag your releases with semantic version numbers and deploy infrequently. (Optional.) - -## Usage - -Since you should only notify Bugsnag of a successful deployment, the `bugsnag:notify` task should be executed right at the end. - -```php -after('deploy', 'bugsnag:notify'); -``` - - - -## Tasks - -### bugsnag:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/bugsnag.php#L23) - -Notifies Bugsnag of deployment. - - - - diff --git a/docs/contrib/cachetool.md b/docs/contrib/cachetool.md deleted file mode 100644 index db3863f14..000000000 --- a/docs/contrib/cachetool.md +++ /dev/null @@ -1,134 +0,0 @@ - - - - -# Cachetool Recipe - -```php -require 'contrib/cachetool.php'; -``` - -[Source](/contrib/cachetool.php) - - - - -## Configuration - -- **cachetool** *(optional)*: accepts a *string* with the unix socket or ip address to php-fpm. If `cachetool` is not given, then the application will look for a `cachetool.yml` file and read the configuration from there. - - ```php - set('cachetool', '/var/run/php-fpm.sock'); - // or - set('cachetool', '127.0.0.1:9000'); - ``` - -You can also specify different cachetool settings for each host: -```php -host('staging') - ->set('cachetool', '127.0.0.1:9000'); - -host('production') - ->set('cachetool', '/var/run/php-fpm.sock'); -``` - -By default, if no `cachetool` parameter is provided, this recipe will fallback to the global setting. - -If your deployment user does not have permission to access the php-fpm.sock, you can alternatively use -the web adapter that creates a temporary php file and makes a web request to it with a configuration like -```php -set('cachetool_args', '--web --web-path=./public --web-url=https://{{hostname}}'); -``` - -## Usage - -Since APCu and OPcache deal with compiling and caching files, they should be executed right after the symlink is created for the new release: - -```php -after('deploy:symlink', 'cachetool:clear:opcache'); -or -after('deploy:symlink', 'cachetool:clear:apcu'); -``` - -## Read more - -Read more information about cachetool on the website: -http://gordalina.github.io/cachetool/ - - -## Configuration -### cachetool -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cachetool.php#L48) - - - - - -### cachetool_url -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cachetool.php#L49) - - - -```php title="Default value" -'https://github.com/gordalina/cachetool/releases/download/7.0.0/cachetool.phar' -``` - - -### cachetool_args -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cachetool.php#L50) - - - - - -### bin/cachetool -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cachetool.php#L51) - - - -```php title="Default value" -if (!test('[ -f {{release_or_current_path}}/cachetool.phar ]')) { -run("cd {{release_or_current_path}} && curl -sLO {{cachetool_url}}"); -} -return '{{release_or_current_path}}/cachetool.phar'; -``` - - -### cachetool_options -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cachetool.php#L57) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - - -## Tasks - -### cachetool:clear:opcache -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cachetool.php#L74) - -Clears OPcode cache. - -Clear opcache cache - - -### cachetool:clear:apcu -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cachetool.php#L82) - -Clears APCu system cache. - -Clear APCU cache - - -### cachetool:clear:stat -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cachetool.php#L90) - -Clears file status and realpath caches. - -Clear file status cache, including the realpath cache - - diff --git a/docs/contrib/chatwork.md b/docs/contrib/chatwork.md deleted file mode 100644 index 0c9213e07..000000000 --- a/docs/contrib/chatwork.md +++ /dev/null @@ -1,205 +0,0 @@ - - - - -# Chatwork Recipe - -```php -require 'contrib/chatwork.php'; -``` - -[Source](/contrib/chatwork.php) - - - -# Chatwork Recipe - -## Installing - 1. Create chatwork account by any manual in the internet - 2. Take chatwork token (Like: b29a700e2d15bef3f26ae6a5c142d1ea) and set `chatwork_token` parameter - 3. Take chatwork room id from url after clicked on the room, and set `chatwork_room_id` parameter - 4. If you want, you can edit `chatwork_notify_text`, `chatwork_success_text` or `chatwork_failure_text` - 5. Require chatwork recipe in your `deploy.php` file - -```php -# https://deployer.org/recipes.html - -require 'recipe/chatwork.php'; -``` - -Add hook on deploy: - -```php -before('deploy', 'chatwork:notify'); -``` - -## Configuration - -- `chatwork_token` – chatwork bot token, **required** -- `chatwork_room_id` — chatwork room to push messages to **required** -- `chatwork_notify_text` – notification message template - ``` - [info] - [title](*) Deployment Status: Deploying[/title] - Repo: {{repository}} - Branch: {{branch}} - Server: {{hostname}} - Release Path: {{release_path}} - Current Path: {{current_path}} - [/info] - ``` -- `chatwork_success_text` – success template, default: - ``` - [info] - [title](*) Deployment Status: Successfully[/title] - Repo: {{repository}} - Branch: {{branch}} - Server: {{hostname}} - Release Path: {{release_path}} - Current Path: {{current_path}} - [/info]" - ``` -- `chatwork_failure_text` – failure template, default: - ``` - [info] - [title](*) Deployment Status: Failed[/title] - Repo: {{repository}} - Branch: {{branch}} - Server: {{hostname}} - Release Path: {{release_path}} - Current Path: {{current_path}} - [/info]" - ``` - -## Tasks - -- `chatwork:notify` – send message to chatwork -- `chatwork:notify:success` – send success message to chatwork -- `chatwork:notify:failure` – send failure message to chatwork - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'chatwork:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('success', 'chatwork:notify:success'); -``` -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'chatwork:notify:failure'); -``` - - -## Configuration -### chatwork_token -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L91) - -Chatwork settings -:::info Required -Throws exception if not set. -::: - - - - -### chatwork_room_id -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L94) - - -:::info Required -Throws exception if not set. -::: - - - - -### chatwork_api -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L97) - - - -```php title="Default value" -return 'https://api.chatwork.com/v2/rooms/' . get('chatwork_room_id') . '/messages'; -``` - - -### chatwork_notify_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L102) - -The Messages - -```php title="Default value" -"[info]\n[title](*) Deployment Status: Deploying[/title]\nRepo: {{repository}}\nBranch: {{branch}}\nServer: {{hostname}}\nRelease Path: {{release_path}}\nCurrent Path: {{current_path}}\n[/info]" -``` - - -### chatwork_success_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L103) - - - -```php title="Default value" -"[info]\n[title](*) Deployment Status: Successfully[/title]\nRepo: {{repository}}\nBranch: {{branch}}\nServer: {{hostname}}\nRelease Path: {{release_path}}\nCurrent Path: {{current_path}}\n[/info]" -``` - - -### chatwork_failure_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L104) - - - -```php title="Default value" -"[info]\n[title](*) Deployment Status: Failed[/title]\nRepo: {{repository}}\nBranch: {{branch}}\nServer: {{hostname}}\nRelease Path: {{release_path}}\nCurrent Path: {{current_path}}\n[/info]" -``` - - - -## Tasks - -### chatwork_send_message -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L107) - - - -Helpers - - -### chatwork:test -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L116) - -Tests messages. - -Tasks - - -### chatwork:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L127) - -Notifies Chatwork. - - - - -### chatwork:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L142) - -Notifies Chatwork about deploy finish. - - - - -### chatwork:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/chatwork.php#L158) - -Notifies Chatwork about deploy failure. - - - - diff --git a/docs/contrib/cimonitor.md b/docs/contrib/cimonitor.md deleted file mode 100644 index 6b981b116..000000000 --- a/docs/contrib/cimonitor.md +++ /dev/null @@ -1,223 +0,0 @@ - - - - -# Cimonitor Recipe - -```php -require 'contrib/cimonitor.php'; -``` - -[Source](/contrib/cimonitor.php) - - - -Monitor your deployments on [CIMonitor](https://github.com/CIMonitor/CIMonitor). - -![CIMonitorGif](https://www.steefmin.xyz/deployer-example.gif) - - -Add tasks on deploy: - -```php -before('deploy', 'cimonitor:notify'); -after('deploy:success', 'cimonitor:notify:success'); -after('deploy:failed', 'cimonitor:notify:failure'); -``` - -## Configuration - -- `cimonitor_webhook` – CIMonitor server webhook url, **required** - ``` - set('cimonitor_webhook', 'https://cimonitor.enrise.com/webhook/deployer'); - ``` -- `cimonitor_title` – the title of application, default the username\reponame combination from `{{repository}}` - ``` - set('cimonitor_title', ''); - ``` -- `cimonitor_user` – User object with name and email, default gets information from `git config` - ``` - set('cimonitor_user', function () { - return [ - 'name' => 'John Doe', - 'email' => 'john@enrise.com', - ]; - }); - ``` - -Various cimonitor statusses are set, in case you want to change these yourselves. See the [CIMonitor documentation](https://cimonitor.readthedocs.io/en/latest/) for the usages of different states. - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'cimonitor:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'cimonitor:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'cimonitor:notify:failure'); -``` - - -## Configuration -### cimonitor_title -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L63) - -Title of project based on git repo - -```php title="Default value" -$repo = get('repository'); -$pattern = '/\w+\/\w+/'; -return preg_match($pattern, $repo, $titles) ? $titles[0] : $repo; -``` - - -### cimonitor_user -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L68) - - - -```php title="Default value" -return [ -'name' => runLocally('git config --get user.name'), -'email' => runLocally('git config --get user.email'), -]; -``` - - -### cimonitor_status_info -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L76) - -CI monitor status states and job states - -```php title="Default value" -'info' -``` - - -### cimonitor_status_warning -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L77) - - - -```php title="Default value" -'warning' -``` - - -### cimonitor_status_error -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L78) - - - -```php title="Default value" -'error' -``` - - -### cimonitor_status_success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L79) - - - -```php title="Default value" -'success' -``` - - -### cimonitor_job_state_info -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L80) - - - -```php title="Default value" -get('cimonitor_status_info') -``` - - -### cimonitor_job_state_pending -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L81) - - - -```php title="Default value" -'pending' -``` - - -### cimonitor_job_state_running -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L82) - - - -```php title="Default value" -'running' -``` - - -### cimonitor_job_state_warning -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L83) - - - -```php title="Default value" -get('cimonitor_status_warning') -``` - - -### cimonitor_job_state_error -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L84) - - - -```php title="Default value" -get('cimonitor_status_error') -``` - - -### cimonitor_job_state_success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L85) - - - -```php title="Default value" -get('cimonitor_status_success') -``` - - - -## Tasks - -### cimonitor:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L88) - -Notifies CIMonitor. - - - - -### cimonitor:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L114) - -Notifies CIMonitor about deploy finish. - - - - -### cimonitor:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cimonitor.php#L142) - -Notifies CIMonitor about deploy failure. - - - - diff --git a/docs/contrib/cloudflare.md b/docs/contrib/cloudflare.md deleted file mode 100644 index 47226c85d..000000000 --- a/docs/contrib/cloudflare.md +++ /dev/null @@ -1,43 +0,0 @@ - - - - -# Cloudflare Recipe - -```php -require 'contrib/cloudflare.php'; -``` - -[Source](/contrib/cloudflare.php) - - - - -### Configuration - -- `cloudflare` – array with configuration for cloudflare - - `service_key` – Cloudflare Service Key. If this is not provided, use api_key and email. - - `api_key` – Cloudflare API key generated on the "My Account" page. - - `email` – Cloudflare Email address associated with your account. - - `api_token` – Cloudflare API Token generated on the "My Account" page. - - `domain` – The domain you want to clear (optional if zone_id is provided). - - `zone_id` – Cloudflare Zone ID (optional). - -### Usage - -Since the website should be built and some load is likely about to be applied to your server, this should be one of, -if not the, last tasks before cleanup - - - - -## Tasks - -### deploy:cloudflare -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cloudflare.php#L23) - -Clears Cloudflare Cache. - - - - diff --git a/docs/contrib/cpanel.md b/docs/contrib/cpanel.md deleted file mode 100644 index e75e507f3..000000000 --- a/docs/contrib/cpanel.md +++ /dev/null @@ -1,175 +0,0 @@ - - - - -# Cpanel Recipe - -```php -require 'contrib/cpanel.php'; -``` - -[Source](/contrib/cpanel.php) - - - -### Description -This is a recipe that uses the [cPanel 2 API](https://documentation.cPanel.net/display/DD/Guide+to+cPanel+API+2). - -Unfortunately the [UAPI](https://documentation.cPanel.net/display/DD/Guide+to+UAPI) that is recommended does not have support for creating addon domains. -The main idea behind is for staging purposes but I guess you can use it for other interesting concepts. - -The idea is, every branch possibly has its own staging domain/subdomain (staging-neat-feature.project.com) and database db_neat-feature_project so it can be tested. -This recipe can make the domain/subdomain and database creation part of the deployment process so you don't have to manually create them through an interface. - - -### Configuration -The example uses a .env file and Dotenv for configuration, but you can set the parameters as you wish -``` -set('cpanel', [ - 'host' => getenv('CPANEL_HOST'), - 'port' => getenv('CPANEL_PORT'), - 'username' => getenv('CPANEL_USERNAME'), - 'auth_type' => getenv('CPANEL_AUTH_TYPE'), - 'token' => getenv('CPANEL_TOKEN'), - 'user' => getenv('CPANEL_USER'), - 'db_user' => getenv('CPANEL_DB_USER'), - 'db_user_privileges' => getenv('CPANEL_DB_PRIVILEGES'), - 'timeout' => 500, - - 'allowInStage' => ['staging', 'beta', 'alpha'], - - 'create_domain_format' => '%s-%s-%s', - 'create_domain_values' => ['staging', 'master', get('application')], - 'subdomain_prefix' => substr(md5(get('application')), 0,4) . '-', - 'subdomain_suffix' => getenv('SUDOMAIN_SUFFIX'), - - - 'create_db_format' => '%s_%s-%s-%s', - 'create_db_values' => ['apps', 'staging','master', get('application')], - -]); -``` - -- `cpanel` – array with configuration for cPanel - - `username` – WHM account - - `user` – cPanel account that you want in charge of the domain - - `token` – WHM API token - - `create_domain_format` – Format for name creation of domain - - `create_domain_values` – The actual value reference for naming - - `subdomain_prefix` – cPanel has a weird way of dealing with addons and subdomains, you cannot create 2 addons with the same subdomain, so you need to change it in some way, example uses first 4 chars of md5(app_name) - - `subdomain_suffix` – cPanel has a weird way of dealing with addons and subdomains, so the suffix needs to be your main domain for that account for deletion purposes - - `addondir` – addon dir is different from the deploy path because cPanel "injects" /home/user/ into the path, so tilde cannot be used - - `allowInStage` – Define the stages that cPanel recipe actions are allowed in - - -#### .env file example -``` -CPANEL_HOST=xxx.xxx.xxx.xxx -CPANEL_PORT=2087 -CPANEL_USERNAME=root -CPANEL_TOKEN=xxxx -CPANEL_USER=xxx -CPANEL_AUTH_TYPE=hash -CPANEL_DB_USER=db_user -CPANEL_DB_PRIVILEGES="ALL PRIVILEGES" -SUDOMAIN_SUFFIX=.mymaindomain.com - -``` - -### Tasks - -- `cpanel:createaddondomain` Creates an addon domain -- `cpanel:deleteaddondomain` Removes an addon domain -- `cpanel:createdb` Creates a new database - -### Usage - -A complete example with configs, staging and deployment - -``` -load(); // this is used just so an .env file can be used for credentials - -require 'cpanel.php'; - - -Project name -set('application', 'myproject.com'); -Project repository -set('repository', 'git@github.com:myorg/myproject.com'); - - - - - -set('cpanel', [ - 'host' => getenv('CPANEL_HOST'), - 'port' => getenv('CPANEL_PORT'), - 'username' => getenv('CPANEL_USERNAME'), - 'auth_type' => getenv('CPANEL_AUTH_TYPE'), - 'token' => getenv('CPANEL_TOKEN'), - 'user' => getenv('CPANEL_USER'), - 'db_user' => getenv('CPANEL_DB_USER'), - 'db_user_privileges' => getenv('CPANEL_DB_PRIVILEGES'), - 'timeout' => 500, - 'allowInStage' => ['staging', 'beta', 'alpha'], - - 'create_domain_format' => '%s-%s-%s', - 'create_domain_values' => ['staging', 'master', get('application')], - 'subdomain_prefix' => substr(md5(get('application')), 0,4) . '-', - 'subdomain_suffix' => getenv('SUDOMAIN_SUFFIX'), - - - 'create_db_format' => '%s_%s-%s-%s', - 'create_db_values' => ['apps', 'staging','master', get('application')], - -]); - -host('myproject.com') - ->stage('staging') - ->set('cpanel_createdb', vsprintf(get('cpanel')['create_db_format'], get('cpanel')['create_db_values'])) - ->set('branch', 'dev-branch') - ->set('deploy_path', '~/staging/' . vsprintf(get('cpanel')['create_domain_format'], get('cpanel')['create_domain_values'])) - ->set('addondir', 'staging/' . vsprintf(get('cpanel')['create_domain_format'], get('cpanel')['create_domain_values'])); -Tasks -task('build', function () { - run('cd {{release_path}} && build'); -}); - -after('deploy:prepare', 'cpanel:createaddondomain'); -after('deploy:prepare', 'cpanel:createdb'); -``` - - - -## Tasks - -### cpanel:createdb -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cpanel.php#L195) - -Creates database though CPanel API. - - - - -### cpanel:createaddondomain -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cpanel.php#L223) - -Creates addon domain though CPanel API. - - - - -### cpanel:deleteaddondomain -[Source](https://github.com/deployphp/deployer/blob/master/contrib/cpanel.php#L246) - -Deletes addon domain though CPanel API. - - - - diff --git a/docs/contrib/crontab.md b/docs/contrib/crontab.md deleted file mode 100644 index 2706aed94..000000000 --- a/docs/contrib/crontab.md +++ /dev/null @@ -1,65 +0,0 @@ - - - - -# Crontab Recipe - -```php -require 'contrib/crontab.php'; -``` - -[Source](/contrib/crontab.php) - - - -Recipe for adding crontab jobs. - -It checks for duplicates by the command part of the job. Changing the schedule will update the crontab. So when you change the command part you have to manually remove the old one. Use `crontab -e` on the server to remove it. - -## Configuration - -- *crontab:jobs* - An array of strings with crontab lines. - -## Usage - -```php -require 'contrib/crontab.php'; - -after('deploy:success', 'crontab:sync'); - -add('crontab:jobs', [ - '* * * * * cd {{current_path}} && {{bin/php}} artisan schedule:run >> /dev/null 2>&1', -]); -``` - - -## Configuration -### bin/crontab -[Source](https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L26) - -Get path to bin - -```php title="Default value" -return which('crontab'); -``` - - - -## Tasks - -### crontab:load -[Source](https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L31) - -Loads crontab. - - - - -### crontab:sync -[Source](https://github.com/deployphp/deployer/blob/master/contrib/crontab.php#L56) - -Sync crontab jobs. - - - - diff --git a/docs/contrib/directadmin.md b/docs/contrib/directadmin.md deleted file mode 100644 index 1da4c6ed1..000000000 --- a/docs/contrib/directadmin.md +++ /dev/null @@ -1,83 +0,0 @@ - - - - -# Directadmin Recipe - -```php -require 'contrib/directadmin.php'; -``` - -[Source](/contrib/directadmin.php) - - - -### Configuration -- `directadmin` – array with configuration for DirectAdmin - - `host` – DirectAdmin host - - `port` – DirectAdmin port (default: 2222, not required) - - `scheme` – DirectAdmin scheme (default: http, not required) - - `username` – DirectAdmin username - - `password` – DirectAdmin password (it is recommended to use login keys!) - - `db_user` – Database username (required when using directadmin:createdb or directadmin:deletedb) - - `db_name` – Database namse (required when using directadmin:createdb) - - `db_password` – Database password (required when using directadmin:createdb) - - `domain_name` – Domain to create, delete or edit (required when using directadmin:createdomain, directadmin:deletedomain, directadmin:symlink-private-html or directadmin:php-version) - - `domain_ssl` – Enable SSL, options: ON/OFF, default: ON (optional when using directadmin:createdb) - - `domain_cgi` – Enable CGI, options: ON/OFF, default: ON (optional when using directadmin:createdb) - - `domain_php` – Enable PHP, options: ON/OFF, default: ON (optional when using directadmin:createdb) - - `domain_php_version` – Domain PHP Version, default: 1 (required when using directadmin:php-version) - - - - -## Tasks - -### directadmin:createdb -[Source](https://github.com/deployphp/deployer/blob/master/contrib/directadmin.php#L74) - -Creates a database on DirectAdmin. - - - - -### directadmin:deletedb -[Source](https://github.com/deployphp/deployer/blob/master/contrib/directadmin.php#L94) - -Deletes a database on DirectAdmin. - - - - -### directadmin:createdomain -[Source](https://github.com/deployphp/deployer/blob/master/contrib/directadmin.php#L109) - -Creates a domain on DirectAdmin. - - - - -### directadmin:deletedomain -[Source](https://github.com/deployphp/deployer/blob/master/contrib/directadmin.php#L127) - -Deletes a domain on DirectAdmin. - - - - -### directadmin:symlink-private-html -[Source](https://github.com/deployphp/deployer/blob/master/contrib/directadmin.php#L143) - -Symlink your private_html to public_html. - - - - -### directadmin:php-version -[Source](https://github.com/deployphp/deployer/blob/master/contrib/directadmin.php#L159) - -Changes the PHP version from a domain. - - - - diff --git a/docs/contrib/discord.md b/docs/contrib/discord.md deleted file mode 100644 index 510e0bd96..000000000 --- a/docs/contrib/discord.md +++ /dev/null @@ -1,160 +0,0 @@ - - - - -# Discord Recipe - -```php -require 'contrib/discord.php'; -``` - -[Source](/contrib/discord.php) - - - -## Installing - -Add hook on deploy: - -```php -before('deploy', 'discord:notify'); -``` - -## Configuration - -- `discord_channel` – Discord channel ID, **required** -- `discord_token` – Discord channel token, **required** - -- `discord_notify_text` – notification message template, markdown supported, default: - ```markdown - :​information_source: **{{user}}** is deploying branch `{{branch}}` to _{{target}}_ - ``` -- `discord_success_text` – success template, default: - ```markdown - :​white_check_mark: Branch `{{branch}}` deployed to _{{target}}_ successfully - ``` -- `discord_failure_text` – failure template, default: - ```markdown - :​no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{target}}_ - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'discord:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'discord:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'discord:notify:failure'); -``` - - -## Configuration -### discord_webhook -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L53) - - - -```php title="Default value" -return 'https://discordapp.com/api/webhooks/{{discord_channel}}/{{discord_token}}/slack'; -``` - - -### discord_notify_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L58) - -Deploy messages - -```php title="Default value" -return [ -'text' => parse(':​information_source: **{{user}}** is deploying branch `{{branch}}` to _{{target}}_'), -]; -``` - - -### discord_success_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L63) - - - -```php title="Default value" -return [ -'text' => parse(':​white_check_mark: Branch `{{branch}}` deployed to _{{target}}_ successfully'), -]; -``` - - -### discord_failure_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L68) - - - -```php title="Default value" -return [ -'text' => parse(':​no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{target}}_'), -]; -``` - - -### discord_message -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L75) - -The message - -```php title="Default value" -'discord_notify_text' -``` - - - -## Tasks - -### discord_send_message -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L78) - - - -Helpers - - -### discord:test -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L86) - -Tests messages. - -Tasks - - -### discord:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L97) - -Notifies Discord. - - - - -### discord:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L105) - -Notifies Discord about deploy finish. - - - - -### discord:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/discord.php#L113) - -Notifies Discord about deploy failure. - - - - diff --git a/docs/contrib/grafana.md b/docs/contrib/grafana.md deleted file mode 100644 index 2f650e4aa..000000000 --- a/docs/contrib/grafana.md +++ /dev/null @@ -1,55 +0,0 @@ - - - - -# Grafana Recipe - -```php -require 'contrib/grafana.php'; -``` - -[Source](/contrib/grafana.php) - - - - -## Configuration options - -- **url** *(required)*: the URL to the creates annotation api endpoint. -- **token** *(required)*: authentication token. Can be created at Grafana Console. -- **time** *(optional)* – set deploy time of annotation. specify epoch milliseconds. (Defaults is set to the current time in epoch milliseconds.) -- **tags** *(optional)* – set tag of annotation. -- **text** *(optional)* – set text of annotation. (Defaults is set to "Deployed " + git log -n 1 --format="%h") - -```php -deploy.php - -set('grafana', [ - 'token' => 'eyJrIj...', - 'url' => 'http://grafana/api/annotations', - 'tags' => ['deploy', 'production'], -]); - -``` - -## Usage - -If you want to create annotation about successful end of deployment. - -```php -after('deploy:success', 'grafana:annotation'); -``` - - - - -## Tasks - -### grafana:annotation -[Source](https://github.com/deployphp/deployer/blob/master/contrib/grafana.php#L38) - -Creates Grafana annotation of deployment. - - - - diff --git a/docs/contrib/hangouts.md b/docs/contrib/hangouts.md deleted file mode 100644 index 52e8e2954..000000000 --- a/docs/contrib/hangouts.md +++ /dev/null @@ -1,130 +0,0 @@ - - - - -# Hangouts Recipe - -```php -require 'contrib/hangouts.php'; -``` - -[Source](/contrib/hangouts.php) - - - - -Add hook on deploy: - -```php -before('deploy', 'chat:notify'); -``` - -## Configuration - -- `chat_webhook` – chat incoming webhook url, **required** -- `chat_title` – the title of your notification card, default `{{application}}` -- `chat_subtitle` – the subtitle of your card, default `{{hostname}}` -- `chat_favicon` – an image for the header of your card, default `http://{{hostname}}/favicon.png` -- `chat_line1` – first line of the text in your card, default: `{{branch}}` -- `chat_line2` – second line of the text in your card, default: `{{stage}}` - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'chat:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'chat:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'chat:notify:failure'); -``` - - - -## Configuration -### chat_title -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hangouts.php#L45) - -Title of project - -```php title="Default value" -return get('application', 'Project'); -``` - - -### chat_subtitle -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hangouts.php#L49) - - - -```php title="Default value" -get('hostname') -``` - - -### favicon -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hangouts.php#L52) - -If 'favicon' is set Google Hangouts Chat will decorate your card with an image. - -```php title="Default value" -'http://{{hostname}}/favicon.png' -``` - - -### chat_line1 -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hangouts.php#L55) - -Deploy messages - -```php title="Default value" -'{{branch}}' -``` - - -### chat_line2 -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hangouts.php#L56) - - - -```php title="Default value" -'{{stage}}' -``` - - - -## Tasks - -### chat:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hangouts.php#L59) - -Notifies Google Hangouts Chat. - - - - -### chat:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hangouts.php#L101) - -Notifies Google Hangouts Chat about deploy finish. - - - - -### chat:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hangouts.php#L143) - -Notifies Google Hangouts Chat about deploy failure. - - - - diff --git a/docs/contrib/hipchat.md b/docs/contrib/hipchat.md deleted file mode 100644 index a35bdf340..000000000 --- a/docs/contrib/hipchat.md +++ /dev/null @@ -1,85 +0,0 @@ - - - - -# Hipchat Recipe - -```php -require 'contrib/hipchat.php'; -``` - -[Source](/contrib/hipchat.php) - - - -## Configuration - -- `hipchat_token` – Hipchat V1 auth token -- `hipchat_room_id` – Room ID or name -- `hipchat_message` – Deploy message, default is `_{{user}}_ deploying `{{branch}}` to *{{target}}*` -- `hipchat_from` – Default to target -- `hipchat_color` – Message color, default is **green** -- `hipchat_url` – The URL to the message endpoint, default is https://api.hipchat.com/v1/rooms/message - -## Usage - -Since you should only notify Hipchat room of a successful deployment, the `hipchat:notify` task should be executed right at the end. - -```php -after('deploy', 'hipchat:notify'); -``` - - - -## Configuration -### hipchat_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hipchat.php#L25) - - - -```php title="Default value" -'green' -``` - - -### hipchat_from -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hipchat.php#L26) - - - -```php title="Default value" -'{{target}}' -``` - - -### hipchat_message -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hipchat.php#L27) - - - -```php title="Default value" -'_{{user}}_ deploying `{{branch}}` to *{{target}}*' -``` - - -### hipchat_url -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hipchat.php#L28) - - - -```php title="Default value" -'https://api.hipchat.com/v1/rooms/message' -``` - - - -## Tasks - -### hipchat:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/hipchat.php#L31) - -Notifies Hipchat channel of deployment. - - - - diff --git a/docs/contrib/ispmanager.md b/docs/contrib/ispmanager.md deleted file mode 100644 index fcfd98fb9..000000000 --- a/docs/contrib/ispmanager.md +++ /dev/null @@ -1,245 +0,0 @@ - - - - -# Ispmanager Recipe - -```php -require 'contrib/ispmanager.php'; -``` - -[Source](/contrib/ispmanager.php) - - - -This recipe for work with ISPManager Lite panel by API. - - -## Configuration -### ispmanager_owner -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L10) - - - -```php title="Default value" -'www-root' -``` - - -### ispmanager_doc_root -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L11) - - - -```php title="Default value" -'/var/www/' . get('ispmanager_owner') . '/data/' -``` - - -### ispmanager -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L14) - -ISPManager default configuration - -```php title="Default value" -[ - 'api' => [ - 'dsn' => 'https://root:password@localhost:1500/ispmgr', - 'secure' => true, - ], - 'createDomain' => NULL, - 'updateDomain' => NULL, - 'deleteDomain' => NULL, - 'createDatabase' => NULL, - 'deleteDatabase' => NULL, - 'phpSelect' => NULL, - 'createAlias' => NULL, - 'deleteAlias' => NULL, -] -``` - - -### vhost -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L30) - -Vhost default configuration - -```php title="Default value" -[ - 'name' => '{{domain}}', - 'php_enable' => 'on', - 'aliases' => 'www.{{domain}}', - 'home' => 'www/{{domain}}', - 'owner' => get('ispmanager_owner'), - 'email' => 'webmaster@{{domain}}', - 'charset' => 'off', - 'dirindex' => 'index.php uploaded.html', - 'ssi' => 'on', - 'php' => 'on', - 'php_mode' => 'php_mode_mod', - 'basedir' => 'on', - 'php_apache_version' => 'native', - 'cgi' => 'off', - 'log_access' => 'on', - 'log_error' => 'on', -] -``` - - -### ispmanager_session -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L50) - -Storage - - - -### ispmanager_databases -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L51) - - - -```php title="Default value" -[ - 'servers' => [], - 'hosts' => [], - 'dblist' => [], -] -``` - - -### ispmanager_domains -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L57) - - - - - -### ispmanager_phplist -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L58) - - - - - -### ispmanager_aliaslist -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L59) - - - - - - -## Tasks - -### ispmanager:init -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L62) - -Installs ispmanager. - - - - -### ispmanager:db-server-list -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L85) - -Takes database servers list. - - - - -### ispmanager:db-list -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L122) - -Takes databases list. - - - - -### ispmanager:domain-list -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L144) - -Takes domain list. - - - - -### ispmanager:db-create -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L160) - -Creates new database. - - - - -### ispmanager:db-delete -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L230) - -Deletes database. - - - - -### ispmanager:domain-create -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L281) - -Creates new domain. - - - - -### ispmanager:get-php-list -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L327) - -Gets allowed PHP modes and versions. - - - - -### ispmanager:print-php-list -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L373) - -Prints allowed PHP modes and versions. - - - - -### ispmanager:domain-php-select -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L411) - -Switches PHP version for domain. - - - - -### ispmanager:domain-alias-create -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L480) - -Creates new domain alias. - - - - -### ispmanager:domain-alias-delete -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L549) - -Deletes domain alias. - - - - -### ispmanager:domain-delete -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L617) - -Deletes domain. - - - - -### ispmanager:process -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ispmanager.php#L664) - -Auto task processing. - - - - diff --git a/docs/contrib/mattermost.md b/docs/contrib/mattermost.md deleted file mode 100644 index 5b5516bac..000000000 --- a/docs/contrib/mattermost.md +++ /dev/null @@ -1,206 +0,0 @@ - - - - -# Mattermost Recipe - -```php -require 'contrib/mattermost.php'; -``` - -[Source](/contrib/mattermost.php) - - - -## Installing - -Create a Mattermost incoming webhook, through the administration panel. - -Add hook on deploy: - -``` -before('deploy', 'mattermost:notify'); -``` - -## Configuration - - - `mattermost_webhook` - incoming mattermost webook **required** - ``` - set('mattermost_webook', 'https://{your-mattermost-site}/hooks/xxx-generatedkey-xxx'); - ``` - - - `mattermost_channel` - overrides the channel the message posts in - ``` - set('mattermost_channel', 'town-square'); - ``` - - - `mattermost_username` - overrides the username the message posts as - ``` - set('mattermost_username', 'deployer'); - ``` - - - `mattermost_icon_url` - overrides the profile picture the message posts with - ``` - set('mattermost_icon_url', 'https://domain.com/your-icon.png'); - ``` - - - `mattermost_text` - notification message - ``` - set('mattermost_text', '_{{user}}_ deploying `{{branch}}` to **{{target}}**'); - ``` - - - `mattermost_success_text` – success template, default: - ``` - set('mattermost_success_text', 'Deploy to **{{target}}** successful {{mattermost_success_emoji}}'); - ``` - - - `mattermost_failure_text` – failure template, default: - ``` - set('mattermost_failure_text', 'Deploy to **{{target}}** failed {{mattermost_failure_emoji}}'); - ``` - - - `mattermost_success_emoji` – emoji added at the end of success text - - `mattermost_failure_emoji` – emoji added at the end of failure text - - For detailed information about Mattermost hooks see: https://developers.mattermost.com/integrate/incoming-webhooks/ - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'mattermost:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'mattermost:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'mattermost:notify:failure'); -``` - - - -## Configuration -### mattermost_webhook -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L80) - - - -```php title="Default value" -null -``` - - -### mattermost_channel -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L81) - - - -```php title="Default value" -null -``` - - -### mattermost_username -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L82) - - - -```php title="Default value" -'deployer' -``` - - -### mattermost_icon_url -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L83) - - - -```php title="Default value" -null -``` - - -### mattermost_success_emoji -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L85) - - - -```php title="Default value" -':​white_check_mark:' -``` - - -### mattermost_failure_emoji -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L86) - - - -```php title="Default value" -':​x:' -``` - - -### mattermost_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L88) - - - -```php title="Default value" -'_{{user}}_ deploying `{{branch}}` to **{{target}}**' -``` - - -### mattermost_success_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L89) - - - -```php title="Default value" -'Deploy to **{{target}}** successful {{mattermost_success_emoji}}' -``` - - -### mattermost_failure_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L90) - - - -```php title="Default value" -'Deploy to **{{target}}** failed {{mattermost_failure_emoji}}' -``` - - - -## Tasks - -### mattermost:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L93) - -Notifies mattermost. - - - - -### mattermost:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L114) - -Notifies mattermost about deploy finish. - - - - -### mattermost:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/mattermost.php#L135) - -Notifies mattermost about deploy failure. - - - - diff --git a/docs/contrib/ms-teams.md b/docs/contrib/ms-teams.md deleted file mode 100644 index e4332b478..000000000 --- a/docs/contrib/ms-teams.md +++ /dev/null @@ -1,183 +0,0 @@ - - - - -# Ms-teams Recipe - -```php -require 'contrib/ms-teams.php'; -``` - -[Source](/contrib/ms-teams.php) - - - -## Installing - -Require ms-teams recipe in your `deploy.php` file: - -Setup: -1. Open MS Teams -2. Navigate to Teams section -3. Select existing or create new team -4. Select existing or create new channel -5. Hover over channel to get tree dots, click, in menu select "Connectors" -6. Search for and configure "Incoming Webhook" -7. Confirm/create and copy your Webhook URL -8. Setup deploy.php - Add in header: -```php -require 'contrib/ms-teams.php'; -set('teams_webhook', 'https://outlook.office.com/webhook/...'); -``` -Add in content: -```php -before('deploy', 'teams:notify'); -after('deploy:success', 'teams:notify:success'); -after('deploy:failed', 'teams:notify:failure'); -``` -9.) Sip your coffee - -## Configuration - -- `teams_webhook` – teams incoming webhook url, **required** - ``` - set('teams_webhook', 'https://outlook.office.com/webhook/...'); - ``` -- `teams_title` – the title of application, default `{{application}}` -- `teams_text` – notification message template, markdown supported - ``` - set('teams_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*'); - ``` -- `teams_success_text` – success template, default: - ``` - set('teams_success_text', 'Deploy to *{{target}}* successful'); - ``` -- `teams_failure_text` – failure template, default: - ``` - set('teams_failure_text', 'Deploy to *{{target}}* failed'); - ``` - -- `teams_color` – color's attachment -- `teams_success_color` – success color's attachment -- `teams_failure_color` – failure color's attachment - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'teams:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'teams:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'teams:notify:failure'); -``` - - -## Configuration -### teams_title -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L78) - -Title of project - -```php title="Default value" -return get('application', 'Project'); -``` - - -### teams_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L83) - -Deploy message - -```php title="Default value" -'_{{user}}_ deploying `{{branch}}` to *{{target}}*' -``` - - -### teams_success_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L84) - - - -```php title="Default value" -'Deploy to *{{target}}* successful' -``` - - -### teams_failure_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L85) - - - -```php title="Default value" -'Deploy to *{{target}}* failed' -``` - - -### teams_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L88) - -Color of attachment - -```php title="Default value" -'#4d91f7' -``` - - -### teams_success_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L89) - - - -```php title="Default value" -'#00c100' -``` - - -### teams_failure_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L90) - - - -```php title="Default value" -'#ff0909' -``` - - - -## Tasks - -### teams:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L93) - -Notifies Teams. - - - - -### teams:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L107) - -Notifies Teams about deploy finish. - - - - -### teams:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/ms-teams.php#L121) - -Notifies Teams about deploy failure. - - - - diff --git a/docs/contrib/newrelic.md b/docs/contrib/newrelic.md deleted file mode 100644 index ccb9b48ef..000000000 --- a/docs/contrib/newrelic.md +++ /dev/null @@ -1,84 +0,0 @@ - - - - -# Newrelic Recipe - -```php -require 'contrib/newrelic.php'; -``` - -[Source](/contrib/newrelic.php) - - - -## Configuration - -- `newrelic_app_id` – newrelic's app id -- `newrelic_api_key` – newrelic's api key -- `newrelic_description` – message to send -- `newrelic_endpoint` – newrelic's REST API endpoint - -## Usage - -Since you should only notify New Relic of a successful deployment, the `newrelic:notify` task should be executed right at the end. - -```php -after('deploy', 'newrelic:notify'); -``` - - - -## Configuration -### newrelic_app_id -[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L23) - - -:::info Required -Throws exception if not set. -::: - - - - -### newrelic_description -[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L27) - - - -```php title="Default value" -return runLocally('git log -n 1 --format="%an: %s" | tr \'"\' "\'"'); -``` - - -### newrelic_revision -[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L31) - - - -```php title="Default value" -return runLocally('git log -n 1 --format="%h"'); -``` - - -### newrelic_endpoint -[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L35) - - - -```php title="Default value" -'api.newrelic.com' -``` - - - -## Tasks - -### newrelic:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/newrelic.php#L38) - -Notifies New Relic of deployment. - - - - diff --git a/docs/contrib/npm.md b/docs/contrib/npm.md deleted file mode 100644 index b8e4046ac..000000000 --- a/docs/contrib/npm.md +++ /dev/null @@ -1,52 +0,0 @@ - - - - -# Npm Recipe - -```php -require 'contrib/npm.php'; -``` - -[Source](/contrib/npm.php) - - - -## Configuration - -- `bin/npm` *(optional)*: set npm binary, automatically detected otherwise. - -## Usage - -```php -after('deploy:update_code', 'npm:install'); -``` - - - -## Configuration -### bin/npm -[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L16) - - - -```php title="Default value" -return which('npm'); -``` - - - -## Tasks - -### npm:install -[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L26) - -Installs npm packages. - -Uses `npm ci` command. This command is similar to npm install, -except it's meant to be used in automated environments such as -test platforms, continuous integration, and deployment -- or -any situation where you want to make sure you're doing a clean -install of your dependencies. - - diff --git a/docs/contrib/phinx.md b/docs/contrib/phinx.md deleted file mode 100644 index 8a1020da0..000000000 --- a/docs/contrib/phinx.md +++ /dev/null @@ -1,118 +0,0 @@ - - - - -# Phinx Recipe - -```php -require 'contrib/phinx.php'; -``` - -[Source](/contrib/phinx.php) - - - - -## Configuration options - -All options are in the config parameter `phinx` specified as an array (instead of the `phinx_path` variable). -All parameters are *optional*, but you can specify them with a dictionary (to change all parameters) -or by deployer dot notation (to change one option). - -### Phinx params - -- `phinx.environment` -- `phinx.date` -- `phinx.configuration` N.B. current directory is the project directory -- `phinx.target` -- `phinx.seed` -- `phinx.parser` -- `phinx.remove-all` (pass empty string as value) - -### Phinx path params - -- `phinx_path` Specify phinx path (by default phinx is searched for in $PATH, ./vendor/bin and ~/.composer/vendor/bin) - -### Example of usage - -```php -$phinx_env_vars = [ - 'environment' => 'development', - 'configuration' => './migration/.phinx.yml', - 'target' => '20120103083322', - 'remove-all' => '', -]; - -set('phinx_path', '/usr/local/phinx/bin/phinx'); -set('phinx', $phinx_env_vars); - -after('cleanup', 'phinx:migrate'); - -or set it for a specific server -host('dev') - ->user('user') - ->set('deploy_path', '/var/www') - ->set('phinx', $phinx_env_vars) - ->set('phinx_path', ''); -``` - -## Suggested Usage - -You can run all tasks before or after any -tasks (but you need to specify external configs for phinx). -If you use internal configs (which are in your project) you need -to run it after the `deploy:update_code` task is completed. - -## Read more - -For further reading see [phinx.org](https://phinx.org). Complete descriptions of all possible options can be found on the [commands page](http://docs.phinx.org/en/latest/commands.html). - - - -## Configuration -### bin/phinx -[Source](https://github.com/deployphp/deployer/blob/master/contrib/phinx.php#L80) - -Path to Phinx -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - - -## Tasks - -### phinx:migrate -[Source](https://github.com/deployphp/deployer/blob/master/contrib/phinx.php#L148) - -Migrats database with phinx. - - - - -### phinx:rollback -[Source](https://github.com/deployphp/deployer/blob/master/contrib/phinx.php#L169) - -Rollbacks database migrations with phinx. - - - - -### phinx:seed -[Source](https://github.com/deployphp/deployer/blob/master/contrib/phinx.php#L190) - -Seeds database with phinx. - - - - -### phinx:breakpoint -[Source](https://github.com/deployphp/deployer/blob/master/contrib/phinx.php#L210) - -Sets a migrations breakpoint with phinx. - - - - diff --git a/docs/contrib/php-fpm.md b/docs/contrib/php-fpm.md deleted file mode 100644 index f5ca98a20..000000000 --- a/docs/contrib/php-fpm.md +++ /dev/null @@ -1,75 +0,0 @@ - - - - -# Php-fpm Recipe - -```php -require 'contrib/php-fpm.php'; -``` - -[Source](/contrib/php-fpm.php) - - - - -:::caution -Do **not** reload php-fpm. Some user requests could fail or not complete in the -process of reloading. - -Instead, configure your server [properly](https://ï.at/avoid-php-fpm-reloading). If you're using Deployer's provision -recipe, it's already configured the right way and no php-fpm reload is needed. -::: - -## Configuration - -- `php_fpm_version` – The PHP-fpm version. For example: `8.0`. -- `php_fpm_service` – The full name of the PHP-fpm service. Defaults to `php{{php_fpm_version}}-fpm`. -- `php_fpm_command` – The command to run to reload PHP-fpm. Defaults to `sudo systemctl reload {{php_fpm_service}}`. - -## Usage - -Start by explicitely providing the current version of PHP-version using the `php_fpm_version`. -Alternatively, you may use any of the options above to configure how PHP-fpm should reload. - -Then, add the `php-fpm:reload` task at the end of your deployments by using the `after` method like so. - -```php -set('php_fpm_version', '8.0'); -after('deploy', 'php-fpm:reload'); -``` - - - -## Configuration -### php_fpm_version -[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L34) - -Automatically detects by using [bin/php](/docs/recipe/common.md#bin/php). - -```php title="Default value" -return run('{{bin/php}} -r "printf(\'%d.%d\', PHP_MAJOR_VERSION, PHP_MINOR_VERSION);"'); -``` - - -### php_fpm_service -[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L38) - - - -```php title="Default value" -'php{{php_fpm_version}}-fpm' -``` - - - -## Tasks - -### php-fpm:reload -[Source](https://github.com/deployphp/deployer/blob/master/contrib/php-fpm.php#L41) - -Reloads the php-fpm service. - - - - diff --git a/docs/contrib/rabbit.md b/docs/contrib/rabbit.md deleted file mode 100644 index 2a3302318..000000000 --- a/docs/contrib/rabbit.md +++ /dev/null @@ -1,73 +0,0 @@ - - - - -# Rabbit Recipe - -```php -require 'contrib/rabbit.php'; -``` - -[Source](/contrib/rabbit.php) - - - -### Installing - -```php -deploy.php - -require 'recipe/rabbit.php'; -``` - -### Configuration options - -- **rabbit** *(required)*: accepts an *array* with the connection information to [rabbitmq](http://www.rabbitmq.com) server token and team name. - - -You can provide also other configuration options: - - - *host* - default is localhost - - *port* - default is 5672 - - *username* - default is *guest* - - *password* - default is *guest* - - *channel* - no default value, need to be specified via config - - *message* - default is **Deployment to '{$host}' on *{$prod}* was successful\n($releasePath)** - - *vhost* - default is - - -```php -deploy.php - -set('rabbit', [ - 'host' => 'localhost', - 'port' => '5672', - 'username' => 'guest', - 'password' => 'guest', - 'channel' => 'notify-channel', - 'vhost' => '/my-app' -]); -``` - -### Suggested Usage - -Since you should only notify RabbitMQ channel of a successful deployment, the `deploy:rabbit` task should be executed right at the end. - -```php -deploy.php - -before('deploy:end', 'deploy:rabbit'); -``` - - - -## Tasks - -### deploy:rabbit -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rabbit.php#L58) - -Notifies RabbitMQ channel about deployment. - - - - diff --git a/docs/contrib/raygun.md b/docs/contrib/raygun.md deleted file mode 100644 index b37217e48..000000000 --- a/docs/contrib/raygun.md +++ /dev/null @@ -1,45 +0,0 @@ - - - - -# Raygun Recipe - -```php -require 'contrib/raygun.php'; -``` - -[Source](/contrib/raygun.php) - - - - -## Configuration - -- `raygun_api_key` – the API key of your Raygun application -- `raygun_version` – the version of your application that this deployment is releasing -- `raygun_owner_name` – the name of the person creating this deployment -- `raygun_email` – the email of the person creating this deployment -- `raygun_comment` – the deployment notes -- `raygun_scm_identifier` – the commit that this deployment was built off -- `raygun_scm_type` - the source control system you use - -## Usage - -To notify Raygun of a successful deployment, you can use the 'raygun:notify' task after a deployment. - -```php -after('deploy', 'raygun:notify'); -``` - - - -## Tasks - -### raygun:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/raygun.php#L27) - -Notifies Raygun of deployment. - - - - diff --git a/docs/contrib/rocketchat.md b/docs/contrib/rocketchat.md deleted file mode 100644 index e56773851..000000000 --- a/docs/contrib/rocketchat.md +++ /dev/null @@ -1,230 +0,0 @@ - - - - -# Rocketchat Recipe - -```php -require 'contrib/rocketchat.php'; -``` - -[Source](/contrib/rocketchat.php) - - - -## Installing - -Create a RocketChat incoming webhook, through the administration panel. - -Add hook on deploy: - -``` -before('deploy', 'rocketchat:notify'); -``` - -## Configuration - - - `rocketchat_webhook` - incoming rocketchat webook **required** - ``` - set('rocketchat_webhook', 'https://rocketchat.yourcompany.com/hooks/XXXXX'); - ``` - - - `rocketchat_title` - the title of the application, defaults to `{{application}}` - - `rocketchat_text` - notification message - ``` - set('rocketchat_text', '_{{user}}_ deploying {{branch}} to {{target}}'); - ``` - - - `rocketchat_success_text` – success template, default: - ``` - set('rocketchat_success_text', 'Deploy to *{{target}}* successful'); - ``` - - `rocketchat_failure_text` – failure template, default: - ``` - set('rocketchat_failure_text', 'Deploy to *{{target}}* failed'); - ``` - - - `rocketchat_color` – color's attachment - - `rocketchat_success_color` – success color's attachment - - `rocketchat_failure_color` – failure color's attachment - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'rocketchat:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'rocketchat:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'rocketchat:notify:failure'); -``` - - - -## Configuration -### rockchat_title -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L64) - - - -```php title="Default value" -return get('application', 'Project'); -``` - - -### rocketchat_icon_emoji -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L68) - - - -```php title="Default value" -':robot:' -``` - - -### rocketchat_icon_url -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L69) - - - -```php title="Default value" -null -``` - - -### rocketchat_channel -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L71) - - - -```php title="Default value" -null -``` - - -### rocketchat_room_id -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L72) - - - -```php title="Default value" -null -``` - - -### rocketchat_username -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L73) - - - -```php title="Default value" -null -``` - - -### rocketchat_webhook -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L74) - - - -```php title="Default value" -null -``` - - -### rocketchat_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L76) - - - -```php title="Default value" -'#000000' -``` - - -### rocketchat_success_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L77) - - - -```php title="Default value" -'#00c100' -``` - - -### rocketchat_failure_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L78) - - - -```php title="Default value" -'#ff0909' -``` - - -### rocketchat_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L80) - - - -```php title="Default value" -'_{{user}}_ deploying `{{branch}}` to *{{target}}*' -``` - - -### rocketchat_success_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L81) - - - -```php title="Default value" -'Deploy to *{{target}}* successful' -``` - - -### rocketchat_failure_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L82) - - - -```php title="Default value" -'Deploy to *{{target}}* failed' -``` - - - -## Tasks - -### rocketchat:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L85) - -Notifies RocketChat. - - - - -### rocketchat:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L115) - -Notifies RocketChat about deploy finish. - - - - -### rocketchat:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rocketchat.php#L145) - -Notifies RocketChat about deploy failure. - - - - diff --git a/docs/contrib/rollbar.md b/docs/contrib/rollbar.md deleted file mode 100644 index ec32b1c13..000000000 --- a/docs/contrib/rollbar.md +++ /dev/null @@ -1,56 +0,0 @@ - - - - -# Rollbar Recipe - -```php -require 'contrib/rollbar.php'; -``` - -[Source](/contrib/rollbar.php) - - - - -## Configuration - -- `rollbar_token` – access token to rollbar api -- `rollbar_comment` – comment about deploy, default to - ```php - set('rollbar_comment', '_{{user}}_ deploying `{{branch}}` to *{{target}}*'); - ``` -- `rollbar_username` – rollbar user name - -## Usage - -Since you should only notify Rollbar channel of a successful deployment, the `rollbar:notify` task should be executed right at the end. - -```php -after('deploy', 'rollbar:notify'); -``` - - - -## Configuration -### rollbar_comment -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rollbar.php#L26) - - - -```php title="Default value" -'_{{user}}_ deploying `{{branch}}` to *{{target}}*' -``` - - - -## Tasks - -### rollbar:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rollbar.php#L29) - -Notifies Rollbar of deployment. - - - - diff --git a/docs/contrib/rsync.md b/docs/contrib/rsync.md deleted file mode 100644 index 310910704..000000000 --- a/docs/contrib/rsync.md +++ /dev/null @@ -1,233 +0,0 @@ - - - - -# Rsync Recipe - -```php -require 'contrib/rsync.php'; -``` - -[Source](/contrib/rsync.php) - - - -:::warning -This must not be confused with `/src/Utility/Rsync.php`, deployer's built-in rsync. Their configuration options are also very different, read carefully below. -::: - -## Configuration options - -- **rsync**: Accepts an array with following rsync options (all are optional and defaults are ok): - - *exclude*: accepts an *array* with patterns to be excluded from sending to server - - *exclude-file*: accepts a *string* containing absolute path to file, which contains exclude patterns - - *include*: accepts an *array* with patterns to be included in sending to server - - *include-file*: accepts a *string* containing absolute path to file, which contains include patterns - - *filter*: accepts an *array* of rsync filter rules - - *filter-file*: accepts a *string* containing merge-file filename. - - *filter-perdir*: accepts a *string* containing merge-file filename to be scanned and merger per each directory in rsync list on files to send - - *flags*: accepts a *string* of flags to set when calling rsync command. Please **avoid** flags that accept params, and use *options* instead. - - *options*: accepts an *array* of options to set when calling rsync command. **DO NOT** prefix options with `--` as it's automatically added. - - *timeout*: accepts an *int* defining timeout for rsync command to run locally. - -### Sample Configuration: - -Following is default configuration. By default rsync ignores only git dir and `deploy.php` file. - -```php -deploy.php - -set('rsync',[ - 'exclude' => [ - '.git', - 'deploy.php', - ], - 'exclude-file' => false, - 'include' => [], - 'include-file' => false, - 'filter' => [], - 'filter-file' => false, - 'filter-perdir'=> false, - 'flags' => 'rz', // Recursive, with compress - 'options' => ['delete'], - 'timeout' => 60, -]); -``` - -If You have multiple excludes, You can put them in file and reference that instead. If You use `deploy:rsync_warmup` You could set additional options that could speed-up and/or affect way things are working. For example: - -```php -deploy.php - -set('rsync',[ - 'exclude' => ['excludes_file'], - 'exclude-file' => '/tmp/localdeploys/excludes_file', //Use absolute path to avoid possible rsync problems - 'include' => [], - 'include-file' => false, - 'filter' => [], - 'filter-file' => false, - 'filter-perdir' => false, - 'flags' => 'rzcE', // Recursive, with compress, check based on checksum rather than time/size, preserve Executable flag - 'options' => ['delete', 'delete-after', 'force'], //Delete after successful transfer, delete even if deleted dir is not empty - 'timeout' => 3600, //for those huge repos or crappy connection -]); -``` - - -### Parameter - -- **rsync_src**: per-host rsync source. This can be server, stage or whatever-dependent. By default it's set to current directory -- **rsync_dest**: per-host rsync destination. This can be server, stage or whatever-dependent. by default it's equivalent to release deploy destination. - -### Sample configurations: - -This is default configuration: - -```php -set('rsync_src', __DIR__); -set('rsync_dest','{{release_path}}'); -``` - -If You use local deploy recipe You can set src to local release: - -```php -host('hostname') - ->hostname('10.10.10.10') - ->port(22) - ->set('deploy_path','/your/remote/path/app') - ->set('rsync_src', '/your/local/path/app') - ->set('rsync_dest','{{release_path}}'); -``` - -## Usage - -- `rsync` task - - Set `rsync_src` to locally cloned repository and rsync to `rsync_dest`. Then set this task instead of `deploy:update_code` in Your `deploy` task if Your hosting provider does not allow git. - -- `rsync:warmup` task - - If Your deploy task looks like: - - ```php - task('deploy', [ - 'deploy:prepare', - 'deploy:release', - 'rsync', - 'deploy:vendors', - 'deploy:symlink', - ])->desc('Deploy your project'); - ``` - - And Your `rsync_dest` is set to `{{release_path}}` then You could add this task to run before `rsync` task or after `deploy:release`, whatever is more convenient. - - - -## Configuration -### rsync -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L119) - - - -```php title="Default value" -[ - 'exclude' => [ - '.git', - 'deploy.php', - ], - 'exclude-file' => false, - 'include' => [], - 'include-file' => false, - 'filter' => [], - 'filter-file' => false, - 'filter-perdir' => false, - 'flags' => 'rz', - 'options' => ['delete'], - 'timeout' => 300, -] -``` - - -### rsync_src -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L135) - - - -```php title="Default value" -__DIR__ -``` - - -### rsync_dest -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L136) - - - -```php title="Default value" -'{{release_path}}' -``` - - -### rsync_excludes -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L138) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### rsync_includes -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L153) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### rsync_filter -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L168) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### rsync_options -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L186) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - - -## Tasks - -### rsync:warmup -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L198) - -Warmups remote Rsync target. - - - - -### rsync -[Source](https://github.com/deployphp/deployer/blob/master/contrib/rsync.php#L213) - -Rsync local->remote. - - - - diff --git a/docs/contrib/sentry.md b/docs/contrib/sentry.md deleted file mode 100644 index e4e4493d4..000000000 --- a/docs/contrib/sentry.md +++ /dev/null @@ -1,70 +0,0 @@ - - - - -# Sentry Recipe - -```php -require 'contrib/sentry.php'; -``` - -[Source](/contrib/sentry.php) - - - - -### Configuration options - -- **organization** *(required)*: the slug of the organization the release belongs to. -- **projects** *(required)*: array of slugs of the projects to create a release for. -- **token** *(required)*: authentication token. Can be created at [https://sentry.io/settings/account/api/auth-tokens/] -- **version** *(required)* – a version identifier for this release. -Can be a version number, a commit hash etc. (Defaults is set to git log -n 1 --format="%h".) -- **version_prefix** *(optional)* - a string prefixed to version. -Releases are global per organization so indipentent projects needs to prefix version number with unique string to avoid conflicts -- **environment** *(optional)* - the environment you’re deploying to. By default framework's environment is used. -For example for symfony, *symfony_env* configuration is read otherwise defaults to 'prod'. -- **ref** *(optional)* – an optional commit reference. This is useful if a tagged version has been provided. -- **refs** *(optional)* - array to indicate the start and end commits for each repository included in a release. -Head commits must include parameters *repository* and *commit*) (the HEAD sha). -They can optionally include *previousCommit* (the sha of the HEAD of the previous release), -which should be specified if this is the first time you’ve sent commit data. -- **commits** *(optional)* - array commits data to be associated with the release. -Commits must include parameters *id* (the sha of the commit), and can optionally include *repository*, -*message*, *author_name*, *author_email* and *timestamp*. By default will send all new commits, -unless it's a first release, then only first 200 will be sent. -- **url** *(optional)* – a URL that points to the release. This can be the path to an online interface to the sourcecode for instance. -- **date_released** *(optional)* – date that indicates when the release went live. If not provided the current time is assumed. -- **sentry_server** *(optional)* – sentry server (if you host it yourself). defaults to hosted sentry service. -- **date_deploy_started** *(optional)* - date that indicates when the deploy started. Defaults to current time. -- **date_deploy_finished** *(optional)* - date that indicates when the deploy ended. If not provided, the current time is used. -- **deploy_name** *(optional)* - name of the deploy -- **git_version_command** *(optional)* - the command that retrieves the git version information (Defaults is set to git log -n 1 --format="%h", other options are git describe --tags --abbrev=0) - -```php -deploy.php - -set('sentry', [ - 'organization' => 'exampleorg', - 'projects' => [ - 'exampleproj' - ], - 'token' => 'd47828...', - 'version' => '0.0.1', - -]); -``` - -### Suggested Usage - -Since you should only notify Sentry of a successful deployment, the deploy:sentry task should be executed right at the end. - -```php -deploy.php - -after('deploy', 'deploy:sentry'); -``` - - - - diff --git a/docs/contrib/slack.md b/docs/contrib/slack.md deleted file mode 100644 index 77cbb34f1..000000000 --- a/docs/contrib/slack.md +++ /dev/null @@ -1,219 +0,0 @@ - - - - -# Slack Recipe - -```php -require 'contrib/slack.php'; -``` - -[Source](/contrib/slack.php) - - - -## Installing - -Add to Slack - - -Add hook on deploy: - -```php -before('deploy', 'slack:notify'); -``` - -## Configuration - -- `slack_webhook` – slack incoming webhook url, **required** - ``` - set('slack_webhook', 'https://hooks.slack.com/...'); - ``` -- `slack_channel` - channel to send notification to. The default is the channel configured in the webhook -- `slack_title` – the title of application, default `{{application}}` -- `slack_text` – notification message template, markdown supported - ``` - set('slack_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*'); - ``` -- `slack_success_text` – success template, default: - ``` - set('slack_success_text', 'Deploy to *{{target}}* successful'); - ``` -- `slack_failure_text` – failure template, default: - ``` - set('slack_failure_text', 'Deploy to *{{target}}* failed'); - ``` - -- `slack_color` – color's attachment -- `slack_success_color` – success color's attachment -- `slack_failure_color` – failure color's attachment -- `slack_fields` - set attachments fields for pretty output in Slack, default: - ``` - set('slack_fields', []); - ``` - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'slack:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'slack:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'slack:notify:failure'); -``` - - - -## Configuration -### slack_channel -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L69) - -Channel to publish to, when false the default channel the webhook will be used - -```php title="Default value" -false -``` - - -### slack_title -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L72) - -Title of project - -```php title="Default value" -return get('application', 'Project'); -``` - - -### slack_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L77) - -Deploy message - -```php title="Default value" -'_{{user}}_ deploying `{{target}}` to *{{hostname}}*' -``` - - -### slack_success_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L78) - - - -```php title="Default value" -'Deploy to *{{target}}* successful' -``` - - -### slack_failure_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L79) - - - -```php title="Default value" -'Deploy to *{{target}}* failed' -``` - - -### slack_rollback_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L80) - - - -```php title="Default value" -'_{{user}}_ rolled back changes on *{{target}}*' -``` - - -### slack_fields -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L81) - - - - - -### slack_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L84) - -Color of attachment - -```php title="Default value" -'#4d91f7' -``` - - -### slack_success_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L85) - - - -```php title="Default value" -'#00c100' -``` - - -### slack_failure_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L86) - - - -```php title="Default value" -'#ff0909' -``` - - -### slack_rollback_color -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L87) - - - -```php title="Default value" -'#eba211' -``` - - - -## Tasks - -### slack:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L99) - -Notifies Slack. - - - - -### slack:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L118) - -Notifies Slack about deploy finish. - - - - -### slack:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L138) - -Notifies Slack about deploy failure. - - - - -### slack:notify:rollback -[Source](https://github.com/deployphp/deployer/blob/master/contrib/slack.php#L157) - -Notifies Slack about rollback. - - - - diff --git a/docs/contrib/telegram.md b/docs/contrib/telegram.md deleted file mode 100644 index 45ac897fe..000000000 --- a/docs/contrib/telegram.md +++ /dev/null @@ -1,155 +0,0 @@ - - - - -# Telegram Recipe - -```php -require 'contrib/telegram.php'; -``` - -[Source](/contrib/telegram.php) - - - -## Installing - 1. Create telegram bot with [BotFather](https://t.me/BotFather) and grab the token provided - 2. Send `/start` to your bot and open https://api.telegram.org/bot{$TELEGRAM_TOKEN_HERE}/getUpdates - 3. Take chat_id from response - - -Add hook on deploy: - -```php -before('deploy', 'telegram:notify'); -``` - -## Configuration - -- `telegram_token` – telegram bot token, **required** -- `telegram_chat_id` — chat ID to push messages to -- `telegram_proxy` - proxy connection string in [CURLOPT_PROXY](https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html) form like: - ``` - http://proxy:80 - socks5://user:password@host:3128 - ``` -- `telegram_title` – the title of application, default `{{application}}` -- `telegram_text` – notification message template - ``` - _{{user}}_ deploying `{{branch}}` to *{{target}}* - ``` -- `telegram_success_text` – success template, default: - ``` - Deploy to *{{target}}* successful - - ``` -- `telegram_failure_text` – failure template, default: - ``` - Deploy to *{{target}}* failed - ``` - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'telegram:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'telegram:notify:success'); -``` -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'telegram:notify:failure'); - - - - -## Configuration -### telegram_title -[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L63) - -Title of project - -```php title="Default value" -return get('application', 'Project'); -``` - - -### telegram_token -[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L68) - -Telegram settings -:::info Required -Throws exception if not set. -::: - - - - -### telegram_chat_id -[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L71) - - -:::info Required -Throws exception if not set. -::: - - - - -### telegram_url -[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L74) - - - -```php title="Default value" -return 'https://api.telegram.org/bot' . get('telegram_token') . '/sendmessage'; -``` - - -### telegram_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L79) - -Deploy message - -```php title="Default value" -'_{{user}}_ deploying `{{branch}}` to *{{target}}*' -``` - - -### telegram_success_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L80) - - - -```php title="Default value" -'Deploy to *{{target}}* successful' -``` - - -### telegram_failure_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L81) - - - -```php title="Default value" -'Deploy to *{{target}}* failed' -``` - - - -## Tasks - -### telegram:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L85) - -Notifies Telegram. - - - - diff --git a/docs/contrib/webpack_encore.md b/docs/contrib/webpack_encore.md deleted file mode 100644 index 929908709..000000000 --- a/docs/contrib/webpack_encore.md +++ /dev/null @@ -1,67 +0,0 @@ - - - - -# Webpack Encore Recipe - -```php -require 'contrib/webpack_encore.php'; -``` - -[Source](/contrib/webpack_encore.php) - -* Requires - * [npm](/docs/contrib/npm.md) - * [yarn](/docs/contrib/yarn.md) - - - -## Configuration - -- **webpack_encore/package_manager** *(optional)*: set yarn or npm. We try to find if yarn or npm is available and used. - -## Usage - -```php -For Yarn -after('deploy:update_code', 'yarn:install'); -For npm -after('deploy:update_code', 'npm:install'); - -after('deploy:update_code', 'webpack_encore:build'); -``` - - -## Configuration -### webpack_encore/package_manager -[Source](https://github.com/deployphp/deployer/blob/master/contrib/webpack_encore.php#L24) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### webpack_encore/env -[Source](https://github.com/deployphp/deployer/blob/master/contrib/webpack_encore.php#L32) - - - -```php title="Default value" -'production' -``` - - - -## Tasks - -### webpack_encore:build -[Source](https://github.com/deployphp/deployer/blob/master/contrib/webpack_encore.php#L35) - -Runs webpack encore build. - - - - diff --git a/docs/contrib/workplace.md b/docs/contrib/workplace.md deleted file mode 100644 index 1664d15ea..000000000 --- a/docs/contrib/workplace.md +++ /dev/null @@ -1,145 +0,0 @@ - - - - -# Workplace Recipe - -```php -require 'contrib/workplace.php'; -``` - -[Source](/contrib/workplace.php) - - - -This recipes works with Custom Integrations and Publishing Bots. - - -Add hook on deploy: - -``` -before('deploy', 'workplace:notify'); -``` - -## Configuration - - - `workplace_webhook` - incoming workplace webhook **required** - ``` - // With custom integration - set('workplace_webhook', 'https://graph.facebook.com//feed?access_token='); - - // With publishing bot - set('workplace_webhook', 'https://graph.facebook.com/v3.0/group/feed?access_token='); - - // Use markdown on message - set('workplace_webhook', 'https://graph.facebook.com//feed?access_token=&formatting=MARKDOWN'); - ``` - - - `workplace_text` - notification message - ``` - set('workplace_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*'); - ``` - - - `workplace_success_text` – success template, default: - ``` - set('workplace_success_text', 'Deploy to *{{target}}* successful'); - ``` - - `workplace_failure_text` – failure template, default: - ``` - set('workplace_failure_text', 'Deploy to *{{target}}* failed'); - ``` - - `workplace_edit_post` – whether to create a new post for deploy result, or edit the first one created, default creates a new post: - ``` - set('workplace_edit_post', false); - ``` - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'workplace:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'workplace:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'workplace:notify:failure'); -``` - - - -## Configuration -### workplace_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/workplace.php#L70) - -Deploy message - -```php title="Default value" -'_{{user}}_ deploying `{{branch}}` to *{{target}}*' -``` - - -### workplace_success_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/workplace.php#L71) - - - -```php title="Default value" -'Deploy to *{{target}}* successful' -``` - - -### workplace_failure_text -[Source](https://github.com/deployphp/deployer/blob/master/contrib/workplace.php#L72) - - - -```php title="Default value" -'Deploy to *{{target}}* failed' -``` - - -### workplace_edit_post -[Source](https://github.com/deployphp/deployer/blob/master/contrib/workplace.php#L75) - -By default, create a new post for every message - -```php title="Default value" -false -``` - - - -## Tasks - -### workplace:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/workplace.php#L78) - -Notifies Workplace. - - - - -### workplace:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/workplace.php#L102) - -Notifies Workplace about deploy finish. - - - - -### workplace:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/workplace.php#L113) - -Notifies Workplace about deploy failure. - - - - diff --git a/docs/contrib/yammer.md b/docs/contrib/yammer.md deleted file mode 100644 index 4fe6eab96..000000000 --- a/docs/contrib/yammer.md +++ /dev/null @@ -1,140 +0,0 @@ - - - - -# Yammer Recipe - -```php -require 'contrib/yammer.php'; -``` - -[Source](/contrib/yammer.php) - - - - -Add hook on deploy: - -```php -before('deploy', 'yammer:notify'); -``` - -## Configuration - -- `yammer_url` – The URL to the message endpoint, default is https://www.yammer.com/api/v1/messages.json -- `yammer_token` *(required)* – Yammer auth token -- `yammer_group_id` *(required)* - Group ID -- `yammer_title` – the title of application, default `{{application}}` -- `yammer_body` – notification message template, default: - ``` - {{user}} deploying {{branch}} to {{target}} - ``` -- `yammer_success_body` – success template, default: - ``` - Deploy to {{target}} successful - ``` -- `yammer_failure_body` – failure template, default: - ``` - Deploy to {{target}} failed - ``` - -## Usage - -If you want to notify only about beginning of deployment add this line only: - -```php -before('deploy', 'yammer:notify'); -``` - -If you want to notify about successful end of deployment add this too: - -```php -after('deploy:success', 'yammer:notify:success'); -``` - -If you want to notify about failed deployment add this too: - -```php -after('deploy:failed', 'yammer:notify:failure'); -``` - - - -## Configuration -### yammer_url -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L54) - - - -```php title="Default value" -'https://www.yammer.com/api/v1/messages.json' -``` - - -### yammer_title -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L57) - -Title of project - -```php title="Default value" -return get('application', 'Project'); -``` - - -### yammer_body -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L62) - -Deploy message - -```php title="Default value" -'{{user}} deploying {{branch}} to {{target}}' -``` - - -### yammer_success_body -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L63) - - - -```php title="Default value" -'Deploy to {{target}} successful' -``` - - -### yammer_failure_body -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L64) - - - -```php title="Default value" -'Deploy to {{target}} failed' -``` - - - -## Tasks - -### yammer:notify -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L67) - -Notifies Yammer. - - - - -### yammer:notify:success -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L86) - -Notifies Yammer about deploy finish. - - - - -### yammer:notify:failure -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L105) - -Notifies Yammer about deploy failure. - - - - diff --git a/docs/contrib/yarn.md b/docs/contrib/yarn.md deleted file mode 100644 index 8007fbe1b..000000000 --- a/docs/contrib/yarn.md +++ /dev/null @@ -1,47 +0,0 @@ - - - - -# Yarn Recipe - -```php -require 'contrib/yarn.php'; -``` - -[Source](/contrib/yarn.php) - - - -## Configuration - -- **bin/yarn** *(optional)*: set Yarn binary, automatically detected otherwise. - -## Usage - -```php -after('deploy:update_code', 'yarn:install'); -``` - - -## Configuration -### bin/yarn -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yarn.php#L15) - - - -```php title="Default value" -return which('yarn'); -``` - - - -## Tasks - -### yarn:install -[Source](https://github.com/deployphp/deployer/blob/master/contrib/yarn.php#L21) - -Installs Yarn packages. - -In there is a {{previous_release}}, node_modules will be copied from it before installing deps with yarn. - - diff --git a/docs/getting-started.md b/docs/getting-started.md deleted file mode 100755 index b8976b7e9..000000000 --- a/docs/getting-started.md +++ /dev/null @@ -1,164 +0,0 @@ -# Getting Started - -In this tutorial we will cover: - -- Setting up a new host with provision recipe. -- Configuring a deployment and perfoming our first deploy. - -First, [install the Deployer](installation.md): - -Now lets cd into the project and run the following command: - -```sh -dep init -``` - -Deployer will ask you a few question and after finishing you will have a -**deploy.php** or **deploy.yaml** file. This is our deployment recipe. -It contains hosts, tasks and requires other recipes. All framework recipes -that come with Deployer are based on the [common](recipe/common.md) recipe. - -## Provision - -:::note -If you already have a configured webserver you may skip to -[deployment](#deploy). -::: - -Let's create a new VPS on Linode, DigitalOcean, Vultr, AWS, GCP, etc. - -Make sure the image is **Ubuntu 20.04 LTS** as this version is supported via -Deployer [provision](recipe/provision.md) recipe. - -:::tip -Configure Reverse DNS or RDNS on your server. This will allow you to ssh into -server using the domain name instead of the IP address. -::: - -Our **deploy.php** recipe contains a host definition with few important params: - -- `remote_user` user's name for ssh connection, -- `deploy_path` host's path where we are going to deploy. - -Let's set `remote_user` to be `deployer`. Right now our new server probably only has the `root` user. The provision recipe will -create and configure a `deployer` user for us. - -```php -host('example.org') - ->set('remote_user', 'deployer') - ->set('deploy_path', '~/example'); -``` - -To connect to the remote host we need to specify an identity key or private key. -We can add our identity key directly into the host definition, but it's better to put it -in the **~/.ssh/config** file: - -``` -Host * - IdentityFile ~/.ssh/id_rsa -``` - -Now let's provision our server. As our host doesn't have user `deployer`, -we are going to override `remote_user` for provision via `-o remote_user=root`. - -```sh -dep provision -o remote_user=root -``` - -:::tip -If your server doesn't have a `root` user but your remote user can use `sudo` to -become root, then use: - -```sh -dep provision -o become=root -``` - -::: - -Deployer will ask you a few questions during provisioning: php version, -database type, etc. Next Deployer will configure our server and create -the `deployer` user. Provision takes around **5 minutes** and will install -everything we need to run a website. A new website will be configured -at [deploy_path](recipe/common.md#deploy_path). - -After we have configured the webserver, let's deploy the project. - -## Deploy - -To deploy the project: - -```sh -dep deploy -``` - -If deploy failed, Deployer will print an error message and which command was unsuccessful. -Most likely we need to configure the correct database credentials in _.env_ file or similar. - -Ssh to the host, for example, for editing _.env_ file: - -```sh -dep ssh -``` - -After everything is configured properly we can resume our deployment from the -place it stopped. However, this is not required; we can just start a new deploy: - -``` -dep deploy --start-from deploy:migrate -``` - -After our first successful deployment, we can find the following directory structure on our server: - -``` -~/example // The deploy_path. - |- current -> releases/1 // Symlink to the current release. - |- releases // Dir for all releases. - |- 1 // Actual files location. - |- ... - |- .env -> shared/.env // Symlink to shared .env file. - |- shared // Dirs for shared files between releases. - |- ... - |- .env // Example: shared .env file. - |- .dep // Deployer configuration files. -``` - -Configure you webserver to serve the `current` directory. For example, for nginx: - -``` -root /home/deployer/example/current/public; -index index.php; -location / { - try_files $uri $uri/ /index.php?$query_string; -} -``` - -If you're using provision recipe, Deployer will automatically configure the Caddy -webserver to serve from the [public_path](/docs/recipe/provision/website.md#public_path). - -Now let's add a build step on our host: - -```php -task('build', function () { - cd('{{release_path}}'); - run('npm install'); - run('npm run prod'); -}); - -after('deploy:update_code', 'build'); -``` - -Deployer has a useful task for examining what is currently deployed. - -``` -$ dep releases -task releases -+---------------------+--------- deployer.org -------+--------+-----------+ -| Date (UTC) | Release | Author | Target | Commit | -+---------------------+-------------+----------------+--------+-----------+ -| 2021-11-05 14:00:22 | 1 (current) | Anton Medvedev | HEAD | 943ded2be | -+---------------------+-------------+----------------+--------+-----------+ -``` - -:::tip -During development, the [dep push](recipe/deploy/push.md) task maybe useful. -::: diff --git a/docs/hosts.md b/docs/hosts.md deleted file mode 100644 index c314913f0..000000000 --- a/docs/hosts.md +++ /dev/null @@ -1,189 +0,0 @@ -# Hosts - -To define a new host use the [host()](api.md#host) function. Deployer keeps a list of -all defined hosts in the `Deployer::get()->hosts` collection. - -```php -host('example.org'); -``` - -Each host contains it's own configuration key-value pairs. The [host()](api.md#host) -call defines two important configs: **alias** and **hostname**. - -- **hostname** - used when connecting to remote host. -- **alias** - used as a key in `Deployer::get()->hosts` collection. - -```php -task('test', function () { - writeln('The {{alias}} is {{hostname}}'); -}); -``` - -``` -$ dep test -[example.org] The example.org is example.org -``` - -We can override hostname via `set()` method: - -```php -host('example.org') - ->set('hostname', 'example.cloud.google.com'); -``` - -The hostname will be used for the ssh connection, but the host will be referred -by its alias when running Deployer. - -``` -$ dep test -[example.org] The example.org is example.cloud.google.com -``` - -Another important ssh connection parameter is `remote_user`. - -```php -host('example.org') - ->set('hostname', 'example.cloud.google.com') - ->set('remote_user', 'deployer'); -``` - -Now Deployer will connect using something like -`ssh deployer@example.cloud.google.com` to establishing connection. - -Also, Deployer's `Host` class has special setter methods (for better IDE -autocompletion). - -```php -host('example.org') - ->setHostname('example.cloud.google.com') - ->setRemoteUser('deployer'); -``` - -## Host config - -### `alias` - -The identifier used to identify a host. -You can use actual hostname or something like `prod` or `staging`. - -### `hostname` - -Deployer uses this config for actual ssh connection. - -### `remote_user` - -Deployer uses this config for actual ssh connection. If not specified, -Deployer will be using `RemoteUser` from **~/.ssh/config** file, or current -OS username. - -### `port` - -Port of remote ssh server to connect to. Default is `22`. - -### `config_file` - -Default is `~/.ssh/config`. - -:::info Config file -It is a good practice to keep connection parameters out of `deploy.php` file, as -they can change depending on where the deploy is executed from. Only specify -`hostname` and `remote_user` and other keep in `~/.ssh/config`: - -``` -Host * - IdentityFile ~/.ssh/id_rsa -``` - -::: - -### `identity_file` - -For example, `~/.ssh/id_rsa`. - -### `forward_agent` - -SSH forwarding is a way to securely tunnel network connections from your local computer to a remote server, and from the remote server to another destination. There are several types of SSH forwarding, including local, remote, and dynamic forwarding. SSH agent forwarding is a specific type of local forwarding that allows you to use your local SSH keys to authenticate on remote servers. This can be useful if you want to use your local SSH keys to connect to a remote server, but don't want to copy your keys to the remote server. - -Default is `true`. - -### `ssh_multiplexing` - -SSH multiplexing is a technique that allows a single Secure Shell (SSH) connection to be used for multiple interactive sessions or for multiple tunneled connections. This can be useful in a number of situations, such as when you want to open multiple terminal sessions to a remote server over a single SSH connection, or when you want to establish multiple secure connections to a remote server but don't want to open multiple SSH connections. - -Default is `true`. - -### `shell` - -Default is `bash -ls`. - -### `deploy_path` - -For example, `~/myapp`. - -### `labels` - -Key-value pairs for host selector. - -### `ssh_arguments` - -For example, `['-o UserKnownHostsFile=/dev/null']` - -### `ssh_control_path` - -Default is `~/.ssh/%C`. - -If **CI** env is present, default value is `/dev/shm/%C`. - -## Multiple hosts - -You can pass multiple hosts to the host function: - -```php -host('example.org', 'deployer.org', ...) - ->setRemoteUser('anton'); -``` - -## Host ranges - -If you have a lot of hosts following similar patterns, you can describe them -like this rather than listing each hostname: - -```php -host('www[01:50].example.org'); -``` - -For numeric patterns, leading zeros can be included or removed, as desired. -Ranges are inclusive. - -You can also define alphabetic ranges: - -```php -host('db[a:f].example.org'); -``` - -## Localhost - -The [localhost()](api.md#localhost) function defines a special local host. -Deployer will not connect to this host, but will execute commands locally instead. - -```php -localhost(); // Alias and hostname will be "localhost". -localhost('ci'); // Alias is "ci", hostname is "localhost". -``` - -## YAML Inventory - -You can use the [import()](api.md#import) function to keep host definitions in a -separate file. For example, _inventory.yaml_. - -```php title="deploy.php" -import('inventory.yaml'); -``` - -```yaml title="inventory.yaml" -hosts: - example.org: - remote_user: deployer - deployer.org: - remote_user: deployer -``` diff --git a/docs/installation.md b/docs/installation.md deleted file mode 100755 index e53880ebc..000000000 --- a/docs/installation.md +++ /dev/null @@ -1,31 +0,0 @@ -# Installation - -To install Deployer, run next command in your project dir: - -``` -composer require --dev deployer/deployer -``` - -To initialize deployer in your project run: - -``` -vendor/bin/dep init -``` - -:::tip Bash integration -Add next alias to your _.bashrc_ file: - -```bash -alias dep='vendor/bin/dep' -``` - -Deployer comes with autocomplete support for task names, options, and hosts. - -Run the next command to add bash completion support: - -``` -dep completion bash > /etc/bash_completion.d/deployer -``` - -Make sure what your _.bashrc_ file includes generated file in some way. -::: diff --git a/docs/recipe/README.md b/docs/recipe/README.md deleted file mode 100644 index 05a922165..000000000 --- a/docs/recipe/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# All Recipes - -* [Cakephp Recipe](/docs/recipe/cakephp.md) -* [Codeigniter Recipe](/docs/recipe/codeigniter.md) -* [Common Recipe](/docs/recipe/common.md) -* [Composer Recipe](/docs/recipe/composer.md) -* [Contao Recipe](/docs/recipe/contao.md) -* [Craftcms Recipe](/docs/recipe/craftcms.md) -* [Drupal 7 Recipe](/docs/recipe/drupal7.md) -* [Drupal 8 Recipe](/docs/recipe/drupal8.md) -* [Flow Framework Recipe](/docs/recipe/flow_framework.md) -* [Fuelphp Recipe](/docs/recipe/fuelphp.md) -* [Joomla Recipe](/docs/recipe/joomla.md) -* [Laravel Recipe](/docs/recipe/laravel.md) -* [Magento 2 Recipe](/docs/recipe/magento2.md) -* [Magento Recipe](/docs/recipe/magento.md) -* [Pimcore Recipe](/docs/recipe/pimcore.md) -* [Prestashop Recipe](/docs/recipe/prestashop.md) -* [Provision Recipe](/docs/recipe/provision.md) -* [Shopware Recipe](/docs/recipe/shopware.md) -* [Silverstripe Recipe](/docs/recipe/silverstripe.md) -* [Statamic Recipe](/docs/recipe/statamic.md) -* [Sulu Recipe](/docs/recipe/sulu.md) -* [Symfony Recipe](/docs/recipe/symfony.md) -* [TYPO3 Recipe](/docs/recipe/typo3.md) -* [WordPress Recipe](/docs/recipe/wordpress.md) -* [Yii2 Recipe](/docs/recipe/yii.md) -* [Zend Framework Recipe](/docs/recipe/zend_framework.md) \ No newline at end of file diff --git a/docs/recipe/cakephp.md b/docs/recipe/cakephp.md deleted file mode 100644 index ba1374cee..000000000 --- a/docs/recipe/cakephp.md +++ /dev/null @@ -1,116 +0,0 @@ - - - - -# How to Deploy a Cakephp Project - -```php -require 'recipe/cakephp.php'; -``` - -[Source](/recipe/cakephp.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Cakephp application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Cakephp** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:init](/docs/recipe/cakephp.md#deployinit) – -* [deploy:run_migrations](/docs/recipe/cakephp.md#deployrun_migrations) – -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The cakephp recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/cakephp.php#L13) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -CakePHP 4 Project Template shared dirs - -```php title="Default value" -[ - 'logs', - 'tmp', -] -``` - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/cakephp.php#L19) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - -CakePHP 4 Project Template shared files - -```php title="Default value" -[ - 'config/.env', - 'config/app.php', -] -``` - - - -## Tasks - -### deploy:init -[Source](https://github.com/deployphp/deployer/blob/master/recipe/cakephp.php#L27) - - - -Create plugins' symlinks - - -### deploy:run_migrations -[Source](https://github.com/deployphp/deployer/blob/master/recipe/cakephp.php#L34) - - - -Run migrations - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/cakephp.php#L42) - - - -Main task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:init](/docs/recipe/cakephp.md#deployinit) -* [deploy:run_migrations](/docs/recipe/cakephp.md#deployrun_migrations) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/codeigniter.md b/docs/recipe/codeigniter.md deleted file mode 100644 index f450bafb2..000000000 --- a/docs/recipe/codeigniter.md +++ /dev/null @@ -1,90 +0,0 @@ - - - - -# How to Deploy a Codeigniter Project - -```php -require 'recipe/codeigniter.php'; -``` - -[Source](/recipe/codeigniter.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Codeigniter application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Codeigniter** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The codeigniter recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/codeigniter.php#L9) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -CodeIgniter shared dirs - -```php title="Default value" -['application/cache', 'application/logs'] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/codeigniter.php#L12) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - -CodeIgniter writable dirs - -```php title="Default value" -['application/cache', 'application/logs'] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/codeigniter.php#L18) - -Deploys your project. - -Main task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/common.md b/docs/recipe/common.md deleted file mode 100644 index 97d83526b..000000000 --- a/docs/recipe/common.md +++ /dev/null @@ -1,251 +0,0 @@ - - - - -# Common Recipe - -```php -require 'recipe/common.php'; -``` - -[Source](/recipe/common.php) - -* Requires - * [provision](/docs/recipe/provision.md) - * [check_remote](/docs/recipe/deploy/check_remote.md) - * [cleanup](/docs/recipe/deploy/cleanup.md) - * [clear_paths](/docs/recipe/deploy/clear_paths.md) - * [copy_dirs](/docs/recipe/deploy/copy_dirs.md) - * [info](/docs/recipe/deploy/info.md) - * [lock](/docs/recipe/deploy/lock.md) - * [push](/docs/recipe/deploy/push.md) - * [release](/docs/recipe/deploy/release.md) - * [rollback](/docs/recipe/deploy/rollback.md) - * [setup](/docs/recipe/deploy/setup.md) - * [shared](/docs/recipe/deploy/shared.md) - * [symlink](/docs/recipe/deploy/symlink.md) - * [update_code](/docs/recipe/deploy/update_code.md) - * [vendors](/docs/recipe/deploy/vendors.md) - * [writable](/docs/recipe/deploy/writable.md) - -## Configuration -### user -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L29) - -Name of current user who is running deploy. -If not set will try automatically get git user name, -otherwise output of `whoami` command. -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### keep_releases -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L46) - -Number of releases to preserve in releases folder. - -```php title="Default value" -10 -``` - - -### repository -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L49) - -Repository to deploy. - - - -### default_timeout -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L54) - -Default timeout for `run()` and `runLocally()` functions. - -Set to `null` to disable timeout. - -```php title="Default value" -300 -``` - - -### env -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L70) - -Remote environment variables. -```php -set('env', [ - 'KEY' => 'something', -]); -``` - -It is possible to override it per `run()` call. - -```php -run('echo $KEY', env: ['KEY' => 'over']); -``` - - - -### dotenv -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L79) - -Path to `.env` file which will be used as environment variables for each command per `run()`. - -```php -set('dotenv', '{{current_path}}/.env'); -``` - -```php title="Default value" -false -``` - - -### deploy_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L89) - -The deploy path. - -For example can be set for a bunch of host once as: -```php -set('deploy_path', '~/{{alias}}'); -``` -:::info Required -Throws exception if not set. -::: - - - - -### current_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L99) - -Return current release path. Default to [deploy_path](/docs/recipe/common.md#deploy_path)/`current`. -```php -set('current_path', '/var/public_html'); -``` - -```php title="Default value" -'{{deploy_path}}/current' -``` - - -### bin/php -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L102) - -Path to the `php` bin. - -```php title="Default value" -if (currentHost()->hasOwn('php_version')) { -return '/usr/bin/php{{php_version}}'; -} -return which('php'); -``` - - -### bin/git -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L110) - -Path to the `git` bin. - -```php title="Default value" -return which('git'); -``` - - -### use_relative_symlink -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L116) - -Should [bin/symlink](/docs/recipe/common.md#bin/symlink) use `--relative` option or not. Will detect -automatically. - -```php title="Default value" -return commandSupportsOption('ln', '--relative'); -``` - - -### bin/symlink -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L121) - -Path to the `ln` bin. With predefined options `-nfs`. - -```php title="Default value" -return get('use_relative_symlink') ? 'ln -nfs --relative' : 'ln -nfs'; -``` - - -### sudo_askpass -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L128) - -Path to a file which will store temp script with sudo password. -Defaults to `.dep/sudo_pass`. This script is only temporary and will be deleted after -sudo command executed. -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - - -## Tasks - -### deploy:prepare -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L137) - -Prepares a new release. - - - - -This task is group task which contains next tasks: -* [deploy:info](/docs/recipe/deploy/info.md#deployinfo) -* [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) -* [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) -* [deploy:release](/docs/recipe/deploy/release.md#deployrelease) -* [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) -* [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) -* [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) - - -### deploy:publish -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L148) - -Publishes the release. - - - - -This task is group task which contains next tasks: -* [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) -* [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) -* [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) -* [deploy:success](/docs/recipe/common.md#deploysuccess) - - -### deploy:success -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L158) - - - -Prints success message - - -### deploy:failed -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L167) - - - -Hook on deploy failure. - - -### logs:app -[Source](https://github.com/deployphp/deployer/blob/master/recipe/common.php#L177) - -Shows application logs. - -Follows latest application logs. - - diff --git a/docs/recipe/composer.md b/docs/recipe/composer.md deleted file mode 100644 index a6ffbc8ef..000000000 --- a/docs/recipe/composer.md +++ /dev/null @@ -1,32 +0,0 @@ - - - - -# Composer Recipe - -```php -require 'recipe/composer.php'; -``` - -[Source](/recipe/composer.php) - -* Requires - * [common](/docs/recipe/common.md) - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/composer.php#L9) - -Deploys your project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/contao.md b/docs/recipe/contao.md deleted file mode 100644 index a4ca70782..000000000 --- a/docs/recipe/contao.md +++ /dev/null @@ -1,166 +0,0 @@ - - - - -# How to Deploy a Contao Project - -```php -require 'recipe/contao.php'; -``` - -[Source](/recipe/contao.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Contao application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Contao** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [contao:maintenance:enable](/docs/recipe/contao.md#contaomaintenanceenable) – Enable maintenance mode -* [contao:migrate](/docs/recipe/contao.md#contaomigrate) – Run Contao migrations -* [contao:maintenance:disable](/docs/recipe/contao.md#contaomaintenancedisable) – Disable maintenance mode -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The contao recipe is based on the [symfony](/docs/recipe/symfony.md) recipe. - -## Configuration -### public_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L11) - -Overrides [public_path](/docs/recipe/provision/website.md#public_path) from `recipe/provision/website.php`. - -The public path is the path to be set as DocumentRoot and is defined in the `composer.json` of the project -but defaults to `public` from Contao 5.0 on. -This path is relative from the [current_path](/docs/recipe/common.md#current_path), see [`recipe/provision/website.php`](/docs/recipe/provision/website.php#public_path). - -```php title="Default value" -$composerConfig = json_decode(file_get_contents('./composer.json'), true, 512, JSON_THROW_ON_ERROR); - -return $composerConfig['extra']['public-dir'] ?? 'public'; -``` - - -### bin/console -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L29) - -Overrides [bin/console](/docs/recipe/symfony.md#bin/console) from `recipe/symfony.php`. - - - -```php title="Default value" -return '{{bin/php}} {{release_or_current_path}}/vendor/bin/contao-console'; -``` - - -### contao_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L33) - - - -```php title="Default value" -return run('{{bin/console}} contao:version'); -``` - - - -## Tasks - -### contao:migrate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L47) - -Run Contao migrations. - -This task updates the database. A database backup is saved automatically as a default. - -To automatically drop the obsolete database structures, you can override the task as follows: - -```php -task('contao:migrate', function () { - run('{{bin/php}} {{bin/console}} contao:migrate --with-deletes {{console_options}}'); -}); -``` - - -### contao:manager:download -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L53) - -Download the Contao Manager. - -Downloads the `contao-manager.phar.php` into the public path. - - -### contao:install:lock -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L59) - -Lock the Contao Install Tool. - -Locks the Contao install tool which is useful if you don't use it. - - -### contao:manager:lock -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L65) - -Lock the Contao Manager. - -Locks the Contao Manager which is useful if you only need the API of the Manager rather than the UI. - - -### contao:maintenance:enable -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L71) - -Enable maintenance mode. - - - - -### contao:maintenance:disable -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L86) - -Disable maintenance mode. - - - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/contao.php#L98) - -Deploy the project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [contao:maintenance:enable](/docs/recipe/contao.md#contaomaintenanceenable) -* [contao:migrate](/docs/recipe/contao.md#contaomigrate) -* [contao:maintenance:disable](/docs/recipe/contao.md#contaomaintenancedisable) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/craftcms.md b/docs/recipe/craftcms.md deleted file mode 100644 index 8551440d8..000000000 --- a/docs/recipe/craftcms.md +++ /dev/null @@ -1,126 +0,0 @@ - - - - -# How to Deploy a Craftcms Project - -```php -require 'recipe/craftcms.php'; -``` - -[Source](/recipe/craftcms.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Craftcms application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Craftcms** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors - - -The craftcms recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### log_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L9) - - - -```php title="Default value" -'storage/logs/*.log' -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L11) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -[ - 'storage', - 'web/assets', -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L16) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -[ - 'config/project', - 'storage', - 'web/assets', - 'web/cpresources', -] -``` - - -### writable_mode -[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L23) - -Overrides [writable_mode](/docs/recipe/deploy/writable.md#writable_mode) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -'chmod' -``` - - -### writable_recursive -[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L24) - -Overrides [writable_recursive](/docs/recipe/deploy/writable.md#writable_recursive) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -true -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L65) - -deploy. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) - - diff --git a/docs/recipe/deploy/check_remote.md b/docs/recipe/deploy/check_remote.md deleted file mode 100644 index d5f37d49c..000000000 --- a/docs/recipe/deploy/check_remote.md +++ /dev/null @@ -1,25 +0,0 @@ - - - - -# Check Remote Recipe - -```php -require 'recipe/deploy/check_remote.php'; -``` - -[Source](/recipe/deploy/check_remote.php) - - - -## Tasks - -### deploy:check_remote -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/check_remote.php#L10) - -Checks remote head. - -Cancel deployment if there would be no change to the codebase. -This avoids unnecessary releases if the latest commit has already been deployed. - - diff --git a/docs/recipe/deploy/cleanup.md b/docs/recipe/deploy/cleanup.md deleted file mode 100644 index 6971f749d..000000000 --- a/docs/recipe/deploy/cleanup.md +++ /dev/null @@ -1,35 +0,0 @@ - - - - -# Cleanup Recipe - -```php -require 'recipe/deploy/cleanup.php'; -``` - -[Source](/recipe/deploy/cleanup.php) - - -## Configuration -### cleanup_use_sudo -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/cleanup.php#L5) - -Use sudo in deploy:cleanup task for rm command. - -```php title="Default value" -false -``` - - - -## Tasks - -### deploy:cleanup -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/cleanup.php#L8) - -Cleanup old releases. - - - - diff --git a/docs/recipe/deploy/clear_paths.md b/docs/recipe/deploy/clear_paths.md deleted file mode 100644 index 9d3e5841f..000000000 --- a/docs/recipe/deploy/clear_paths.md +++ /dev/null @@ -1,42 +0,0 @@ - - - - -# Clear Paths Recipe - -```php -require 'recipe/deploy/clear_paths.php'; -``` - -[Source](/recipe/deploy/clear_paths.php) - - -## Configuration -### clear_paths -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/clear_paths.php#L5) - -List of paths to remove from [release_path](/docs/recipe/deploy/release.md#release_path). - - - -### clear_use_sudo -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/clear_paths.php#L8) - -Use sudo for deploy:clear_path task? - -```php title="Default value" -false -``` - - - -## Tasks - -### deploy:clear_paths -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/clear_paths.php#L11) - -Cleanup files and/or directories. - - - - diff --git a/docs/recipe/deploy/copy_dirs.md b/docs/recipe/deploy/copy_dirs.md deleted file mode 100644 index ab3f9cccf..000000000 --- a/docs/recipe/deploy/copy_dirs.md +++ /dev/null @@ -1,33 +0,0 @@ - - - - -# Copy Dirs Recipe - -```php -require 'recipe/deploy/copy_dirs.php'; -``` - -[Source](/recipe/deploy/copy_dirs.php) - - -## Configuration -### copy_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/copy_dirs.php#L6) - -List of dirs to copy between releases. -For example you can copy `node_modules` to speedup npm install. - - - - -## Tasks - -### deploy:copy_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/copy_dirs.php#L9) - -Copies directories. - - - - diff --git a/docs/recipe/deploy/info.md b/docs/recipe/deploy/info.md deleted file mode 100644 index 91b61d2d1..000000000 --- a/docs/recipe/deploy/info.md +++ /dev/null @@ -1,24 +0,0 @@ - - - - -# Info Recipe - -```php -require 'recipe/deploy/info.php'; -``` - -[Source](/recipe/deploy/info.php) - - - -## Tasks - -### deploy:info -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/info.php#L5) - -Displays info about deployment. - - - - diff --git a/docs/recipe/deploy/lock.md b/docs/recipe/deploy/lock.md deleted file mode 100644 index ad0aa7185..000000000 --- a/docs/recipe/deploy/lock.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# Lock Recipe - -```php -require 'recipe/deploy/lock.php'; -``` - -[Source](/recipe/deploy/lock.php) - - - -## Tasks - -### deploy:lock -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/lock.php#L7) - -Locks deploy. - - - - -### deploy:unlock -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/lock.php#L20) - -Unlocks deploy. - - - - -### deploy:is_locked -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/lock.php#L25) - -Checks if deploy is locked. - - - - diff --git a/docs/recipe/deploy/push.md b/docs/recipe/deploy/push.md deleted file mode 100644 index 061efdbac..000000000 --- a/docs/recipe/deploy/push.md +++ /dev/null @@ -1,26 +0,0 @@ - - - - -# Push Recipe - -```php -require 'recipe/deploy/push.php'; -``` - -[Source](/recipe/deploy/push.php) - - - -## Tasks - -### push -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/push.php#L8) - -Pushes local changes to remote host. - -Creates patch of local changes and pushes them on host. -And applies to current_path. Push can be done many times. -The task purpose to be used only for development. - - diff --git a/docs/recipe/deploy/release.md b/docs/recipe/deploy/release.md deleted file mode 100644 index a0d633265..000000000 --- a/docs/recipe/deploy/release.md +++ /dev/null @@ -1,111 +0,0 @@ - - - - -# Release Recipe - -```php -require 'recipe/deploy/release.php'; -``` - -[Source](/recipe/deploy/release.php) - - -## Configuration -### release_name -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L8) - -The name of the release. - -```php title="Default value" -return within('{{deploy_path}}', function () { -$latest = run('cat .dep/latest_release || echo 0'); -return strval(intval($latest) + 1); -}); -``` - - -### releases_log -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L16) - -Holds releases log from `.dep/releases_log` file. -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### releases_list -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L31) - -Return list of release names on host. -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### release_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L58) - -Return release path. -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### release_revision -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L69) - -Current release revision. Usually a git hash. - -```php title="Default value" -return run('cat {{release_path}}/REVISION'); -``` - - -### release_or_current_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L75) - -Return the release path during a deployment -but fallback to the current path otherwise. - -```php title="Default value" -$releaseExists = test('[ -h {{deploy_path}}/release ]'); -return $releaseExists ? get('release_path') : get('current_path'); -``` - - - -## Tasks - -### deploy:release -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L82) - -Prepares release. - -Clean up unfinished releases and prepare next release - - -### releases -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/release.php#L157) - -Shows releases list. - -Example output: -``` -+---------------------+------example.org ------------+--------+-----------+ -| Date (UTC) | Release | Author | Target | Commit | -+---------------------+-------------+----------------+--------+-----------+ -| 2021-11-06 20:51:45 | 1 | Anton Medvedev | HEAD | 34d24192e | -| 2021-11-06 21:00:50 | 2 (bad) | Anton Medvedev | HEAD | 392948a40 | -| 2021-11-06 23:19:20 | 3 | Anton Medvedev | HEAD | a4057a36c | -| 2021-11-06 23:24:30 | 4 (current) | Anton Medvedev | HEAD | s3wa45ca6 | -+---------------------+-------------+----------------+--------+-----------+ -``` - - diff --git a/docs/recipe/deploy/rollback.md b/docs/recipe/deploy/rollback.md deleted file mode 100644 index f954ddbd9..000000000 --- a/docs/recipe/deploy/rollback.md +++ /dev/null @@ -1,54 +0,0 @@ - - - - -# Rollback Recipe - -```php -require 'recipe/deploy/rollback.php'; -``` - -[Source](/recipe/deploy/rollback.php) - - -## Configuration -### rollback_candidate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/rollback.php#L19) - -Rollback candidate automatically will be automatically chosen by -looking at output of `ls` command and content of `.dep/releases_log`. - -If rollback candidate marked as **BAD_RELEASE**, it will be skipped. - -:::tip -You can override rollback candidate via: -``` -dep rollback -o rollback_candidate=123 -``` -::: -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - - -## Tasks - -### rollback -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/rollback.php#L62) - -Rollbacks to the previous release. - -Uses [rollback_candidate](/docs/recipe/deploy/rollback.md#rollback_candidate) for symlinking. Current release will be marked as -bad by creating file **BAD_RELEASE** with timestamp and [user](/docs/recipe/common.md#user). - -:::warning -You can always manually symlink [current_path](/docs/recipe/common.md#current_path) to proper release. -``` -dep run '{{bin/symlink}} releases/123 {{current_path}}' -``` -::: - - diff --git a/docs/recipe/deploy/setup.md b/docs/recipe/deploy/setup.md deleted file mode 100644 index e1c98c791..000000000 --- a/docs/recipe/deploy/setup.md +++ /dev/null @@ -1,24 +0,0 @@ - - - - -# Setup Recipe - -```php -require 'recipe/deploy/setup.php'; -``` - -[Source](/recipe/deploy/setup.php) - - - -## Tasks - -### deploy:setup -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/setup.php#L5) - -Prepares host for deploy. - - - - diff --git a/docs/recipe/deploy/shared.md b/docs/recipe/deploy/shared.md deleted file mode 100644 index 8052a5aba..000000000 --- a/docs/recipe/deploy/shared.md +++ /dev/null @@ -1,47 +0,0 @@ - - - - -# Shared Recipe - -```php -require 'recipe/deploy/shared.php'; -``` - -[Source](/recipe/deploy/shared.php) - - -## Configuration -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/shared.php#L12) - -List of dirs what will be shared between releases. -Each release will have symlink to those dirs stored in [deploy_path](/docs/recipe/common.md#deploy_path)/shared dir. -```php -set('shared_dirs', ['storage']); -``` - - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/shared.php#L19) - -List of files what will be shared between releases. -Each release will have symlink to those files stored in [deploy_path](/docs/recipe/common.md#deploy_path)/shared dir. -```php -set('shared_files', ['.env']); -``` - - - - -## Tasks - -### deploy:shared -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/shared.php#L22) - -Creates symlinks for shared files and dirs. - - - - diff --git a/docs/recipe/deploy/symlink.md b/docs/recipe/deploy/symlink.md deleted file mode 100644 index 33c5edd48..000000000 --- a/docs/recipe/deploy/symlink.md +++ /dev/null @@ -1,35 +0,0 @@ - - - - -# Symlink Recipe - -```php -require 'recipe/deploy/symlink.php'; -``` - -[Source](/recipe/deploy/symlink.php) - - -## Configuration -### use_atomic_symlink -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/symlink.php#L5) - -Use mv -T if available. Will check automatically. - -```php title="Default value" -return commandSupportsOption('mv', '--no-target-directory'); -``` - - - -## Tasks - -### deploy:symlink -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/symlink.php#L10) - -Creates symlink to release. - - - - diff --git a/docs/recipe/deploy/update_code.md b/docs/recipe/deploy/update_code.md deleted file mode 100644 index ff8511847..000000000 --- a/docs/recipe/deploy/update_code.md +++ /dev/null @@ -1,90 +0,0 @@ - - - - -# Update Code Recipe - -```php -require 'recipe/deploy/update_code.php'; -``` - -[Source](/recipe/deploy/update_code.php) - - -## Configuration -### branch -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/update_code.php#L11) - -Determines which branch to deploy. Can be overridden with CLI option `--branch`. -If not specified, will get current git HEAD branch as default branch to deploy. - -```php title="Default value" -'HEAD' -``` - - -### target -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/update_code.php#L18) - -The deploy target: a branch, a tag or a revision. -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### update_code_strategy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/update_code.php#L47) - -Sets deploy:update_code strategy. -Can be one of: -- archive -- clone (if you need `.git` dir in your [release_path](/docs/recipe/deploy/release.md#release_path)) - -```php title="Default value" -'archive' -``` - - -### git_ssh_command -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/update_code.php#L53) - -Sets environment variable _GIT_SSH_COMMAND_ for `git clone` command. -If `StrictHostKeyChecking` flag is set to `accept-new` then ssh will -automatically add new host keys to the user known hosts files, but -will not permit connections to hosts with changed host keys. - -```php title="Default value" -'ssh -o StrictHostKeyChecking=accept-new' -``` - - -### sub_directory -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/update_code.php#L65) - -Specifies a sub directory within the repository to deploy. -Works only when [`update_code_strategy`](#update_code_strategy) is set to `archive` (default). - -Example: - - set value to `src` if you want to deploy the folder that lives at `/src/api`. - - set value to `src/api` if you want to deploy the folder that lives at `/src/api`. - -Note: do not use a leading `/`! - -```php title="Default value" -false -``` - - - -## Tasks - -### deploy:update_code -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/update_code.php#L71) - -Updates code. - -Update code at [release_path](/docs/recipe/deploy/release.md#release_path) on host. - - diff --git a/docs/recipe/deploy/vendors.md b/docs/recipe/deploy/vendors.md deleted file mode 100644 index 68b386e73..000000000 --- a/docs/recipe/deploy/vendors.md +++ /dev/null @@ -1,58 +0,0 @@ - - - - -# Vendors Recipe - -```php -require 'recipe/deploy/vendors.php'; -``` - -[Source](/recipe/deploy/vendors.php) - - -## Configuration -### composer_action -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/vendors.php#L4) - - - -```php title="Default value" -'install' -``` - - -### composer_options -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/vendors.php#L6) - - - -```php title="Default value" -'--verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader' -``` - - -### bin/composer -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/vendors.php#L11) - -Returns Composer binary path in found. Otherwise try to install latest -composer version to `.dep/composer.phar`. To use specific composer version -download desired phar and place it at `.dep/composer.phar`. -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - - -## Tasks - -### deploy:vendors -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/vendors.php#L27) - -Installs vendors. - - - - diff --git a/docs/recipe/deploy/writable.md b/docs/recipe/deploy/writable.md deleted file mode 100644 index bcf5898c3..000000000 --- a/docs/recipe/deploy/writable.md +++ /dev/null @@ -1,102 +0,0 @@ - - - - -# Writable Recipe - -```php -require 'recipe/deploy/writable.php'; -``` - -[Source](/recipe/deploy/writable.php) - - -## Configuration -### http_user -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/writable.php#L8) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### http_group -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/writable.php#L25) - -Used to make a writable directory by a server. -Used in `chgrp` mode of [writable_mode](/docs/recipe/deploy/writable.md#writable_mode) only. -Attempts automatically to detect http user in process list. -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/writable.php#L40) - -List of writable dirs. - - - -### writable_mode -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/writable.php#L49) - -One of: -- chown -- chgrp -- chmod -- acl -- sticky -- skip - -```php title="Default value" -'acl' -``` - - -### writable_use_sudo -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/writable.php#L52) - -Using sudo in writable commands? - -```php title="Default value" -false -``` - - -### writable_recursive -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/writable.php#L55) - -Use recursive mode (-R)? - -```php title="Default value" -false -``` - - -### writable_chmod_mode -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/writable.php#L58) - -The chmod mode. - -```php title="Default value" -'0755' -``` - - - -## Tasks - -### deploy:writable -[Source](https://github.com/deployphp/deployer/blob/master/recipe/deploy/writable.php#L61) - -Makes writable dirs. - - - - diff --git a/docs/recipe/drupal7.md b/docs/recipe/drupal7.md deleted file mode 100644 index dea6e45ba..000000000 --- a/docs/recipe/drupal7.md +++ /dev/null @@ -1,132 +0,0 @@ - - - - -# How to Deploy a Drupal 7 Project - -```php -require 'recipe/drupal7.php'; -``` - -[Source](/recipe/drupal7.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Drupal 7 application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Drupal 7** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The drupal7 recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### drupal_site -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L14) - -Set Drupal 7 site. Change if you use different site - -```php title="Default value" -'default' -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L17) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -Drupal 7 shared dirs - -```php title="Default value" -[ - 'sites/{{drupal_site}}/files', -] -``` - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L22) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - -Drupal 7 shared files - -```php title="Default value" -[ - 'sites/{{drupal_site}}/settings.php', -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L27) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - -Drupal 7 writable dirs - -```php title="Default value" -[ - 'sites/{{drupal_site}}/files', -] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L8) - - - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - -### drupal:settings -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L33) - - - -Create and upload Drupal 7 settings.php using values from secrets - - -### drupal:upload_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L75) - - - -Upload Drupal 7 files folder - - diff --git a/docs/recipe/drupal8.md b/docs/recipe/drupal8.md deleted file mode 100644 index 40d343d1e..000000000 --- a/docs/recipe/drupal8.md +++ /dev/null @@ -1,117 +0,0 @@ - - - - -# How to Deploy a Drupal 8 Project - -```php -require 'recipe/drupal8.php'; -``` - -[Source](/recipe/drupal8.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Drupal 8 application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Drupal 8** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The drupal8 recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### drupal_site -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal8.php#L14) - -Set drupal site. Change if you use different site - -```php title="Default value" -'default' -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal8.php#L18) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -Drupal 8 shared dirs - -```php title="Default value" -[ - 'sites/{{drupal_site}}/files', -] -``` - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal8.php#L23) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - -Drupal 8 shared files - -```php title="Default value" -[ - 'sites/{{drupal_site}}/settings.php', - 'sites/{{drupal_site}}/services.yml', -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal8.php#L29) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - -Drupal 8 Writable dirs - -```php title="Default value" -[ - 'sites/{{drupal_site}}/files', -] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal8.php#L8) - - - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/flow_framework.md b/docs/recipe/flow_framework.md deleted file mode 100644 index ae62f3b50..000000000 --- a/docs/recipe/flow_framework.md +++ /dev/null @@ -1,122 +0,0 @@ - - - - -# How to Deploy a Flow Framework Project - -```php -require 'recipe/flow_framework.php'; -``` - -[Source](/recipe/flow_framework.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Flow Framework application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Flow Framework** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:run_migrations](/docs/recipe/flow_framework.md#deployrun_migrations) – Applies database migrations -* [deploy:publish_resources](/docs/recipe/flow_framework.md#deploypublish_resources) – Publishes resources -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The flow_framework recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### flow_context -[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L9) - -Flow-Framework application-context - -```php title="Default value" -'Production' -``` - - -### flow_command -[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L12) - -Flow-Framework cli-command - -```php title="Default value" -'flow' -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L15) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -Flow-Framework shared directories - -```php title="Default value" -[ - 'Data/Persistent', - 'Data/Logs', - 'Configuration/{{flow_context}}' -] -``` - - - -## Tasks - -### deploy:run_migrations -[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L25) - -Applies database migrations. - -Apply database migrations - - -### deploy:publish_resources -[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L33) - -Publishes resources. - -Publish resources - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L41) - -Deploys your project. - -Main task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:run_migrations](/docs/recipe/flow_framework.md#deployrun_migrations) -* [deploy:publish_resources](/docs/recipe/flow_framework.md#deploypublish_resources) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/fuelphp.md b/docs/recipe/fuelphp.md deleted file mode 100644 index ac9339a07..000000000 --- a/docs/recipe/fuelphp.md +++ /dev/null @@ -1,80 +0,0 @@ - - - - -# How to Deploy a Fuelphp Project - -```php -require 'recipe/fuelphp.php'; -``` - -[Source](/recipe/fuelphp.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Fuelphp application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Fuelphp** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The fuelphp recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/fuelphp.php#L9) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -FuelPHP 1.x shared dirs - -```php title="Default value" -[ - 'fuel/app/cache', 'fuel/app/logs', -] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/fuelphp.php#L17) - -Deploys your project. - -Main task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/joomla.md b/docs/recipe/joomla.md deleted file mode 100644 index bcb7bc664..000000000 --- a/docs/recipe/joomla.md +++ /dev/null @@ -1,100 +0,0 @@ - - - - -# How to Deploy a Joomla Project - -```php -require 'recipe/joomla.php'; -``` - -[Source](/recipe/joomla.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Joomla application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Joomla** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The joomla recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/joomla.php#L8) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -['configuration.php'] -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/joomla.php#L9) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -['images'] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/joomla.php#L10) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -['images'] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/joomla.php#L13) - -Deploys your project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/laravel.md b/docs/recipe/laravel.md deleted file mode 100644 index d24ffdf84..000000000 --- a/docs/recipe/laravel.md +++ /dev/null @@ -1,475 +0,0 @@ - - - - -# How to Deploy a Laravel Project - -```php -require 'recipe/laravel.php'; -``` - -[Source](/recipe/laravel.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Laravel application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Laravel** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [artisan:storage:link](/docs/recipe/laravel.md#artisanstoragelink) – Creates the symbolic links configured for the application -* [artisan:config:cache](/docs/recipe/laravel.md#artisanconfigcache) – Creates a cache file for faster configuration loading -* [artisan:route:cache](/docs/recipe/laravel.md#artisanroutecache) – Creates a route cache file for faster route registration -* [artisan:view:cache](/docs/recipe/laravel.md#artisanviewcache) – Compiles all of the application\'s Blade templates -* [artisan:event:cache](/docs/recipe/laravel.md#artisaneventcache) – Discovers and cache the application\'s events and listeners -* [artisan:migrate](/docs/recipe/laravel.md#artisanmigrate) – Runs the database migrations -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The laravel recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L8) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -['storage'] -``` - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L9) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -['.env'] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L10) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -[ - 'bootstrap/cache', - 'storage', - 'storage/app', - 'storage/app/public', - 'storage/framework', - 'storage/framework/cache', - 'storage/framework/cache/data', - 'storage/framework/sessions', - 'storage/framework/views', - 'storage/logs', -] -``` - - -### log_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L22) - - - -```php title="Default value" -'storage/logs/*.log' -``` - - -### laravel_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L23) - - - -```php title="Default value" -$result = run('{{bin/php}} {{release_or_current_path}}/artisan --version'); -preg_match_all('/(\d+\.?)+/', $result, $matches); -return $matches[0][0] ?? 5.5; -``` - - - -## Tasks - -### artisan:down -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L90) - -Puts the application into maintenance / demo mode. - - - - -### artisan:up -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L93) - -Brings the application out of maintenance mode. - - - - -### artisan:​key:generate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L100) - -Sets the application key. - - - - -### artisan:passport:keys -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L103) - -Creates the encryption keys for API authentication. - - - - -### artisan:db:seed -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L110) - -Seeds the database with records. - - - - -### artisan:migrate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L113) - -Runs the database migrations. - - - - -### artisan:migrate:fresh -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L116) - -Drops all tables and re-run all migrations. - - - - -### artisan:migrate:rollback -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L119) - -Rollbacks the last database migration. - - - - -### artisan:migrate:status -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L122) - -Shows the status of each migration. - - - - -### artisan:cache:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L129) - -Flushes the application cache. - - - - -### artisan:config:cache -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L132) - -Creates a cache file for faster configuration loading. - - - - -### artisan:config:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L135) - -Removes the configuration cache file. - - - - -### artisan:event:cache -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L138) - -Discovers and cache the application\'s events and listeners. - - - - -### artisan:event:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L141) - -Clears all cached events and listeners. - - - - -### artisan:event:list -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L144) - -Lists the application\'s events and listeners. - - - - -### artisan:optimize -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L147) - -Cache the framework bootstrap files. - - - - -### artisan:optimize:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L150) - -Removes the cached bootstrap files. - - - - -### artisan:route:cache -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L153) - -Creates a route cache file for faster route registration. - - - - -### artisan:route:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L156) - -Removes the route cache file. - - - - -### artisan:route:list -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L159) - -Lists all registered routes. - - - - -### artisan:storage:link -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L162) - -Creates the symbolic links configured for the application. - - - - -### artisan:view:cache -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L165) - -Compiles all of the application\'s Blade templates. - - - - -### artisan:view:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L168) - -Clears all compiled view files. - - - - -### artisan:queue:failed -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L175) - -Lists all of the failed queue jobs. - - - - -### artisan:queue:flush -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L178) - -Flushes all of the failed queue jobs. - - - - -### artisan:queue:restart -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L181) - -Restarts queue worker daemons after their current job. - - - - -### artisan:horizon -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L184) - -Starts a master supervisor in the foreground. - - - - -### artisan:horizon:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L187) - -Deletes all of the jobs from the specified queue. - - - - -### artisan:horizon:continue -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L190) - -Instructs the master supervisor to continue processing jobs. - - - - -### artisan:horizon:list -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L193) - -Lists all of the deployed machines. - - - - -### artisan:horizon:pause -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L196) - -Pauses the master supervisor. - - - - -### artisan:horizon:purge -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L199) - -Terminates any rogue Horizon processes. - - - - -### artisan:horizon:status -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L202) - -Gets the current status of Horizon. - - - - -### artisan:horizon:terminate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L205) - -Terminates the master supervisor so it can be restarted. - - - - -### artisan:horizon:publish -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L208) - -Publish all of the Horizon resources. - - - - -### artisan:​telescope:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L215) - -Clears all entries from Telescope. - - - - -### artisan:​telescope:prune -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L218) - -Prunes stale entries from the Telescope database. - - - - -### artisan:octane -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L225) - -Starts the octane server. - - - - -### artisan:octane:reload -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L228) - -Reloads the octane server. - - - - -### artisan:octane:stop -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L231) - -Stops the octane server. - - - - -### artisan:octane:status -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L234) - -Check the status of the octane server. - - - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/laravel.php#L240) - -Deploys your project. - -Main deploy task. - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [artisan:storage:link](/docs/recipe/laravel.md#artisanstoragelink) -* [artisan:config:cache](/docs/recipe/laravel.md#artisanconfigcache) -* [artisan:route:cache](/docs/recipe/laravel.md#artisanroutecache) -* [artisan:view:cache](/docs/recipe/laravel.md#artisanviewcache) -* [artisan:event:cache](/docs/recipe/laravel.md#artisaneventcache) -* [artisan:migrate](/docs/recipe/laravel.md#artisanmigrate) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/magento.md b/docs/recipe/magento.md deleted file mode 100644 index b512c5863..000000000 --- a/docs/recipe/magento.md +++ /dev/null @@ -1,118 +0,0 @@ - - - - -# How to Deploy a Magento Project - -```php -require 'recipe/magento.php'; -``` - -[Source](/recipe/magento.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Magento application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Magento** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:cache:clear](/docs/recipe/magento.md#deploycacheclear) – Clears cache -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The magento recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L13) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -Magento shared dirs - -```php title="Default value" -['var', 'media'] -``` - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L16) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - -Magento shared files - -```php title="Default value" -['app/etc/local.xml'] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L19) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - -Magento writable dirs - -```php title="Default value" -['var', 'media'] -``` - - - -## Tasks - -### deploy:cache:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L25) - -Clears cache. - -Clear cache - - -### deploy:clear_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L32) - - - -Remove files that can be used to compromise Magento - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L46) - -Deploys your project. - -Main task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:cache:clear](/docs/recipe/magento.md#deploycacheclear) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/magento2.md b/docs/recipe/magento2.md deleted file mode 100644 index b3b901090..000000000 --- a/docs/recipe/magento2.md +++ /dev/null @@ -1,444 +0,0 @@ - - - - -# How to Deploy a Magento 2 Project - -```php -require 'recipe/magento2.php'; -``` - -[Source](/recipe/magento2.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Magento 2 application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Magento 2** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:clear_paths](/docs/recipe/deploy/clear_paths.md#deployclear_paths) – Cleanup files and/or directories -* [deploy:magento](/docs/recipe/magento2.md#deploymagento) – Magento2 deployment operations - * [magento:build](/docs/recipe/magento2.md#magentobuild) – Magento2 build operations - * [magento:compile](/docs/recipe/magento2.md#magentocompile) – Compiles magento di - * [magento:deploy:assets](/docs/recipe/magento2.md#magentodeployassets) – Deploys assets - * [magento:config:import](/docs/recipe/magento2.md#magentoconfigimport) – Config Import - * [magento:upgrade:db](/docs/recipe/magento2.md#magentoupgradedb) – Upgrades magento database - * [magento:cache:flush](/docs/recipe/magento2.md#magentocacheflush) – Flushes Magento Cache -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The magento2 recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### static_content_locales -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L23) - -By default setup:static-content:deploy uses `en_US`. -To change that, simply put `set('static_content_locales', 'en_US de_DE');` -in you deployer script. - -```php title="Default value" -'en_US' -``` - - -### magento_themes -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L29) - -You can also set the themes to run against. By default it'll deploy -all themes - `add('magento_themes', ['Magento/luma', 'Magento/backend']);` - -```php title="Default value" -[ - -] -``` - - -### static_content_jobs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L37) - -Also set the number of conccurent jobs to run. The default is 1 -Update using: `set('static_content_jobs', '1');` - -```php title="Default value" -'1' -``` - - -### content_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L39) - - - -```php title="Default value" -return time(); -``` - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L43) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -[ - 'app/etc/env.php', - 'var/.maintenance.ip', -] -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L47) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -[ - 'var/composer_home', - 'var/log', - 'var/export', - 'var/report', - 'var/import', - 'var/import_history', - 'var/session', - 'var/importexport', - 'var/backups', - 'var/tmp', - 'pub/sitemap', - 'pub/media', - 'pub/static/_cache' -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L62) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -[ - 'var', - 'pub/static', - 'pub/media', - 'generated', - 'var/page_cache' -] -``` - - -### clear_paths -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L69) - -Overrides [clear_paths](/docs/recipe/deploy/clear_paths.md#clear_paths) from `recipe/deploy/clear_paths.php`. - - - -```php title="Default value" -[ - 'generated/*', - 'pub/static/_cache/*', - 'var/generation/*', - 'var/cache/*', - 'var/page_cache/*', - 'var/view_preprocessed/*' -] -``` - - -### magento_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L78) - - - -```php title="Default value" -// detect version -$versionOutput = run('{{bin/php}} {{release_or_current_path}}/bin/magento --version'); -preg_match('/(\d+\.?)+(-p\d+)?$/', $versionOutput, $matches); -return $matches[0] ?? '2.0'; -``` - - -### maintenance_mode_status_active -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L85) - - - -```php title="Default value" -// detect maintenance mode active -$maintenanceModeStatusOutput = run("{{bin/php}} {{release_or_current_path}}/bin/magento maintenance:status"); -return strpos($maintenanceModeStatusOutput, MAINTENANCE_MODE_ACTIVE_OUTPUT_MSG) !== false; -``` - - -### enable_zerodowntime -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L92) - -Deploy without setting maintenance mode if possible - -```php title="Default value" -true -``` - - -### artifact_file -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L229) - -artifact deployment section -settings section - -```php title="Default value" -'artifact.tar.gz' -``` - - -### artifact_dir -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L230) - - - -```php title="Default value" -'artifacts' -``` - - -### artifact_excludes_file -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L231) - - - -```php title="Default value" -'artifacts/excludes' -``` - - -### artifact_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L233) - - - -```php title="Default value" -if (!test('[ -d {{artifact_dir}} ]')) { -run('mkdir {{artifact_dir}}'); -} -return get('artifact_dir') . '/' . get('artifact_file'); -``` - - -### bin/tar -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L240) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### additional_shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L301) - -Array of shared files that will be added to the default shared_files without overriding - - - -### additional_shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L303) - -Array of shared directories that will be added to the default shared_dirs without overriding - - - - -## Tasks - -### magento:compile -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L96) - -Compiles magento di. - -Tasks - - -### magento:deploy:assets -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L103) - -Deploys assets. - - - - -### magento:sync:content_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L116) - -Syncs content version. - - - - -### magento:maintenance:enable -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L126) - -Enables maintenance mode. - - - - -### magento:maintenance:disable -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L131) - -Disables maintenance mode. - - - - -### magento:config:import -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L136) - -Config Import. - - - - -### magento:upgrade:db -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L171) - -Upgrades magento database. - - - - -### magento:cache:flush -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L198) - -Flushes Magento Cache. - - - - -### deploy:magento -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L203) - -Magento2 deployment operations. - - - - -This task is group task which contains next tasks: -* [magento:build](/docs/recipe/magento2.md#magentobuild) -* [magento:config:import](/docs/recipe/magento2.md#magentoconfigimport) -* [magento:upgrade:db](/docs/recipe/magento2.md#magentoupgradedb) -* [magento:cache:flush](/docs/recipe/magento2.md#magentocacheflush) - - -### magento:build -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L211) - -Magento2 build operations. - - - - -This task is group task which contains next tasks: -* [magento:compile](/docs/recipe/magento2.md#magentocompile) -* [magento:deploy:assets](/docs/recipe/magento2.md#magentodeployassets) - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L217) - -Deploys your project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:clear_paths](/docs/recipe/deploy/clear_paths.md#deployclear_paths) -* [deploy:magento](/docs/recipe/magento2.md#deploymagento) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - -### artifact:package -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L250) - -Packages all relevant files in an artifact. - -tasks section - - -### artifact:upload -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L260) - -Uploads artifact in release folder for extraction. - - - - -### artifact:extract -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L265) - -Extracts artifact in release path. - - - - -### build:remove-generated -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L271) - -Clears generated files prior to building. - - - - -### build:prepare -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L276) - -Prepare local artifact build. - - - - -### deploy:additional-shared -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L307) - -Adds additional files and dirs to the list of shared files and dirs. - - - - diff --git a/docs/recipe/pimcore.md b/docs/recipe/pimcore.md deleted file mode 100644 index 5a067f0ea..000000000 --- a/docs/recipe/pimcore.md +++ /dev/null @@ -1,89 +0,0 @@ - - - - -# How to Deploy a Pimcore Project - -```php -require 'recipe/pimcore.php'; -``` - -[Source](/recipe/pimcore.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Pimcore application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Pimcore** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:cache:clear](/docs/recipe/symfony.md#deploycacheclear) – Clears cache -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The pimcore recipe is based on the [symfony](/docs/recipe/symfony.md) recipe. - - -## Tasks - -### pimcore:rebuild-classes -[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L15) - -Rebuilds Pimcore Classes. - - - - -### pimcore:custom-layouts-rebuild -[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L20) - -Creates Custom Layouts. - - - - -### pimcore:cache_clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L25) - -Removes cache. - - - - -### pimcore:deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/pimcore.php#L29) - - - - - - -This task is group task which contains next tasks: -* [pimcore:rebuild-classes](/docs/recipe/pimcore.md#pimcorerebuild-classes) -* [pimcore:custom-layouts-rebuild](/docs/recipe/pimcore.md#pimcorecustom-layouts-rebuild) - - diff --git a/docs/recipe/prestashop.md b/docs/recipe/prestashop.md deleted file mode 100644 index 8faa1c12e..000000000 --- a/docs/recipe/prestashop.md +++ /dev/null @@ -1,127 +0,0 @@ - - - - -# How to Deploy a Prestashop Project - -```php -require 'recipe/prestashop.php'; -``` - -[Source](/recipe/prestashop.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Prestashop application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Prestashop** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The prestashop recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/prestashop.php#L8) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -[ - 'config/settings.inc.php', - '.htaccess', -] -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/prestashop.php#L12) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -[ - 'img', - 'log', - 'download', - 'upload', - 'translations', - 'mails', - 'themes/default-bootstrap/lang', - 'themes/default-bootstrap/mails', - 'themes/default-bootstrap/pdf/lang', -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/prestashop.php#L23) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -[ - 'img', - 'log', - 'cache', - 'download', - 'upload', - 'translations', - 'mails', - 'themes/default-bootstrap/lang', - 'themes/default-bootstrap/mails', - 'themes/default-bootstrap/pdf/lang', - 'themes/default-bootstrap/cache', -] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/prestashop.php#L38) - -Deploys your project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/provision.md b/docs/recipe/provision.md deleted file mode 100644 index 613f109bc..000000000 --- a/docs/recipe/provision.md +++ /dev/null @@ -1,160 +0,0 @@ - - - - -# Provision Recipe - -```php -require 'recipe/provision.php'; -``` - -[Source](/recipe/provision.php) - -* Requires - * [databases](/docs/recipe/provision/databases.md) - * [nodejs](/docs/recipe/provision/nodejs.md) - * [php](/docs/recipe/provision/php.md) - * [website](/docs/recipe/provision/website.md) - -## Configuration -### lsb_release -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L15) - -Name of lsb_release like: focal, bionic, etc. -As only Ubuntu 20.04 LTS is supported for provision should be the `focal`. - -```php title="Default value" -return run("lsb_release -s -c"); -``` - - -### sudo_password -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L216) - - - -```php title="Default value" -return askHiddenResponse(' Password for sudo: '); -``` - - -### ssh_copy_id -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L222) - -Specify which key to copy to server. -Set to `false` to disable copy of key. - -```php title="Default value" -'~/.ssh/id_rsa.pub' -``` - - - -## Tasks - -### provision -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L20) - -Provision the server. - - - - -This task is group task which contains next tasks: -* [provision:check](/docs/recipe/provision.md#provisioncheck) -* [provision:configure](/docs/recipe/provision.md#provisionconfigure) -* [provision:update](/docs/recipe/provision.md#provisionupdate) -* [provision:upgrade](/docs/recipe/provision.md#provisionupgrade) -* [provision:install](/docs/recipe/provision.md#provisioninstall) -* [provision:ssh](/docs/recipe/provision.md#provisionssh) -* [provision:firewall](/docs/recipe/provision.md#provisionfirewall) -* [provision:deployer](/docs/recipe/provision.md#provisiondeployer) -* [provision:server](/docs/recipe/provision.md#provisionserver) -* [provision:php](/docs/recipe/provision/php.md#provisionphp) -* [provision:databases](/docs/recipe/provision/databases.md#provisiondatabases) -* [provision:composer](/docs/recipe/provision/php.md#provisioncomposer) -* [provision:npm](/docs/recipe/provision/nodejs.md#provisionnpm) -* [provision:website](/docs/recipe/provision/website.md#provisionwebsite) -* [provision:verify](/docs/recipe/provision.md#provisionverify) - - -### provision:check -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L39) - -Checks pre-required state. - - - - -### provision:configure -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L59) - -Collects required params. - - - - -### provision:update -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L82) - -Adds repositories and update. - - - - -### provision:upgrade -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L104) - -Upgrades all packages. - - - - -### provision:install -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L111) - -Installs packages. - - - - -### provision:server -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L145) - -Configures a server. - - - - -### provision:ssh -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L206) - -Configures the ssh. - - - - -### provision:deployer -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L225) - -Setups a deployer user. - - - - -### provision:firewall -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L272) - -Setups a firewall. - - - - -### provision:verify -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision.php#L280) - -Verifies what provision was successful. - - - - diff --git a/docs/recipe/provision/databases.md b/docs/recipe/provision/databases.md deleted file mode 100644 index 082338fe6..000000000 --- a/docs/recipe/provision/databases.md +++ /dev/null @@ -1,90 +0,0 @@ - - - - -# Databases Recipe - -```php -require 'recipe/provision/databases.php'; -``` - -[Source](/recipe/provision/databases.php) - - -## Configuration -### db_type -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L4) - - -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - -### db_name -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L14) - - - -```php title="Default value" -return ask(' DB name: '); -``` - - -### db_user -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L18) - - - -```php title="Default value" -return ask(' DB user: ', 'deployer'); -``` - - -### db_password -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L22) - - - -```php title="Default value" -return askHiddenResponse(' DB password: '); -``` - - - -## Tasks - -### provision:databases -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L27) - -Provision databases. - - - - -### provision:mysql -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L37) - -Provision MySQL. - - - - -### provision:mariadb -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L48) - -Provision MariaDB. - - - - -### provision:postgresql -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/databases.php#L59) - -Provision PostgreSQL. - - - - diff --git a/docs/recipe/provision/nodejs.md b/docs/recipe/provision/nodejs.md deleted file mode 100644 index 9bc63b7d7..000000000 --- a/docs/recipe/provision/nodejs.md +++ /dev/null @@ -1,35 +0,0 @@ - - - - -# Nodejs Recipe - -```php -require 'recipe/provision/nodejs.php'; -``` - -[Source](/recipe/provision/nodejs.php) - - -## Configuration -### nodejs_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/nodejs.php#L5) - -Node.js version from https://github.com/nodesource/distributions. - -```php title="Default value" -'node_16.x' -``` - - - -## Tasks - -### provision:npm -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/nodejs.php#L8) - -Installs npm packages. - - - - diff --git a/docs/recipe/provision/php.md b/docs/recipe/provision/php.md deleted file mode 100644 index 0ccbdb9da..000000000 --- a/docs/recipe/provision/php.md +++ /dev/null @@ -1,51 +0,0 @@ - - - - -# Php Recipe - -```php -require 'recipe/provision/php.php'; -``` - -[Source](/recipe/provision/php.php) - - -## Configuration -### php_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/php.php#L4) - - - -```php title="Default value" -return ask(' What PHP version to install? ', '8.1', ['5.6', '7.4', '8.0', '8.1']); -``` - - - -## Tasks - -### provision:php -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/php.php#L9) - -Installs PHP packages. - - - - -### logs:php-fpm -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/php.php#L60) - -Shows php-fpm logs. - - - - -### provision:composer -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/php.php#L65) - -Installs Composer. - - - - diff --git a/docs/recipe/provision/website.md b/docs/recipe/provision/website.md deleted file mode 100644 index ee8202b16..000000000 --- a/docs/recipe/provision/website.md +++ /dev/null @@ -1,61 +0,0 @@ - - - - -# Website Recipe - -```php -require 'recipe/provision/website.php'; -``` - -[Source](/recipe/provision/website.php) - - -## Configuration -### domain -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L4) - - - -```php title="Default value" -return ask(' Domain: '); -``` - - -### public_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L8) - - - -```php title="Default value" -return ask(' Public path: ', 'public'); -``` - - - -## Tasks - -### provision:website -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L13) - -Provision website. - - - - -### logs:caddy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L82) - -Shows caddy logs. - - - - -### logs:caddy:syslog -[Source](https://github.com/deployphp/deployer/blob/master/recipe/provision/website.php#L87) - -Shows caddy syslog. - - - - diff --git a/docs/recipe/shopware.md b/docs/recipe/shopware.md deleted file mode 100644 index a71fd443b..000000000 --- a/docs/recipe/shopware.md +++ /dev/null @@ -1,257 +0,0 @@ - - - - -# How to Deploy a Shopware Project - -```php -require 'recipe/shopware.php'; -``` - -[Source](/recipe/shopware.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Shopware application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Shopware** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [sw:deploy](/docs/recipe/shopware.md#swdeploy) – - * [sw:database:migrate](/docs/recipe/shopware.md#swdatabasemigrate) – - * [sw:plugin:refresh](/docs/recipe/shopware.md#swpluginrefresh) – - * [sw:cache:clear](/docs/recipe/shopware.md#swcacheclear) – - * [sw:plugin:update:all](/docs/recipe/shopware.md#swpluginupdateall) – - * [sw:cache:clear](/docs/recipe/shopware.md#swcacheclear) – -* [deploy:clear_paths](/docs/recipe/deploy/clear_paths.md#deployclear_paths) – Cleanup files and/or directories -* [sw:cache:warmup](/docs/recipe/shopware.md#swcachewarmup) – -* [sw:writable:jwt](/docs/recipe/shopware.md#swwritablejwt) – -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The shopware recipe is based on the [common](/docs/recipe/common.md) recipe. - - -## Usage - -Add {{repository}} to your _deploy.php_ file: - -```php -set('repository', 'git@github.com:shopware/production.git'); -``` - -:::note -Please remember that the installation must be modified so that it can be -[build without database](https://developer.shopware.com/docs/guides/hosting/installation-updates/deployments/build-w-o-db#compiling-the-storefront-without-database). -::: - - -## Configuration -### default_timeout -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L23) - -Overrides [default_timeout](/docs/recipe/common.md#default_timeout) from `recipe/common.php`. - - - - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L26) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - -These files are shared among all releases. - -```php title="Default value" -[ - '.env', - 'install.lock', - 'public/.htaccess', - 'public/.user.ini', -] -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L34) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -These directories are shared among all releases. - -```php title="Default value" -[ - 'config/jwt', - 'files', - 'var/log', - 'public/media', - 'public/thumbnail', - 'public/sitemap', -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L45) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - -These directories are made writable (the definition of "writable" requires attention). -Please note that the files in `config/jwt/*` receive special attention in the `sw:writable:jwt` task. - -```php title="Default value" -[ - 'config/jwt', - 'custom/plugins', - 'files', - 'public/bundles', - 'public/css', - 'public/fonts', - 'public/js', - 'public/media', - 'public/sitemap', - 'public/theme', - 'public/thumbnail', - 'var', -] -``` - - - -## Tasks - -### sw:cache:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L61) - - - -This task remotely executes the `cache:clear` console command on the target server. - - -### sw:cache:warmup -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L67) - - - -This task remotely executes the cache warmup console commands on the target server, so that the first user, who -visits the website, doesn't have to wait for the cache to be built up. - - -### sw:database:migrate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L73) - - - -This task remotely executes the `database:migrate` console command on the target server. - - -### sw:plugin:refresh -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L77) - - - - - - -### sw:plugin:update:all -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L113) - - - - - - -### sw:writable:jwt -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L123) - - - - - - -### sw:deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L130) - - - -Grouped SW deploy tasks. - - -This task is group task which contains next tasks: -* [sw:database:migrate](/docs/recipe/shopware.md#swdatabasemigrate) -* [sw:plugin:refresh](/docs/recipe/shopware.md#swpluginrefresh) -* [sw:cache:clear](/docs/recipe/shopware.md#swcacheclear) -* [sw:plugin:update:all](/docs/recipe/shopware.md#swpluginupdateall) -* [sw:cache:clear](/docs/recipe/shopware.md#swcacheclear) - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L139) - -Deploys your project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [sw:deploy](/docs/recipe/shopware.md#swdeploy) -* [deploy:clear_paths](/docs/recipe/deploy/clear_paths.md#deployclear_paths) -* [sw:cache:warmup](/docs/recipe/shopware.md#swcachewarmup) -* [sw:writable:jwt](/docs/recipe/shopware.md#swwritablejwt) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - -### sw-build-without-db:get-remote-config -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L149) - - - - - - -### sw-build-without-db:build -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L162) - - - - - - -### sw-build-without-db -[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L166) - - - - - - -This task is group task which contains next tasks: -* [sw-build-without-db:get-remote-config](/docs/recipe/shopware.md#sw-build-without-dbget-remote-config) -* [sw-build-without-db:build](/docs/recipe/shopware.md#sw-build-without-dbbuild) - - diff --git a/docs/recipe/silverstripe.md b/docs/recipe/silverstripe.md deleted file mode 100644 index 659859935..000000000 --- a/docs/recipe/silverstripe.md +++ /dev/null @@ -1,136 +0,0 @@ - - - - -# How to Deploy a Silverstripe Project - -```php -require 'recipe/silverstripe.php'; -``` - -[Source](/recipe/silverstripe.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Silverstripe application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Silverstripe** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [silverstripe:buildflush](/docs/recipe/silverstripe.md#silverstripebuildflush) – Runs /dev/build?flush=all -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The silverstripe recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_assets -[Source](https://github.com/deployphp/deployer/blob/master/recipe/silverstripe.php#L12) - - - -```php title="Default value" -if (test('[ -d {{release_or_current_path}}/public ]') || test('[ -d {{deploy_path}}/shared/public ]')) { -return 'public/assets'; -} -return 'assets'; -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/silverstripe.php#L21) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -Silverstripe shared dirs - -```php title="Default value" -[ - '{{shared_assets}}' -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/silverstripe.php#L26) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - -Silverstripe writable dirs - -```php title="Default value" -[ - '{{shared_assets}}' -] -``` - - -### silverstripe_cli_script -[Source](https://github.com/deployphp/deployer/blob/master/recipe/silverstripe.php#L31) - -Silverstripe cli script -:::info Autogenerated -The value of this configuration is autogenerated on access. -::: - - - - - -## Tasks - -### silverstripe:build -[Source](https://github.com/deployphp/deployer/blob/master/recipe/silverstripe.php#L47) - -Runs /dev/build. - -Helper tasks - - -### silverstripe:buildflush -[Source](https://github.com/deployphp/deployer/blob/master/recipe/silverstripe.php#L52) - -Runs /dev/build?flush=all. - - - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/silverstripe.php#L60) - -Deploys your project. - -Main task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [silverstripe:buildflush](/docs/recipe/silverstripe.md#silverstripebuildflush) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/statamic.md b/docs/recipe/statamic.md deleted file mode 100644 index 9f0d7507b..000000000 --- a/docs/recipe/statamic.md +++ /dev/null @@ -1,222 +0,0 @@ - - - - -# How to Deploy a Statamic Project - -```php -require 'recipe/statamic.php'; -``` - -[Source](/recipe/statamic.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Statamic application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Statamic** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [artisan:storage:link](/docs/recipe/laravel.md#artisanstoragelink) – Creates the symbolic links configured for the application -* [artisan:cache:clear](/docs/recipe/laravel.md#artisancacheclear) – Flushes the application cache -* [statamic:stache:clear](/docs/recipe/statamic.md#statamicstacheclear) – Clears the "Stache" cache -* [statamic:stache:warm](/docs/recipe/statamic.md#statamicstachewarm) – Builds the "Stache" cache -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The statamic recipe is based on the [laravel](/docs/recipe/laravel.md) recipe. - -## Configuration -### statamic_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L15) - - - -```php title="Default value" -$result = run('{{bin/php}} {{release_or_current_path}}/please --version'); -preg_match_all('/(\d+\.?)+/', $result, $matches); -return $matches[0][0] ?? 'unknown'; -``` - - - -## Tasks - -### statamic:addons:discover -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L26) - -Rebuilds the cached addon package manifest. - - - - -### statamic:assets:generate-presets -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L33) - -Generates asset preset manipulations. - - - - -### statamic:assets:meta -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L36) - -Generates asset metadata files. - - - - -### statamic:git:commit -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L43) - -Git add and commit tracked content. - - - - -### statamic:glide:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L50) - -Clears the Glide image cache. - - - - -### statamic:responsive:generate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L57) - -Generates responsive images. - - - - -### statamic:responsive:regenerate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L60) - -Regenerate responsive images. - - - - -### statamic:search:insert -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L67) - -Inserts an item into its search indexes. - - - - -### statamic:search:update -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L70) - -Update a search index. - - - - -### statamic:stache:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L77) - -Clears the "Stache" cache. - - - - -### statamic:stache:doctor -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L80) - -Diagnose any problems with the Stache. - - - - -### statamic:stache:refresh -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L83) - -Clears and rebuild the "Stache" cache. - - - - -### statamic:stache:warm -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L86) - -Builds the "Stache" cache. - - - - -### statamic:static:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L93) - -Clears the static page cache. - - - - -### statamic:static:warm -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L96) - -Warms the static cache by visiting all URLs. - - - - -### statamic:support:details -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L103) - -Outputs details helpful for support requests. - - - - -### statamic:updates:run -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L110) - -Runs update scripts from specific version. - - - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/statamic.php#L118) - -Deploys your project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [artisan:storage:link](/docs/recipe/laravel.md#artisanstoragelink) -* [artisan:cache:clear](/docs/recipe/laravel.md#artisancacheclear) -* [statamic:stache:clear](/docs/recipe/statamic.md#statamicstacheclear) -* [statamic:stache:warm](/docs/recipe/statamic.md#statamicstachewarm) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/sulu.md b/docs/recipe/sulu.md deleted file mode 100644 index cfcc503f7..000000000 --- a/docs/recipe/sulu.md +++ /dev/null @@ -1,87 +0,0 @@ - - - - -# How to Deploy a Sulu Project - -```php -require 'recipe/sulu.php'; -``` - -[Source](/recipe/sulu.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Sulu application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Sulu** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:cache:clear](/docs/recipe/symfony.md#deploycacheclear) – Clears cache -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The sulu recipe is based on the [symfony](/docs/recipe/symfony.md) recipe. - -## Configuration -### bin/websiteconsole -[Source](https://github.com/deployphp/deployer/blob/master/recipe/sulu.php#L12) - - - -```php title="Default value" -return parse('{{bin/php}} {{release_or_current_path}}/bin/websiteconsole --no-interaction'); -``` - - - -## Tasks - -### phpcr:migrate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/sulu.php#L17) - -Migrates PHPCR. - - - - -### deploy:website:cache:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/sulu.php#L22) - -Clears cache. - - - - -### deploy:website:cache:warmup -[Source](https://github.com/deployphp/deployer/blob/master/recipe/sulu.php#L27) - -Warmups cache. - - - - diff --git a/docs/recipe/symfony.md b/docs/recipe/symfony.md deleted file mode 100644 index 5bafaffd4..000000000 --- a/docs/recipe/symfony.md +++ /dev/null @@ -1,183 +0,0 @@ - - - - -# How to Deploy a Symfony Application - -```php -require 'recipe/symfony.php'; -``` - -[Source](/recipe/symfony.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Symfony application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Symfony** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:cache:clear](/docs/recipe/symfony.md#deploycacheclear) – Clears cache -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The symfony recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### symfony_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L8) - - - -```php title="Default value" -$result = run('{{bin/console}} --version'); -preg_match_all('/(\d+\.?)+/', $result, $matches); -return $matches[0][0] ?? 5.0; -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L14) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -[ - 'var/log', -] -``` - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L18) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -[ - '.env.local' -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L22) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -[ - 'var', - 'var/cache', - 'var/log', - 'var/sessions', -] -``` - - -### migrations_config -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L29) - - - - - -### doctrine_schema_validate_config -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L31) - - - - - -### bin/console -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L33) - - - -```php title="Default value" -'{{bin/php}} {{release_or_current_path}}/bin/console' -``` - - -### console_options -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L35) - - - -```php title="Default value" -return '--no-interaction'; -``` - - - -## Tasks - -### database:migrate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L40) - -Migrates database. - - - - -### doctrine:schema:validate -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L50) - -Validate the Doctrine mapping files. - - - - -### deploy:cache:clear -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L55) - -Clears cache. - - - - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L64) - -Deploys project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:cache:clear](/docs/recipe/symfony.md#deploycacheclear) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/typo3.md b/docs/recipe/typo3.md deleted file mode 100644 index ad84e4a4e..000000000 --- a/docs/recipe/typo3.md +++ /dev/null @@ -1,123 +0,0 @@ - - - - -# How to Deploy a TYPO3 Project - -```php -require 'recipe/typo3.php'; -``` - -[Source](/recipe/typo3.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your TYPO3 application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **TYPO3** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The typo3 recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### typo3_webroot -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L11) - -DocumentRoot / WebRoot for the TYPO3 installation - -```php title="Default value" -'Web' -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L26) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -Shared directories - -```php title="Default value" -[ - '{{typo3_webroot}}/fileadmin', - '{{typo3_webroot}}/typo3temp', - '{{typo3_webroot}}/uploads' -] -``` - - -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L35) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - -Shared files - -```php title="Default value" -[ - '{{typo3_webroot}}/.htaccess' -] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L42) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - -Writeable directories - -```php title="Default value" -[ - '{{typo3_webroot}}/fileadmin', - '{{typo3_webroot}}/typo3temp', - '{{typo3_webroot}}/typo3conf', - '{{typo3_webroot}}/uploads' -] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L17) - -Deploys your project. - -Main TYPO3 task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/wordpress.md b/docs/recipe/wordpress.md deleted file mode 100644 index 67c40ff9a..000000000 --- a/docs/recipe/wordpress.md +++ /dev/null @@ -1,100 +0,0 @@ - - - - -# How to Deploy a WordPress Project - -```php -require 'recipe/wordpress.php'; -``` - -[Source](/recipe/wordpress.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your WordPress application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **WordPress** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The wordpress recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/wordpress.php#L8) - -Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -['wp-config.php'] -``` - - -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/wordpress.php#L9) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - - - -```php title="Default value" -['wp-content/uploads'] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/wordpress.php#L10) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - - - -```php title="Default value" -['wp-content/uploads'] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/wordpress.php#L13) - -Deploys your project. - - - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/yii.md b/docs/recipe/yii.md deleted file mode 100644 index af7df22f5..000000000 --- a/docs/recipe/yii.md +++ /dev/null @@ -1,90 +0,0 @@ - - - - -# How to Deploy a Yii2 Project - -```php -require 'recipe/yii.php'; -``` - -[Source](/recipe/yii.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Yii2 application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Yii2** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The yii recipe is based on the [common](/docs/recipe/common.md) recipe. - -## Configuration -### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L9) - -Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. - -Yii shared dirs - -```php title="Default value" -['runtime'] -``` - - -### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L12) - -Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. - -Yii writable dirs - -```php title="Default value" -['runtime'] -``` - - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L18) - -Deploys your project. - -Main task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/recipe/zend_framework.md b/docs/recipe/zend_framework.md deleted file mode 100644 index b9f34b88a..000000000 --- a/docs/recipe/zend_framework.md +++ /dev/null @@ -1,65 +0,0 @@ - - - - -# How to Deploy a Zend Framework Project - -```php -require 'recipe/zend_framework.php'; -``` - -[Source](/recipe/zend_framework.php) - -Deployer is a free and open source deployment tool written in PHP. -It helps you to deploy your Zend Framework application to a server. -It is very easy to use and has a lot of features. - -Three main features of Deployer are: -- **Provisioning** - provision your server for you. -- **Zero downtime deployment** - deploy your application without a downtime. -- **Rollbacks** - rollback your application to a previous version, if something goes wrong. - -Additionally, Deployer has a lot of other features, like: -- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. -- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. -- **Secure** - Deployer uses SSH to connect to your server. -- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. - -You can read more about Deployer in [Getting Started](/docs/getting-started.md). - -The [deploy](#deploy) task of **Zend Framework** consists of: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release - * [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment - * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy - * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy - * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release - * [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code - * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs - * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors -* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release - * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release - * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy - * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases - * [deploy:success](/docs/recipe/common.md#deploysuccess) – - - -The zend_framework recipe is based on the [common](/docs/recipe/common.md) recipe. - - -## Tasks - -### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/zend_framework.php#L12) - -Deploys your project. - -Main task - - -This task is group task which contains next tasks: -* [deploy:prepare](/docs/recipe/common.md#deployprepare) -* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) -* [deploy:publish](/docs/recipe/common.md#deploypublish) - - diff --git a/docs/selector.md b/docs/selector.md deleted file mode 100644 index 8b0e5e306..000000000 --- a/docs/selector.md +++ /dev/null @@ -1,177 +0,0 @@ -# Selector - -Deployer uses the selector to choose hosts. Each host can have a set of labels. -Labels are key-value pairs. - -For example, `stage: production` or `role: web`. - -You can use labels to select hosts. For example, `dep deploy stage=production` -will deploy to all hosts with `stage: production` label. - -Let's define two labels **type** and **env** of our hosts: - -```php -host('web.example.com') - ->setLabels([ - 'type' => 'web', - 'env' => 'prod', - ]); - -host('db.example.com') - ->setLabels([ - 'type' => 'db', - 'env' => 'prod', - ]); -``` - -Now let's define a task to check labels: - -```php -task('info', function () { - writeln('type:' . get('labels')['type'] . ' env:' . get('labels')['env']); -}); -``` - -Now we can run this task on with a selector: - -```bash -$ dep info env=prod -task info -[web.example.com] type:web env:prod -[db.example.com] type:db env:prod -``` - -As you can see, Deployer will run this task on all hosts with `env: prod` label. -And if we define only `type` label, Deployer will run this task on specified host. - -```bash -dep info type=web -task info -[web.example.com] type:web env:prod -``` - -## Selector syntax - -Label syntax is represented by [disjunctive normal form](https://en.wikipedia.org/wiki/Disjunctive_normal_form) -(**OR of ANDs**). - -For example, `type=web,env=prod` is a selector of: `type=web` **OR** `env=prod`. - -```bash -$ dep info 'type=web,env=prod' -task info -[web.example.com] type:web env:prod -[db.example.com] type:db env:prod -``` - -As you can see both hosts are selected (as both of them has `env: prod` label). - -We can use `&` to define **AND**. For example, `type=web & env=prod` is a selector -for hosts with `type: web` **AND** `env: prod` labels. - -```bash -$ dep info 'type=web & env=prod' -task info -[web.example.com] type:web env:prod -``` - -We can also use `!=` to negate a label. For example, `type!=web` is a selector for -all hosts what has not `type: web` label. - -```bash -$ dep info 'type!=web' -task info -[db.example.com] type:db env:prod -``` - -:::note -Deployer CLI can take a few selectors as arguments. For example, -`dep info type=web env=prod` is a same as `dep info 'type=web,env=prod'`. - -You can install bash autocompletion for Deployer CLI, which will help you to -write selectors. See [installation](installation.md) for more. -::: - -Deployer also has a few special selectors: - -- `all` - select all hosts -- `alias=...` - select host by alias - -If a selector does not contain `=` sign, Deployer will assume that it is an alias. - -For example `dep info web.example.com` is a same as `dep info alias=web.example.com`. - -```bash -$ dep info web.example.com -task info -[web.example.com] type:web env:prod -``` - -```bash -$ dep info 'web.example.com' 'db.example.com' -$ # Same as: -$ dep info 'alias=web.example.com,alias=db.example.com' -```` - -## Using select() function - -You can use [select()](api.md#select) function to select hosts by selector from PHP code. - -```php -task('info', function () { - $hosts = select('type=web,env=prod'); - foreach ($hosts as $host) { - writeln('type:' . $host->get('labels')['type'] . ' env:' . $host->get('labels')['env']); - } -}); -``` - -Or you can use [on()](api.md#on) function to run a task on selected hosts. - -```php -task('info', function () { - on(select('all'), function () { - writeln('type:' . get('labels')['type'] . ' env:' . get('labels')['env']); - }); -}); -``` - -## Task selectors - -To restrict a task to run only on selected hosts, you can use [select()](tasks.md#select) method. - -```php -task('info', function () { - // ... -})->select('type=web,env=prod'); -``` - -## Labels in YAML - -You can also define labels in YAML recipe. For example: - -```yaml -hosts: - web.example.com: - remote_user: deployer - env: production - labels: - env: prod -``` - -But make sure to distinguish between `env` and `labels.env` keys. -`env` is a configuration key, and `labels.env` is a label. - -```php -task('info', function () { - writeln('env:' . get('env') . ' labels.env:' . get('labels')['env']); -}); -``` - -Will print: - -```bash -$ dep info env=prod -task info -[web.example.com] env:production labels.env:prod -``` diff --git a/docs/sidebar.js b/docs/sidebar.js deleted file mode 100644 index c465bc5ab..000000000 --- a/docs/sidebar.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = [ - "installation", - "getting-started", - "basics", - { - type: "category", - label: "Main Concepts", - items: ["hosts", "tasks", "selector"], - }, - "ci-cd", - "yaml", - "cli", - "api", - { - type: "category", - label: "Other", - items: ["avoid-php-fpm-reloading", "UPGRADE", "KNOWN_BUGS"], - }, -]; diff --git a/docs/tasks.md b/docs/tasks.md deleted file mode 100644 index 406ccd586..000000000 --- a/docs/tasks.md +++ /dev/null @@ -1,135 +0,0 @@ -# Tasks - -Define a tasks by using the [task](api.md#task) function. Also, you can give a description -for a task with the [desc](api.md#desc) function called before _task_: - -```php -desc('My task'); -task('my_task', function () { - .... -}); -``` - -To get the task or override task config call the _task_ function without second argument: - -```php -task('my_task')->disable(); -``` - -## Task config - -### desc() - -Sets task's description. - -```php -task('deploy', function () { - // ... -})->desc('Task description'); -``` - -Same as using [desc()](api.md#desc) func helper: - -```php -desc('Task description'); -task('deploy', function () { - // ... -}); -``` - -### once() - -Sets the task to run only on one of selected hosts. - -### oncePerNode() - -Sets the task to run only on **one node** of selected hosts. - -Node determined by [hostname](hosts.md#hostname). For example a few different -hosts can be deploying to one physical machine (uniq hostname). - -```php -host('foo')->setHostname('example.com'); -host('bar')->setHostname('example.com'); -host('pro')->setHostname('another.com'); - -task('apt:update', function () { - // This task will be executed twice, only on "foo" and "pro" hosts. - run('apt-get update'); -})->oncePerNode(); -``` - -### hidden() - -Hides task from CLI usage page. - -### addBefore() - -Adds before hook to the task. - -### addAfter() - -Adds after hook to the task. - -### limit() - -Limits number of hosts the task will be executed in parallel. - -Default is unlimited (runs the task on all host in parallel). - -### select() - -Sets task's host selector. - -### addSelector() - -Adds task's selector. - -### verbose() - -Makes task always verbose. As if `-v` option persists. - -### disable() - -Disables the task. Task will not be executed. - -### enable() - -Enables the task. - -## Task grouping - -You can combine tasks in groups: - -```php -task('deploy', [ - 'deploy:prepare', - 'deploy:update_code', - 'deploy:vendors', - 'deploy:symlink', - 'cleanup' -]); -``` - -## Task hooks - -You can define tasks to be run before or after specific tasks. - -```php -task('deploy:done', function () { - writeln('Deploy done!'); -}); - -after('deploy', 'deploy:done'); -``` - -After the `deploy` task executed, `deploy:done` will be triggered. - -:::note -You can see which hooks is enabled via **dep tree** command. - -``` -dep tree deploy -``` - -::: diff --git a/docs/yaml.md b/docs/yaml.md deleted file mode 100644 index 71906117e..000000000 --- a/docs/yaml.md +++ /dev/null @@ -1,31 +0,0 @@ -# YAML - -Deployer supports recipes written in YAML. For validating structure, Deployer uses -JSON Schema declared in [schema.json](https://github.com/deployphp/deployer/blob/master/src/schema.json). - -Here is an example of YAML recipe: - -```yaml -import: - - recipe/laravel.php - -config: - repository: "git@github.com:example/example.com.git" - remote_user: deployer - -hosts: - example.com: - deploy_path: "~/example" - -tasks: - build: - - cd: "{{release_path}}" - - run: "npm run build" - -after: - deploy:failed: deploy:unlock -``` - -YAML recipes can include recipes written in PHP. For example, some tasks maybe written in PHP and imported in YAML. - -Also, other way around is possible: import YAML recipe from PHP. Use [import()](api.md#import) function for that. diff --git a/phpcs.xml b/phpcs.xml deleted file mode 100644 index df21cf250..000000000 --- a/phpcs.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - src - - - - - - diff --git a/phpstan.neon b/phpstan.neon deleted file mode 100644 index 99d3c05a4..000000000 --- a/phpstan.neon +++ /dev/null @@ -1,15 +0,0 @@ -includes: - - tests/phpstan-baseline.neon - -parameters: - level: 5 - paths: - - src - - recipe - - contrib - - ignoreErrors: - - "#^Constant DEPLOYER_VERSION not found\\.$#" - - "#^Constant DEPLOYER_BIN not found\\.$#" - - "#CpanelPhp#" - - "#AMQPMessage#" diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index 9d98c66bf..000000000 --- a/phpunit.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - src/ - recipe/ - - - vendor/ - bin/ - - - - - tests/src/ - - - tests/legacy/ - - - tests/joy/ - - - diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 6835938bd..000000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,40 +0,0 @@ -&1`; -`cd $repository && git add .`; -`cd $repository && git config user.name 'Anton Medvedev'`; -`cd $repository && git config user.email 'anton.medv@example.com'`; -`cd $repository && git commit -m 'first commit'`; diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile deleted file mode 100644 index edd5914c2..000000000 --- a/tests/docker/Dockerfile +++ /dev/null @@ -1,102 +0,0 @@ -FROM php:7.3-cli-alpine AS composer -RUN apk add wget -COPY ./scripts/install-composer.sh /tmp/install-composer.sh -RUN sh /tmp/install-composer.sh - - - - - -FROM php:7.3-cli-alpine AS deployer -RUN apk add \ - git \ - openssh-client \ - rsync - -RUN ssh-keygen \ - -q \ - -b 2048 \ - -t rsa \ - -f ~/.ssh/id_rsa - -RUN git config --global user.email "e2e@deployer.test" \ - && git config --global user.name "E2E Deployer" - -ARG XDEBUG_VERSION=2.9.8 -RUN set -eux; \ - apk add --no-cache --virtual .build-deps $PHPIZE_DEPS; \ - pecl install xdebug-$XDEBUG_VERSION; \ - docker-php-ext-enable xdebug; \ - apk del .build-deps - -COPY scripts/php-code-coverage/coverage-start-wrapper.php /usr/local/etc/php/php-code-coverage/ -COPY conf/10-coverage.ini /usr/local/etc/php/conf.d/ - -COPY --from=composer /tmp/composer /bin/composer -VOLUME [ "/project" ] -WORKDIR /project - - - - - -FROM php:7.3-apache AS server -RUN apt-get update && apt-get install -y \ - acl \ - git \ - openssh-server \ - sudo \ - && rm -rf /var/lib/apt/lists/* - -# SSH login fix. Otherwise user is kicked off after login -RUN mkdir /run/sshd \ - && sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd - -# Configure Apache to expose healthcheck & configure site to use /var/www/html/current ad document root -COPY conf/healthcheck.conf /etc/apache2/sites-available/healthcheck.conf -COPY ./initial-site /var/www/html/initial-site - -ENV APACHE_DOCUMENT_ROOT /var/www/html/current/public -RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/000-default.conf \ - && sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \ - && ln -s /var/www/html/initial-site /var/www/html/current \ - && chown -R www-data:www-data /var/www/html \ - && echo "Listen 81" >> /etc/apache2/ports.conf \ - && a2enmod rewrite \ - && a2ensite healthcheck - -RUN useradd \ - --create-home \ - deployer \ - && echo 'deployer:deployer' | chpasswd \ - && echo 'deployer ALL=(ALL) ALL' >> /etc/sudoers \ - && mkdir ~deployer/.ssh \ - && touch ~deployer/.ssh/authorized_keys \ - && chown -R deployer:deployer ~deployer/.ssh \ - && chmod 700 ~deployer/.ssh \ - && chmod 600 ~deployer/.ssh/authorized_keys \ - && usermod -a -G www-data deployer - -RUN useradd \ - --create-home \ - git \ - && mkdir ~git/.ssh \ - && touch ~git/.ssh/authorized_keys \ - && chown -R git:git ~git/.ssh \ - && chmod 700 ~git/.ssh \ - && chmod 700 ~git/.ssh/authorized_keys \ - && mkdir ~git/repository \ - && git init --bare ~git/repository \ - && chown -R git:git ~git/repository - -COPY scripts/start-servers.sh /usr/local/bin/start-servers -COPY --from=composer /tmp/composer /usr/local/bin/composer -COPY --from=deployer /root/.ssh/id_rsa.pub /tmp/root_rsa.pub - -RUN chmod a+x /usr/local/bin/start-servers \ - && cat /tmp/root_rsa.pub >> ~deployer/.ssh/authorized_keys \ - && cat /tmp/root_rsa.pub >> ~git/.ssh/authorized_keys \ - && rm -rf /tmp/root_rsa.pub - -EXPOSE 22 80 81 -CMD [ "start-servers" ] diff --git a/tests/docker/README.md b/tests/docker/README.md deleted file mode 100644 index eb7ef2342..000000000 --- a/tests/docker/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Deployer E2E testing environment - -This directory contains an end-to-end testing environment for Deployer. - -All commands mentioned in this readme, should be executed in the `docker` directory. - -## Requirements - -* Docker -* docker-compose - -## Running tests - -The E2E are started when running the `docker-compose up` command. -This will start the `server` container that has the Apache, OpenSSH & PHP 7.3 enabled. - -Once the `server` is up and running, the `deployer` container will be started and alongside it -the tests will be ran. - -## Adding new E2E tests - -The E2E test should be a part of the `e2e` test suite. -Each `e2e` test class should inherit from `AbstractE2ETest` class. - -Note: E2E tests will only run in an environment where env variable `E2E_ENV` has been set and has a truthy value. - -## Manually accessing the `deployer` container. - -The container can be accessed by running: - -``` -docker-compose run deployer sh -``` - -This command will spawn a `sh` shell inside the `deployer` container. - -## About containers - -### `deployer` container - -The `deployer` container contains: - -* git -* PHP 7.3 with XDebug enabled -* rsync -* SSH client - -It is possible to access the `server` container via ssh by running: - -``` -ssh deployer@server -``` - -`root`'s public key has been added to authorized keys for `deployer` user. - -#### Enabling XDebug - -To enable XDebug create a `docker-compose.override.yml` file with following content: - -```dockerfile -services: - deployer: - environment: - # See https://docs.docker.com/docker-for-mac/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host - # See https://github.com/docker/for-linux/issues/264 - # The `remote_host` below may optionally be replaced with `remote_connect_back=1` - XDEBUG_CONFIG: >- - remote_enable=1 - remote_host=${XDEBUG_HOST:-host.docker.internal} - remote_autostart=1 - remote_port=9000 - idekey=PHPSTORM - # This should correspond to the server declared in PHPStorm `Preferences | Languages & Frameworks | PHP | Servers` - # Then PHPStorm will use the corresponding path mappings - PHP_IDE_CONFIG: serverName=deployer-e2e -``` - -Note: you may want to set the `XDEBUG_HOST` env variable to point to your IP address when running tests in Linux. - -### `server` container - -The `server` container contains: - -* Apache (with the `DocumentRoot` set to `/var/www/html/current`) -* git -* PHP 7.3 -* SSH server with -* sudo (user `deployer` can use `sudo` after providing a password: `deployer`) diff --git a/tests/docker/conf/10-coverage.ini b/tests/docker/conf/10-coverage.ini deleted file mode 100644 index 038ce7c9e..000000000 --- a/tests/docker/conf/10-coverage.ini +++ /dev/null @@ -1,2 +0,0 @@ -auto_prepend_file = /usr/local/etc/php/php-code-coverage/coverage-start-wrapper.php -auto_append_file = /usr/local/etc/php/php-code-coverage/coverage-start-wrapper.php \ No newline at end of file diff --git a/tests/docker/conf/healthcheck.conf b/tests/docker/conf/healthcheck.conf deleted file mode 100644 index f51410f86..000000000 --- a/tests/docker/conf/healthcheck.conf +++ /dev/null @@ -1,32 +0,0 @@ - - # The ServerName directive sets the request scheme, hostname and port that - # the server uses to identify itself. This is used when creating - # redirection URLs. In the context of virtual hosts, the ServerName - # specifies what hostname must appear in the request's Host: header to - # match this virtual host. For the default virtual host (this file) this - # value is not decisive as it is used as a last resort host regardless. - # However, you must set it for any further virtual host explicitly. - #ServerName www.example.com - - ServerAdmin webmaster@localhost - DocumentRoot /var/www/html - - # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, - # error, crit, alert, emerg. - # It is also possible to configure the loglevel for particular - # modules, e.g. - #LogLevel info ssl:warn - - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - RewriteEngine on - RedirectMatch 204 /health_check - - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf - diff --git a/tests/docker/docker-compose.yml b/tests/docker/docker-compose.yml deleted file mode 100644 index cd51b193a..000000000 --- a/tests/docker/docker-compose.yml +++ /dev/null @@ -1,48 +0,0 @@ -version: '2.4' - -services: - deployer: - build: - context: "" - target: deployer - depends_on: - server: - condition: service_healthy - volumes: - - ./../../:/project - command: "sh /project/tests/e2e/coverage/start-e2e-test.sh" - networks: - - e2e - environment: - PHP_CCOV_START_FILE: '/project/tests/e2e/coverage/coverage-start.php' - PHP_CCOV_OUTPUT_FILE: '/project/tests/e2e/report/clover.xml' -# # See https://docs.docker.com/docker-for-mac/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host -# # See https://github.com/docker/for-linux/issues/264 -# # The `remote_host` below may optionally be replaced with `remote_connect_back=1` -# XDEBUG_CONFIG: >- -# remote_enable=1 -# remote_host=${XDEBUG_RHOST:-host.docker.internal} -# remote_autostart=1 -# remote_port=9000 -# idekey=PHPSTORM -# # This should correspond to the server declared in PHPStorm `Preferences | Languages & Frameworks | PHP | Servers` -# # Then PHPStorm will use the corresponding path mappings -# PHP_IDE_CONFIG: serverName=deployer-e2e - - server: - build: - context: "" - target: server - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:81/health_check"] - interval: 5s - timeout: 2s - retries: 3 - start_period: 2s - networks: - e2e: - aliases: - - server.test - -networks: - e2e: diff --git a/tests/docker/initial-site/public/index.html b/tests/docker/initial-site/public/index.html deleted file mode 100644 index 5016ba876..000000000 --- a/tests/docker/initial-site/public/index.html +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World! - - \ No newline at end of file diff --git a/tests/docker/scripts/install-composer.sh b/tests/docker/scripts/install-composer.sh deleted file mode 100644 index e2ac87df5..000000000 --- a/tests/docker/scripts/install-composer.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -EXPECTED_CHECKSUM="$(wget -q -O - https://composer.github.io/installer.sig)" -php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" -ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" - -if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] -then - >&2 echo 'ERROR: Invalid installer checksum' - rm composer-setup.php - exit 1 -fi - -php composer-setup.php --quiet --install-dir=/tmp --filename=composer -RESULT=$? -rm composer-setup.php -chmod a+x /tmp/composer -exit $RESULT \ No newline at end of file diff --git a/tests/docker/scripts/php-code-coverage/coverage-start-wrapper.php b/tests/docker/scripts/php-code-coverage/coverage-start-wrapper.php deleted file mode 100644 index a93060aa3..000000000 --- a/tests/docker/scripts/php-code-coverage/coverage-start-wrapper.php +++ /dev/null @@ -1,5 +0,0 @@ -tester = new ConsoleApplicationTester(__DIR__ . '/../../bin/dep', __DIR__); - } -} diff --git a/tests/e2e/ConsoleApplicationTester.php b/tests/e2e/ConsoleApplicationTester.php deleted file mode 100644 index 3136b291b..000000000 --- a/tests/e2e/ConsoleApplicationTester.php +++ /dev/null @@ -1,147 +0,0 @@ -binaryPath ], $arguments); - - $outputArgs = []; - foreach ($arguments as $key => $value) { - if (!is_numeric($key)) { - $outputArgs[] = $key; - } - - $outputArgs[] = $value; - } - - return $outputArgs; - } - - private function prepareProcess(array $arguments): Process - { - $commandLine = $this->generateCommand($arguments); - - $process = new Process($commandLine); - $process->setTimeout($this->timeout); - - if (!empty($this->inputs)) { - $inputs = self::createInputsStream($this->inputs); - $process->setInput($inputs); - } - - if (!empty($this->cwd)) { - $process->setWorkingDirectory($this->cwd); - } - - return $process; - } - - public function __construct(string $binaryPath, string $cwd = '') - { - $this->binaryPath = $binaryPath; - $this->cwd = $cwd; - } - - public function __destruct() - { - if ($this->process && $this->process->isRunning()) { - $this->process->stop(0); - } - } - - /** - * @param int $timeout timout in seconds after which process will be stopped - * @return $this - */ - public function setTimeout(int $timeout): self - { - $this->timeout = $timeout; - return $this; - } - - public function setInputs(array $inputs): self - { - $this->inputs = $inputs; - return $this; - } - - public function run(array $arguments): self - { - if ($this->process && $this->process->isRunning()) { - throw new \RuntimeException('Previous process did not end yet'); - } - - $this->process = $this->prepareProcess($arguments); - $this->process->run(); - - return $this; - } - - public function getDisplay(bool $normalize = false): string - { - if ($this->process === null) { - throw new \RuntimeException('Output not initialized, did you execute the command before requesting the display?'); - } - - $display = $this->process->getOutput(); - if ($normalize) { - $display = str_replace(\PHP_EOL, "\n", $display); - } - - return $display; - } - - public function getErrors(bool $normalize = false): string - { - if ($this->process === null) { - throw new \RuntimeException('Error output not initialized, did you execute the command before requesting the display?'); - } - - $display = $this->process->getErrorOutput(); - if ($normalize) { - $display = str_replace(\PHP_EOL, "\n", $display); - } - - return $display; - } - - public function getStatusCode() - { - if ($this->process === null) { - throw new \RuntimeException('Status code not initialized, did you execute the command before requesting the display?'); - } - - return $this->process->getExitCode(); - } -} diff --git a/tests/e2e/FunctionsE2ETest.php b/tests/e2e/FunctionsE2ETest.php deleted file mode 100644 index eec7fc4d5..000000000 --- a/tests/e2e/FunctionsE2ETest.php +++ /dev/null @@ -1,24 +0,0 @@ -tester->run([ - '-f' => self::RECIPE, - 'test:functions:run-with-placeholders', - 'all', - ]); - - $display = trim($this->tester->getDisplay()); - - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('placeholder {{bar}} xyz%', $display); - } -} diff --git a/tests/e2e/LaravelBoilerplateE2ETest.php b/tests/e2e/LaravelBoilerplateE2ETest.php deleted file mode 100644 index 7110811c4..000000000 --- a/tests/e2e/LaravelBoilerplateE2ETest.php +++ /dev/null @@ -1,37 +0,0 @@ -tester->setTimeout(180) - ->run([ - '-f' => self::RECIPE, - 'deploy', - 'all', - ]); - - $display = trim($this->tester->getDisplay()); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - - $siteContent = file_get_contents('http://server.test'); - $expectedSiteContent = "Build v8."; - self::assertStringContainsString($expectedSiteContent, $siteContent); - } - - protected function tearDown(): void - { - parent::tearDown(); - - if ($this->tester) { - $this->tester->run([ - '-f' => self::RECIPE, - 'deploy:unlock', - 'all', - ]); - } - } -} diff --git a/tests/e2e/MiscE2ETest.php b/tests/e2e/MiscE2ETest.php deleted file mode 100644 index e800d5948..000000000 --- a/tests/e2e/MiscE2ETest.php +++ /dev/null @@ -1,45 +0,0 @@ -tester->setInputs(['deployer']); - - $this->tester->run([ - '-f' => self::RECIPE, - 'test:misc:sudo-write-user', - 'all', - ]); - - $display = trim($this->tester->getDisplay()); - - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('Current user is: root', $display); - } - - /** - * @group e2e - */ - public function testSudoWithPasswordProvidedViaArgument(): void - { - $this->tester->run([ - '-f' => self::RECIPE, - 'test:misc:sudo-write-user', - '-o' => 'sudo_pass=deployer', - 'all', - ]); - - $display = trim($this->tester->getDisplay()); - - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('Current user is: root', $display); - } -} diff --git a/tests/e2e/SymfonyBoilerplateE2ETest.php b/tests/e2e/SymfonyBoilerplateE2ETest.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/e2e/TimeoutsE2ETest.php b/tests/e2e/TimeoutsE2ETest.php deleted file mode 100644 index ce12d6a03..000000000 --- a/tests/e2e/TimeoutsE2ETest.php +++ /dev/null @@ -1,25 +0,0 @@ -tester->run([ - '-f' => self::RECIPE, - 'test:timeouts', - 'all', - '-v', - ]); - - $display = trim($this->tester->getDisplay()); - - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('+timeout', $display); - } -} diff --git a/tests/e2e/bootstrap.php b/tests/e2e/bootstrap.php deleted file mode 100644 index f95e2e680..000000000 --- a/tests/e2e/bootstrap.php +++ /dev/null @@ -1,14 +0,0 @@ -includeDirectory('/project'); -$filter->excludeDirectory('/project/vendor'); -$filter->excludeDirectory('/project/tests'); - -$outputCoverage = new CodeCoverage( - (new Selector)->forLineCoverage($filter), - $filter -); - -$coverageReports = glob("/tmp/ccov/*.php"); -foreach ($coverageReports as $reportPath) { - /** @var CodeCoverage $partialCoverage */ - $partialCoverage = include $reportPath; - if (!$partialCoverage) { - throw new \Exception("Failed to load coverage report from file '{$reportPath}'"); - } - $outputCoverage->merge($partialCoverage); -} - -$cloverReport = new Clover(); -$cloverReport->process($outputCoverage, $outputFile); - -echo "Clover report file written to {$outputFile}\n"; - diff --git a/tests/e2e/coverage/coverage-start.php b/tests/e2e/coverage/coverage-start.php deleted file mode 100644 index 538669856..000000000 --- a/tests/e2e/coverage/coverage-start.php +++ /dev/null @@ -1,60 +0,0 @@ -includeDirectory('/project'); -$filter->excludeDirectory('/project/vendor'); -$filter->excludeDirectory('/project/tests'); -$report = new PHPReport(); - -$coverage = new CodeCoverage( - (new Selector)->forLineCoverage($filter), - $filter -); - -$outputDir = '/tmp/ccov'; -if (!is_dir($outputDir)) { - mkdir($outputDir); -} - -// use anonymous class as we don't really want to pollute class space with this stuff -(new class ($coverage, $report, $outputDir) { - /** @var CodeCoverage */ - private $coverage; - /** @var PHPReport */ - private $report; - /** @var string */ - private $outputDir; - /** @var string|null */ - private $coverageName; - - public function __construct(CodeCoverage $coverage, PHPReport $report, string $outputDir) { - $this->coverage = $coverage; - $this->report = $report; - $this->outputDir = $outputDir; - } - - public function start():void { - register_shutdown_function([$this, 'stop']); - - $coverageName = uniqid('coverage_'); - $this->coverageName = $coverageName; - $this->coverage->start($this->coverageName); - } - - public function stop():void { - $this->coverage->stop(); - - $outputFile = $this->outputDir . "/{$this->coverageName}.php"; - $this->report->process($this->coverage, $outputFile); - } -})->start(); - - - diff --git a/tests/e2e/coverage/start-e2e-test.sh b/tests/e2e/coverage/start-e2e-test.sh deleted file mode 100644 index ba82ffe23..000000000 --- a/tests/e2e/coverage/start-e2e-test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -ROOTDIR=$(readlink -f "$(dirname "$0")/../../..") - -# Run E2E tests and grab exit code of the process -php "$ROOTDIR/vendor/bin/pest" --config "$ROOTDIR/tests/e2e/phpunit-e2e.xml" -E2E_EXIT_CODE=$? - -# Generate coverage report file -php "$ROOTDIR/tests/e2e/coverage/coverage-report.php" - -return $E2E_EXIT_CODE \ No newline at end of file diff --git a/tests/e2e/phpunit-e2e.xml b/tests/e2e/phpunit-e2e.xml deleted file mode 100644 index aac4227af..000000000 --- a/tests/e2e/phpunit-e2e.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - . - - - diff --git a/tests/e2e/recipe/functions.php b/tests/e2e/recipe/functions.php deleted file mode 100644 index e3eaa3c43..000000000 --- a/tests/e2e/recipe/functions.php +++ /dev/null @@ -1,14 +0,0 @@ - '{{bar}}', 'baz' => 'xyz%']; - - $output = run($cmd, ['env' => $env]); - output()->writeln($output); // we use this to skip \Deployer\parse() being called in normal \Deployer\writeln() -}); diff --git a/tests/e2e/recipe/hosts.php b/tests/e2e/recipe/hosts.php deleted file mode 100644 index 89906faf5..000000000 --- a/tests/e2e/recipe/hosts.php +++ /dev/null @@ -1,13 +0,0 @@ -setDeployPath('/var/www/html') - ->set('bin/php', '/usr/local/bin/php') - ->setTag('e2e') - ->setRemoteUser('deployer') - ->set('timeout', 600) - ->setSshArguments([ - '-o UserKnownHostsFile=/dev/null', - '-o StrictHostKeyChecking=no', - ]); diff --git a/tests/e2e/recipe/laravel-boilerplate.php b/tests/e2e/recipe/laravel-boilerplate.php deleted file mode 100644 index 8a31898b8..000000000 --- a/tests/e2e/recipe/laravel-boilerplate.php +++ /dev/null @@ -1,29 +0,0 @@ -disable(); - -before('deploy:shared', 'laravel:setup-env'); -before('artisan:storage:link', 'artisan:key:generate'); diff --git a/tests/e2e/recipe/misc.php b/tests/e2e/recipe/misc.php deleted file mode 100644 index c3d2a4cb8..000000000 --- a/tests/e2e/recipe/misc.php +++ /dev/null @@ -1,12 +0,0 @@ - 1 ] ); - } catch (TimeoutException $e) { - $ps = run("if ps aux | grep '[p]hp -r while(true){}'; then echo still running; else echo +timeout; fi"); - if ($ps != '+timeout') { - throw new \Exception('Process still running.'); - } - } -}); - diff --git a/tests/fixtures/project/uploaded.html b/tests/fixtures/project/uploaded.html deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/fixtures/repository/.env b/tests/fixtures/repository/.env deleted file mode 100644 index ead49fb51..000000000 --- a/tests/fixtures/repository/.env +++ /dev/null @@ -1 +0,0 @@ -ENV=prod diff --git a/tests/fixtures/repository/README.md b/tests/fixtures/repository/README.md deleted file mode 100644 index 32d99c612..000000000 --- a/tests/fixtures/repository/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Example repository - - diff --git a/tests/fixtures/repository/composer.json b/tests/fixtures/repository/composer.json deleted file mode 100644 index 4d13e3c6e..000000000 --- a/tests/fixtures/repository/composer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "ಠ_ಠ", - "require": { - "php": "^7.3" - } -} diff --git a/tests/fixtures/repository/uploads/poem.txt b/tests/fixtures/repository/uploads/poem.txt deleted file mode 100644 index e5c64ea00..000000000 --- a/tests/fixtures/repository/uploads/poem.txt +++ /dev/null @@ -1,12 +0,0 @@ -Night, street, lamp, drugstore, -A dull and meaningless light. -Go on and live another quarter century - -Nothing will change. There's no way out. - -You'll die, then start from the beginning, -It will repeat, just like before: -Night, icy ripples on a canal, -Drugstore, street, lamp. - - A. A. Blok - 10 October 1912 diff --git a/tests/joy/HostDefaultConfigTest.php b/tests/joy/HostDefaultConfigTest.php deleted file mode 100644 index 3cfdacc33..000000000 --- a/tests/joy/HostDefaultConfigTest.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace joy; - -class HostDefaultConfigTest extends JoyTest -{ - protected function recipe(): string - { - return <<<'PHP' -getPort(); - writeln(empty($port) ? 'empty' : "port:$port"); -}); -PHP; - } - - public function testOnFunc() - { - $this->dep('test'); - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('empty', $display); - } -} diff --git a/tests/joy/JoyTest.php b/tests/joy/JoyTest.php deleted file mode 100644 index 5d95df15c..000000000 --- a/tests/joy/JoyTest.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace joy; - -use Deployer\Deployer; -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tester\ApplicationTester; -use const __TEMP_DIR__; - -abstract class JoyTest extends TestCase -{ - /** - * @var ApplicationTester - */ - protected $tester; - - /** - * @var Deployer - */ - protected $deployer; - - public static function setUpBeforeClass(): void - { - self::cleanUp(); - mkdir(__TEMP_DIR__); - } - - public static function tearDownAfterClass(): void - { - self::cleanUp(); - } - - protected static function cleanUp() - { - if (is_dir(__TEMP_DIR__)) { - exec('rm -rf ' . __TEMP_DIR__); - } - } - - protected function init(string $recipe) - { - $console = new Application(); - $console->setAutoExit(false); - $this->tester = new ApplicationTester($console); - - $this->deployer = new Deployer($console); - $this->deployer->importer->import($recipe); - $this->deployer->init(); - $this->deployer->config->set('deploy_path', __TEMP_DIR__ . '/{{hostname}}'); - } - - protected function dep(string $task, array $args = []): int - { - $recipe = __TEMP_DIR__ . '/' . get_called_class() . '.php'; - file_put_contents($recipe, $this->recipe()); - $this->init($recipe); - return $this->tester->run(array_merge([ - $task, - 'selector' => 'all', - '--file' => $recipe, - '--limit' => 1 - ], $args), [ - 'verbosity' => OutputInterface::VERBOSITY_VERBOSE, - 'interactive' => false, - ]); - } - - abstract protected function recipe(): string; -} diff --git a/tests/joy/OnFuncTest.php b/tests/joy/OnFuncTest.php deleted file mode 100644 index f2d6bb1f7..000000000 --- a/tests/joy/OnFuncTest.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace joy; - -class OnFuncTest extends JoyTest -{ - protected function recipe(): string - { - return <<<'PHP' -once(); -PHP; - } - - public function testOnFunc() - { - putenv('DEPLOYER_LOCAL_WORKER=false'); - $this->dep('test'); - putenv('DEPLOYER_LOCAL_WORKER=true'); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('[prod] foo = prod', $display); - self::assertStringContainsString('[beta] foo = beta', $display); - } -} diff --git a/tests/legacy/AbstractTest.php b/tests/legacy/AbstractTest.php deleted file mode 100644 index bc8a08590..000000000 --- a/tests/legacy/AbstractTest.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Tester\ApplicationTester; - -/** - * @deprecated Use JoyTest instead. - */ -abstract class AbstractTest extends TestCase -{ - /** - * @var ApplicationTester - */ - protected $tester; - - /** - * @var Deployer - */ - protected $deployer; - - public static function setUpBeforeClass(): void - { - self::cleanUp(); - mkdir(__TEMP_DIR__); - } - - public static function tearDownAfterClass(): void - { - self::cleanUp(); - } - - protected static function cleanUp() - { - if (is_dir(__TEMP_DIR__)) { - exec('rm -rf ' . __TEMP_DIR__); - } - } - - protected function init(string $recipe) - { - $console = new Application(); - $console->setAutoExit(false); - $this->tester = new ApplicationTester($console); - - $this->deployer = new Deployer($console); - $this->deployer->importer->import($recipe); - $this->deployer->init(); - $this->deployer->config->set('deploy_path', __TEMP_DIR__ . '/{{hostname}}'); - } - - protected function dep(string $recipe, string $task) - { - $this->init($recipe); - $this->tester->run([ - $task, - 'selector' => 'all', - '-f' => $recipe, - '-l' => 1 - ], [ - 'verbosity' => Output::VERBOSITY_VERBOSE, - 'interactive' => false, - ]); - } -} diff --git a/tests/legacy/CurrentPathTest.php b/tests/legacy/CurrentPathTest.php deleted file mode 100644 index 96b7c49e4..000000000 --- a/tests/legacy/CurrentPathTest.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Symfony\Component\Console\Output\Output; - -class CurrentPathTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/deploy.php'; - - public function testDeployWithDifferentCurrentPath() - { - $currentPath = __TEMP_DIR__ . '/prod/public_html'; - - $this->init(self::RECIPE); - $this->tester->run([ - 'deploy', - 'selector' => 'prod', - '-f' => self::RECIPE, - '-o' => ['current_path=' . $currentPath], - ], [ - 'verbosity' => Output::VERBOSITY_VERBOSE, - ]); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertFileExists($currentPath . '/README.md'); - self::assertFileExists($currentPath . '/config/test.yaml'); - } -} diff --git a/tests/legacy/DeployTest.php b/tests/legacy/DeployTest.php deleted file mode 100644 index e62079d22..000000000 --- a/tests/legacy/DeployTest.php +++ /dev/null @@ -1,144 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Symfony\Component\Console\Output\Output; - -class DeployTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/deploy.php'; - - public function testDeploy() - { - $display = $this->dep(self::RECIPE, 'deploy'); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - - foreach ($this->deployer->hosts as $host) { - $deployPath = $host->get('deploy_path'); - - self::assertDirectoryExists($deployPath . '/.dep'); - self::assertDirectoryExists($deployPath . '/releases'); - self::assertDirectoryExists($deployPath . '/shared'); - self::assertDirectoryExists($deployPath . '/current'); - self::assertDirectoryExists($deployPath . '/current/'); - self::assertFileExists($deployPath . '/current/README.md'); - self::assertDirectoryExists($deployPath . '/current/storage/logs'); - self::assertDirectoryExists($deployPath . '/current/storage/db'); - self::assertDirectoryExists($deployPath . '/shared/storage/logs'); - self::assertDirectoryExists($deployPath . '/shared/storage/db'); - self::assertFileExists($deployPath . '/shared/uploads/poem.txt'); - self::assertFileExists($deployPath . '/shared/.env'); - self::assertFileExists($deployPath . '/current/config/test.yaml'); - self::assertFileExists($deployPath . '/shared/config/test.yaml'); - self::assertEquals(1, intval(exec("cd $deployPath && ls -1 releases | wc -l"))); - } - } - - public function testDeploySelectHosts() - { - $this->init(self::RECIPE); - $this->tester->setInputs(['0,1']); - $this->tester->run(['deploy', '-f' => self::RECIPE, '-l' => 1], [ - 'verbosity' => Output::VERBOSITY_NORMAL, - 'interactive' => true, - ]); - self::assertEquals(0, $this->tester->getStatusCode(), $this->tester->getDisplay()); - } - - public function testKeepReleases() - { - for ($i = 0; $i < 3; $i++) { - $this->dep(self::RECIPE, 'deploy'); - self::assertEquals(0, $this->tester->getStatusCode(), $this->tester->getDisplay()); - } - - for ($i = 0; $i < 6; $i++) { - $this->dep(self::RECIPE, 'deploy:fail'); - self::assertEquals(1, $this->tester->getStatusCode(), $this->tester->getDisplay()); - } - - for ($i = 0; $i < 3; $i++) { - $this->dep(self::RECIPE, 'deploy'); - self::assertEquals(0, $this->tester->getStatusCode(), $this->tester->getDisplay()); - } - - foreach ($this->deployer->hosts as $host) { - $deployPath = $host->get('deploy_path'); - - self::assertEquals(3, intval(exec("cd $deployPath && ls -1 releases | wc -l"))); - } - } - - /** - * @depends testKeepReleases - */ - public function testRollback() - { - $this->dep(self::RECIPE, 'rollback'); - - self::assertEquals(0, $this->tester->getStatusCode(), $this->tester->getDisplay()); - - foreach ($this->deployer->hosts as $host) { - $deployPath = $host->get('deploy_path'); - - self::assertEquals(3, intval(exec("cd $deployPath && ls -1 releases | wc -l"))); - } - } - - public function testFail() - { - $this->dep(self::RECIPE, 'deploy:fail'); - - $display = $this->tester->getDisplay(); - self::assertEquals(1, $this->tester->getStatusCode(), $display); - - foreach ($this->deployer->hosts as $host) { - $deployPath = $host->get('deploy_path'); - - self::assertEquals('ok', exec("cd $deployPath && [ -f .dep/deploy.lock ] || echo ok"), 'fail hooks deploy:unlock did not run'); - } - } - - /** - * @depends testFail - */ - public function testCleanup() - { - $this->dep(self::RECIPE, 'deploy:cleanup'); - - self::assertEquals(0, $this->tester->getStatusCode(), $this->tester->getDisplay()); - - foreach ($this->deployer->hosts as $host) { - $deployPath = $host->get('deploy_path'); - - self::assertFileDoesNotExist($deployPath . '/release'); - } - } - - public function testIsUnlockedExitsWithOneWhenDeployIsLocked() - { - $this->dep(self::RECIPE, 'deploy:lock'); - $this->dep(self::RECIPE, 'deploy:is_locked'); - $display = $this->tester->getDisplay(); - - self::assertStringContainsString('Deploy is locked by ', $display); - self::assertSame(1, $this->tester->getStatusCode()); - } - - public function testIsUnlockedExitsWithZeroWhenDeployIsNotLocked() - { - $this->dep(self::RECIPE, 'deploy:unlock'); - $this->dep(self::RECIPE, 'deploy:is_locked'); - $display = $this->tester->getDisplay(); - - self::assertStringContainsString('Deploy is unlocked.', $display); - self::assertSame(0, $this->tester->getStatusCode()); - } -} diff --git a/tests/legacy/EnvTest.php b/tests/legacy/EnvTest.php deleted file mode 100644 index 27b4c0552..000000000 --- a/tests/legacy/EnvTest.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -class EnvTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/env.php'; - - public function testOnce() - { - $this->dep(self::RECIPE, 'test'); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('global=global', $display); - self::assertStringContainsString('local=local', $display); - self::assertStringContainsString('dotenv=Hello, world!', $display); - self::assertStringContainsString('dotenv=local', $display); - } -} diff --git a/tests/legacy/NamedArgumentsTest.php b/tests/legacy/NamedArgumentsTest.php deleted file mode 100644 index 7b19a0d96..000000000 --- a/tests/legacy/NamedArgumentsTest.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Symfony\Component\Console\Output\Output; - -// TODO: Wait until Deployer 7.1 with only php8 supports. -//class NamedArgumentsTest extends AbstractTest -//{ -// const RECIPE = __DIR__ . '/recipe/named_arguments.php'; -// -// public function testRunWithNamedArguments() -// { -// $this->init(self::RECIPE); -// $this->tester->run(['named_arguments', '-f' => self::RECIPE], ['verbosity' => Output::VERBOSITY_VERBOSE]); -// -// $display = $this->tester->getDisplay(); -// self::assertEquals(0, $this->tester->getStatusCode(), $display); -// self::assertStringContainsString('Hello, world!', $display); -// } -// -// public function testRunWithOptions() -// { -// $this->init(self::RECIPE); -// $this->tester->run(['options', '-f' => self::RECIPE], ['verbosity' => Output::VERBOSITY_VERBOSE]); -// -// $display = $this->tester->getDisplay(); -// self::assertEquals(0, $this->tester->getStatusCode(), $display); -// self::assertStringContainsString('Hello, Anton!', $display); -// } -// -// public function testRunWithOptionsWithNamedArguments() -// { -// $this->init(self::RECIPE); -// $this->tester->run(['options_with_named_arguments', '-f' => self::RECIPE], ['verbosity' => Output::VERBOSITY_VERBOSE]); -// -// $display = $this->tester->getDisplay(); -// self::assertEquals(0, $this->tester->getStatusCode(), $display); -// self::assertStringContainsString('Hello, override!', $display); -// } -// -// public function testRunLocallyWithNamedArguments() -// { -// $this->init(self::RECIPE); -// $this->tester->run(['run_locally_named_arguments', '-f' => self::RECIPE], ['verbosity' => Output::VERBOSITY_VERBOSE]); -// -// $display = $this->tester->getDisplay(); -// self::assertEquals(0, $this->tester->getStatusCode(), $display); -// self::assertStringContainsString('Hello, world!', $display); -// } -//} diff --git a/tests/legacy/OncePerNodeTest.php b/tests/legacy/OncePerNodeTest.php deleted file mode 100644 index b42c88229..000000000 --- a/tests/legacy/OncePerNodeTest.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -class OncePerNodeTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/once_per_node.php'; - - public function testOnce() - { - $this->dep(self::RECIPE, 'test_once_per_node'); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('alias: group_a_1 hostname: localhost', $display); - self::assertStringNotContainsString('alias: group_a_2 hostname: localhost', $display); - self::assertStringContainsString('alias: group_b_1 hostname: group_b_1', $display); - self::assertStringNotContainsString('alias: group_b_2 hostname: group_b_2', $display); - } -} diff --git a/tests/legacy/OnceTest.php b/tests/legacy/OnceTest.php deleted file mode 100644 index 540a21a36..000000000 --- a/tests/legacy/OnceTest.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -class OnceTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/once.php'; - - public function testOnce() - { - $this->dep(self::RECIPE, 'test_once'); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertTrue(substr_count($display, 'SHOULD BE ONCE') == 1, $display); - } -} diff --git a/tests/legacy/ParallelTest.php b/tests/legacy/ParallelTest.php deleted file mode 100644 index 4f84f66c5..000000000 --- a/tests/legacy/ParallelTest.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Symfony\Component\Console\Output\Output; - -class ParallelTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/parallel.php'; - - public static function setUpBeforeClass(): void - { - parent::setUpBeforeClass(); - putenv('DEPLOYER_LOCAL_WORKER=false'); // Allow to start workers. Don't forget to disable it later. - } - - public static function tearDownAfterClass(): void - { - putenv('DEPLOYER_LOCAL_WORKER=true'); - parent::tearDownAfterClass(); - } - - public function testWorker() - { - $this->init(self::RECIPE); - $this->tester->run([ - 'echo', - '-f' => self::RECIPE, - 'selector' => 'all' - ], [ - 'verbosity' => Output::VERBOSITY_NORMAL, - ]); - self::assertEquals(0, $this->tester->getStatusCode(), $this->tester->getDisplay()); - } - - public function testServer() - { - $this->init(self::RECIPE); - $this->tester->setInputs(['prod', 'Black bear']); - $this->tester->run([ - 'ask', - '-f' => self::RECIPE, - ], [ - 'verbosity' => Output::VERBOSITY_NORMAL, - 'interactive' => true, - ]); - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('[prod] Question: What kind of bear is best?', $display); - self::assertStringContainsString('[prod] Black bear', $display); - } - - public function testOption() - { - $this->init(self::RECIPE); - $this->tester->run( - [ - 'echo', - 'selector' => 'all', - '-o' => ['greet=Hello'], - '-f' => self::RECIPE, - //'-l' => 1, - ], - [ - 'verbosity' => Output::VERBOSITY_DEBUG, - 'interactive' => false, - ] - ); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringContainsString('[prod] Hello, prod!', $display); - self::assertStringContainsString('[beta] Hello, beta!', $display); - } - - public function testCachedHostConfig() - { - $this->init(self::RECIPE); - $this->tester->run([ - 'cache_config_test', - '-f' => self::RECIPE, - 'selector' => 'all' - ], [ - 'verbosity' => Output::VERBOSITY_NORMAL, - ]); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertTrue(substr_count($display, 'worker on prod') == 1, $display); - self::assertTrue(substr_count($display, 'worker on beta') == 1, $display); - } - - public function testHostConfigFromCallback() - { - $this->init(self::RECIPE); - $this->tester->run([ - 'host_config_from_callback', - '-f' => self::RECIPE, - 'selector' => 'all' - ], [ - 'verbosity' => Output::VERBOSITY_NORMAL, - ]); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertTrue(substr_count($display, '[prod] config value is from global') == 1, $display); - self::assertTrue(substr_count($display, '[beta] config value is from callback') == 1, $display); - } -} diff --git a/tests/legacy/SelectTest.php b/tests/legacy/SelectTest.php deleted file mode 100644 index ccb6b43b0..000000000 --- a/tests/legacy/SelectTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Symfony\Component\Console\Output\Output; - -class SelectTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/select.php'; - - public function testSelect() - { - $this->init(self::RECIPE); - $this->tester->run([ - 'test', - '-f' => self::RECIPE, - 'selector' => 'prod' - ], [ - 'verbosity' => Output::VERBOSITY_DEBUG, - ]); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertStringNotContainsString('executing on prod', $display); - self::assertStringContainsString('executing on beta', $display); - self::assertStringContainsString('executing on dev', $display); - } -} diff --git a/tests/legacy/UpdateCodeTest.php b/tests/legacy/UpdateCodeTest.php deleted file mode 100644 index cd2018d5b..000000000 --- a/tests/legacy/UpdateCodeTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Symfony\Component\Console\Output\Output; - -class UpdateCodeTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/update_code.php'; - - public function testDeployWithDifferentUpdateCodeTask() - { - $this->init(self::RECIPE); - $this->tester->run([ - 'deploy', - 'selector' => 'prod', - '-f' => self::RECIPE, - ], [ - 'verbosity' => Output::VERBOSITY_VERBOSE, - ]); - - $display = $this->tester->getDisplay(); - $deployPath = $this->deployer->hosts->get('prod')->getDeployPath(); - - self::assertEquals(0, $this->tester->getStatusCode(), $display); - self::assertFileExists($deployPath . '/current/uploaded.html'); - } -} diff --git a/tests/legacy/YamlTest.php b/tests/legacy/YamlTest.php deleted file mode 100644 index f4854d079..000000000 --- a/tests/legacy/YamlTest.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Symfony\Component\Console\Output\Output; - -class YamlTest extends AbstractTest -{ - const RECIPE = __DIR__ . '/recipe/deploy.yaml'; - - public function testDeploy() - { - $this->init(self::RECIPE); - $this->deployer->config->set('repository', __REPOSITORY__); - $this->tester->run([ - 'deploy', - 'selector' => 'all', - '-f' => self::RECIPE - ], [ - 'verbosity' => Output::VERBOSITY_VERBOSE, - 'interactive' => false, - ]); - - $display = $this->tester->getDisplay(); - self::assertEquals(0, $this->tester->getStatusCode(), $display); - - foreach ($this->deployer->hosts as $host) { - $deployPath = $host->get('deploy_path'); - - self::assertDirectoryExists($deployPath . '/.dep'); - self::assertDirectoryExists($deployPath . '/releases'); - self::assertDirectoryExists($deployPath . '/shared'); - self::assertDirectoryExists($deployPath . '/current'); - self::assertDirectoryExists($deployPath . '/current/'); - self::assertFileExists($deployPath . '/current/README.md'); - self::assertDirectoryExists($deployPath . '/current/storage/logs'); - self::assertDirectoryExists($deployPath . '/current/storage/db'); - self::assertDirectoryExists($deployPath . '/shared/storage/logs'); - self::assertDirectoryExists($deployPath . '/shared/storage/db'); - self::assertFileExists($deployPath . '/shared/uploads/poem.txt'); - self::assertFileExists($deployPath . '/shared/.env'); - self::assertFileExists($deployPath . '/current/config/test.yaml'); - self::assertFileExists($deployPath . '/shared/config/test.yaml'); - self::assertEquals(1, intval(`cd $deployPath && ls -1 releases | wc -l`)); - } - } -} diff --git a/tests/legacy/recipe/deploy.php b/tests/legacy/recipe/deploy.php deleted file mode 100644 index 23d4907ae..000000000 --- a/tests/legacy/recipe/deploy.php +++ /dev/null @@ -1,47 +0,0 @@ -&1'); -}); - -task('deploy:fail', [ - 'deploy:prepare', - 'fail', - 'deploy:publish' -]); - -task('fail', function () { - run('false'); -}); - -fail('deploy:fail', 'deploy:unlock'); diff --git a/tests/legacy/recipe/deploy.yaml b/tests/legacy/recipe/deploy.yaml deleted file mode 100644 index cddacf5de..000000000 --- a/tests/legacy/recipe/deploy.yaml +++ /dev/null @@ -1,27 +0,0 @@ -import: recipe/common.php - -config: - application: deployer - shared_dirs: - - uploads - - storage/logs/ - - storage/db - shared_files: - - .env - - config/test.yaml - keep_releases: 3 - http_user: false - -hosts: - prod: - local: true - -tasks: - deploy: - - deploy:prepare - - deploy:vendors - - deploy:publish - - deploy:vendors: - - cd: '{{release_path}}' - - run: echo {{bin/composer}} {{composer_options}} 2>&1 diff --git a/tests/legacy/recipe/env.php b/tests/legacy/recipe/env.php deleted file mode 100644 index 09da6f9c7..000000000 --- a/tests/legacy/recipe/env.php +++ /dev/null @@ -1,22 +0,0 @@ - 'global', -]); - -task('test', function () { - info('global=' . run('echo $VAR')); - info('local=' . run('echo $VAR', ['env' => ['VAR' => 'local']])); - info('dotenv=' . run('echo $KEY')); - info('dotenv=' . run('echo $KEY', ['env' => ['KEY' => 'local']])); -}); - -before('test', function () { - run('mkdir -p {{deploy_path}}'); - run('echo KEY="\'Hello, world!\'" > {{deploy_path}}/.env'); - set('dotenv', '{{deploy_path}}/.env'); -}); diff --git a/tests/legacy/recipe/named_arguments.php b/tests/legacy/recipe/named_arguments.php deleted file mode 100644 index 204412185..000000000 --- a/tests/legacy/recipe/named_arguments.php +++ /dev/null @@ -1,22 +0,0 @@ - 'world']); -}); - -task('options', function () { - run('echo "Hello, $name!"', ['env' => ['name' => 'Anton']]); -}); - -task('options_with_named_arguments', function () { - // The `options:` arg has higher priority than named arguments. - run('echo "Hello, $name!"', ['env' => ['name' => 'override']], env: ['name' => 'world']); -}); - -task('run_locally_named_arguments', function () { - runLocally('echo "Hello, $name!"', env: ['name' => 'world']); -}); diff --git a/tests/legacy/recipe/once.php b/tests/legacy/recipe/once.php deleted file mode 100644 index 84f8bbe24..000000000 --- a/tests/legacy/recipe/once.php +++ /dev/null @@ -1,10 +0,0 @@ -once(); diff --git a/tests/legacy/recipe/once_per_node.php b/tests/legacy/recipe/once_per_node.php deleted file mode 100644 index d41c66e19..000000000 --- a/tests/legacy/recipe/once_per_node.php +++ /dev/null @@ -1,16 +0,0 @@ -setHostname('localhost'); -localhost('group_a_2') - ->setHostname('localhost'); -localhost('group_b_1') - ->setLabels(['node' => 'anna']); -localhost('group_b_2') - ->setLabels(['node' => 'anna']); - -task('test_once_per_node', function () { - writeln('alias: {{alias}} hostname: {{hostname}}'); -})->oncePerNode(); diff --git a/tests/legacy/recipe/parallel.php b/tests/legacy/recipe/parallel.php deleted file mode 100644 index f95c125e8..000000000 --- a/tests/legacy/recipe/parallel.php +++ /dev/null @@ -1,49 +0,0 @@ -set('host_level_callback_config', function () { - return 'from callback'; - }); - -// testServer: - -task('ask', function () { - $answer = ask('Question: What kind of bear is best?'); - writeln($answer); -}); - -// testWorker, testOption: - -set('greet', '_'); - -task('echo', function () { - $alias = currentHost()->getAlias(); - run("echo {{greet}}, $alias!"); -}); - -// testCachedHostConfig: - -set('upper_host', function () { - writeln('running ' . (Deployer::isWorker() ? 'worker' : 'master') . ' on ' . currentHost()->getAlias()); - return strtoupper(currentHost()->getAlias()); -}); - -task('cache_config_test', function () { - writeln('echo 1: {{upper_host}}'); -}); - -after('cache_config_test', function () { - writeln('echo 2: {{upper_host}}'); -}); - -// testHostConfigFromCallback: - -set('host_level_callback_config', 'from global'); - -task('host_config_from_callback', function () { - writeln('config value is {{host_level_callback_config}}'); -}); - diff --git a/tests/legacy/recipe/select.php b/tests/legacy/recipe/select.php deleted file mode 100644 index 8951edbfe..000000000 --- a/tests/legacy/recipe/select.php +++ /dev/null @@ -1,13 +0,0 @@ -setLabels(['env' => 'prod']); -localhost('beta')->setLabels(['env' => 'dev']); -localhost('dev')->setLabels(['env' => 'dev']); - -task('test', function () { - on(select('env=dev'), function () { - info('executing on {{alias}}'); - }); -}); diff --git a/tests/legacy/recipe/update_code.php b/tests/legacy/recipe/update_code.php deleted file mode 100644 index 637f1e83c..000000000 --- a/tests/legacy/recipe/update_code.php +++ /dev/null @@ -1,9 +0,0 @@ -\" between 100|125|200|100000 and 0 is always true\\.$#" - count: 1 - path: ../src/Command/BlackjackCommand.php - - - - message: "#^Else branch is unreachable because previous condition is always true\\.$#" - count: 1 - path: ../src/Command/BlackjackCommand.php - - - - message: "#^If condition is always true\\.$#" - count: 1 - path: ../src/Command/BlackjackCommand.php - - - - message: "#^If condition is always false\\.$#" - count: 1 - path: ../src/Command/BlackjackCommand.php - - - - message: "#^Comparison operation \"\\>\" between 0 and 0 is always false\\.$#" - count: 1 - path: ../src/Command/BlackjackCommand.php - - - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 2 - path: ../src/Component/PharUpdate/Exception/Exception.php - - - - message: "#^Unsafe usage of new static\\(\\)\\.$#" - count: 1 - path: ../src/Component/PharUpdate/Manifest.php - - - - message: "#^If condition is always true\\.$#" - count: 1 - path: ../src/Host/Host.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 - path: ../src/Importer/Importer.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 - path: ../src/functions.php - diff --git a/tests/src/Collection/CollectionTest.php b/tests/src/Collection/CollectionTest.php deleted file mode 100644 index 7d7da392b..000000000 --- a/tests/src/Collection/CollectionTest.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Collection; - -use Deployer\Host\HostCollection; -use Deployer\Task\TaskCollection; -use PHPUnit\Framework\TestCase; - -class CollectionTest extends TestCase -{ - public static function collections() - { - return [ - [new Collection()], - [new TaskCollection()], - [new HostCollection()], - ]; - } - - /** - * @dataProvider collections - */ - public function testCollection($collection) - { - $this->assertInstanceOf(Collection::class, $collection); - - $object = new \stdClass(); - $collection->set('object', $object); - - $this->assertTrue($collection->has('object')); - $this->assertEquals($object, $collection->get('object')); - - $this->assertEquals(['object' => $object], $collection->select(function ($value, $key) use ($object) { - return $value === $object && $key === 'object'; - })); - } - - /** - * @dataProvider collections - * @depends testCollection - */ - public function testException($collection) - { - $this->expectException(\InvalidArgumentException::class); - $collection->get('unexpected'); - } -} diff --git a/tests/src/Command/BlackjackCommandTest.php b/tests/src/Command/BlackjackCommandTest.php deleted file mode 100644 index 6faa6331a..000000000 --- a/tests/src/Command/BlackjackCommandTest.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Component\Pimple; - -use Deployer\Component\Pimple\Exception\FrozenServiceException; -use Deployer\Component\Pimple\Exception\InvalidServiceIdentifierException; -use Deployer\Component\Pimple\Exception\UnknownIdentifierException; -use InvalidArgumentException; -use PHPUnit\Framework\TestCase; -use ReflectionProperty; -use RuntimeException; -use function extension_loaded; - -class PimpleTest extends TestCase -{ - public function testWithString() - { - $pimple = new Container(); - $pimple['param'] = 'value'; - - $this->assertEquals('value', $pimple['param']); - } - - public function testWithClosure() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Service(); - }; - - $this->assertInstanceOf(Service::class, $pimple['service']); - } - - public function testServicesShouldBeDifferent() - { - $pimple = new Container(); - $pimple['service'] = $pimple->factory(function () { - return new Service(); - }); - - $serviceOne = $pimple['service']; - $this->assertInstanceOf(Service::class, $serviceOne); - - $serviceTwo = $pimple['service']; - $this->assertInstanceOf(Service::class, $serviceTwo); - - $this->assertNotSame($serviceOne, $serviceTwo); - } - - public function testShouldPassContainerAsParameter() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Service(); - }; - $pimple['container'] = function ($container) { - return $container; - }; - - $this->assertNotSame($pimple, $pimple['service']); - $this->assertSame($pimple, $pimple['container']); - } - - public function testIsset() - { - $pimple = new Container(); - $pimple['param'] = 'value'; - $pimple['service'] = function () { - return new Service(); - }; - - $pimple['null'] = null; - - $this->assertTrue(isset($pimple['param'])); - $this->assertTrue(isset($pimple['service'])); - $this->assertTrue(isset($pimple['null'])); - $this->assertFalse(isset($pimple['non_existent'])); - } - - public function testConstructorInjection() - { - $params = ['param' => 'value']; - $pimple = new Container($params); - - $this->assertSame($params['param'], $pimple['param']); - } - - public function testOffsetGetValidatesKeyIsPresent() - { - $this->expectException(UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - echo $pimple['foo']; - } - - /** - * @group legacy - */ - public function testLegacyOffsetGetValidatesKeyIsPresent() - { - $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - echo $pimple['foo']; - } - - public function testOffsetGetHonorsNullValues() - { - $pimple = new Container(); - $pimple['foo'] = null; - $this->assertNull($pimple['foo']); - } - - public function testUnset() - { - $pimple = new Container(); - $pimple['param'] = 'value'; - $pimple['service'] = function () { - return new Service(); - }; - - unset($pimple['param'], $pimple['service']); - $this->assertFalse(isset($pimple['param'])); - $this->assertFalse(isset($pimple['service'])); - } - - /** - * @dataProvider serviceDefinitionProvider - */ - public function testShare($service) - { - $pimple = new Container(); - $pimple['shared_service'] = $service; - - $serviceOne = $pimple['shared_service']; - $this->assertInstanceOf(Service::class, $serviceOne); - - $serviceTwo = $pimple['shared_service']; - $this->assertInstanceOf(Service::class, $serviceTwo); - - $this->assertSame($serviceOne, $serviceTwo); - } - - /** - * @dataProvider serviceDefinitionProvider - */ - public function testProtect($service) - { - $pimple = new Container(); - $pimple['protected'] = $pimple->protect($service); - - $this->assertSame($service, $pimple['protected']); - } - - public function testGlobalFunctionNameAsParameterValue() - { - $pimple = new Container(); - $pimple['global_function'] = 'strlen'; - $this->assertSame('strlen', $pimple['global_function']); - } - - public function testRaw() - { - $pimple = new Container(); - $pimple['service'] = $definition = $pimple->factory(function () { - return 'foo'; - }); - $this->assertSame($definition, $pimple->raw('service')); - } - - public function testRawHonorsNullValues() - { - $pimple = new Container(); - $pimple['foo'] = null; - $this->assertNull($pimple->raw('foo')); - } - - public function testRawValidatesKeyIsPresent() - { - $this->expectException(UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple->raw('foo'); - } - - /** - * @group legacy - */ - public function testLegacyRawValidatesKeyIsPresent() - { - $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple->raw('foo'); - } - - /** - * @dataProvider serviceDefinitionProvider - */ - public function testExtend($service) - { - $pimple = new Container(); - $pimple['shared_service'] = function () { - return new Service(); - }; - $pimple['factory_service'] = $pimple->factory(function () { - return new Service(); - }); - - $pimple->extend('shared_service', $service); - $serviceOne = $pimple['shared_service']; - $this->assertInstanceOf(Service::class, $serviceOne); - $serviceTwo = $pimple['shared_service']; - $this->assertInstanceOf(Service::class, $serviceTwo); - $this->assertSame($serviceOne, $serviceTwo); - $this->assertSame($serviceOne->value, $serviceTwo->value); - - $pimple->extend('factory_service', $service); - $serviceOne = $pimple['factory_service']; - $this->assertInstanceOf(Service::class, $serviceOne); - $serviceTwo = $pimple['factory_service']; - $this->assertInstanceOf(Service::class, $serviceTwo); - $this->assertNotSame($serviceOne, $serviceTwo); - $this->assertNotSame($serviceOne->value, $serviceTwo->value); - } - - public function testExtendDoesNotLeakWithFactories() - { - if (extension_loaded('pimple')) { - $this->markTestSkipped('Pimple extension does not support this test'); - } - $pimple = new Container(); - - $pimple['foo'] = $pimple->factory(function () { - return; - }); - $pimple['foo'] = $pimple->extend('foo', function ($foo, $pimple) { - return; - }); - unset($pimple['foo']); - - $p = new ReflectionProperty($pimple, 'values'); - $p->setAccessible(true); - $this->assertEmpty($p->getValue($pimple)); - - $p = new ReflectionProperty($pimple, 'factories'); - $p->setAccessible(true); - $this->assertCount(0, $p->getValue($pimple)); - } - - public function testExtendValidatesKeyIsPresent() - { - $this->expectException(UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple->extend('foo', function () { - }); - } - - /** - * @group legacy - */ - public function testLegacyExtendValidatesKeyIsPresent() - { - $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple->extend('foo', function () { - }); - } - - public function testKeys() - { - $pimple = new Container(); - $pimple['foo'] = 123; - $pimple['bar'] = 123; - - $this->assertEquals(['foo', 'bar'], $pimple->keys()); - } - - /** @test */ - public function settingAnInvokableObjectShouldTreatItAsFactory() - { - $pimple = new Container(); - $pimple['invokable'] = new Invokable(); - - $this->assertInstanceOf(Service::class, $pimple['invokable']); - } - - /** @test */ - public function settingNonInvokableObjectShouldTreatItAsParameter() - { - $pimple = new Container(); - $pimple['non_invokable'] = new NonInvokable(); - - $this->assertInstanceOf(NonInvokable::class, $pimple['non_invokable']); - } - - /** - * @dataProvider badServiceDefinitionProvider - */ - public function testFactoryFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\TypeError::class); - $pimple = new Container(); - $pimple->factory($service); - } - - /** - * @group legacy - * @dataProvider badServiceDefinitionProvider - */ - public function testLegacyFactoryFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\TypeError::class); - $pimple = new Container(); - $pimple->factory($service); - } - - /** - * @dataProvider badServiceDefinitionProvider - */ - public function testProtectFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\TypeError::class); - $pimple = new Container(); - $pimple->protect($service); - } - - /** - * @group legacy - * @dataProvider badServiceDefinitionProvider - */ - public function testLegacyProtectFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\TypeError::class); - $pimple = new Container(); - $pimple->protect($service); - } - - /** - * @dataProvider badServiceDefinitionProvider - */ - public function testExtendFailsForKeysNotContainingServiceDefinitions($service) - { - $this->expectException(InvalidServiceIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" does not contain an object definition.'); - - $pimple = new Container(); - $pimple['foo'] = $service; - $pimple->extend('foo', function () { - }); - } - - /** - * @group legacy - * @dataProvider badServiceDefinitionProvider - */ - public function testLegacyExtendFailsForKeysNotContainingServiceDefinitions($service) - { - $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Identifier "foo" does not contain an object definition.'); - - $pimple = new Container(); - $pimple['foo'] = $service; - $pimple->extend('foo', function () { - }); - } - - /** - * @group legacy - * @expectedDeprecation How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "foo" should be protected? - */ - public function testExtendingProtectedClosureDeprecation() - { - $pimple = new Container(); - $pimple['foo'] = $pimple->protect(function () { - return 'bar'; - }); - - $pimple->extend('foo', function ($value) { - return $value . '-baz'; - }); - - $this->assertSame('bar-baz', $pimple['foo']); - } - - /** - * @dataProvider badServiceDefinitionProvider - */ - public function testExtendFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\TypeError::class); - $pimple = new Container(); - $pimple['foo'] = function () { - }; - $pimple->extend('foo', $service); - } - - /** - * @group legacy - * @dataProvider badServiceDefinitionProvider - */ - public function testLegacyExtendFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\TypeError::class); - $pimple = new Container(); - $pimple['foo'] = function () { - }; - $pimple->extend('foo', $service); - } - - public function testExtendFailsIfFrozenServiceIsNonInvokable() - { - $this->expectException(FrozenServiceException::class); - $this->expectExceptionMessage('Cannot override frozen service "foo".'); - - $pimple = new Container(); - $pimple['foo'] = function () { - return new NonInvokable(); - }; - $foo = $pimple['foo']; - - $pimple->extend('foo', function () { - }); - } - - public function testExtendFailsIfFrozenServiceIsInvokable() - { - $this->expectException(FrozenServiceException::class); - $this->expectExceptionMessage('Cannot override frozen service "foo".'); - - $pimple = new Container(); - $pimple['foo'] = function () { - return new Invokable(); - }; - $foo = $pimple['foo']; - - $pimple->extend('foo', function () { - }); - } - - /** - * Provider for invalid service definitions. - */ - public function badServiceDefinitionProvider() - { - return [ - [123], - [new NonInvokable()], - ]; - } - - /** - * Provider for service definitions. - */ - public function serviceDefinitionProvider() - { - return [ - [function ($value) { - $service = new Service(); - $service->value = $value; - - return $service; - }], - [new Invokable()], - ]; - } - - public function testDefiningNewServiceAfterFreeze() - { - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $foo = $pimple['foo']; - - $pimple['bar'] = function () { - return 'bar'; - }; - $this->assertSame('bar', $pimple['bar']); - } - - public function testOverridingServiceAfterFreeze() - { - $this->expectException(FrozenServiceException::class); - $this->expectExceptionMessage('Cannot override frozen service "foo".'); - - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $foo = $pimple['foo']; - - $pimple['foo'] = function () { - return 'bar'; - }; - } - - /** - * @group legacy - */ - public function testLegacyOverridingServiceAfterFreeze() - { - $this->expectException(RuntimeException::class); - $this->expectExceptionMessage('Cannot override frozen service "foo".'); - - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $foo = $pimple['foo']; - - $pimple['foo'] = function () { - return 'bar'; - }; - } - - public function testRemovingServiceAfterFreeze() - { - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $foo = $pimple['foo']; - - unset($pimple['foo']); - $pimple['foo'] = function () { - return 'bar'; - }; - $this->assertSame('bar', $pimple['foo']); - } - - public function testExtendingService() - { - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $pimple['foo'] = $pimple->extend('foo', function ($foo, $app) { - return "$foo.bar"; - }); - $pimple['foo'] = $pimple->extend('foo', function ($foo, $app) { - return "$foo.baz"; - }); - $this->assertSame('foo.bar.baz', $pimple['foo']); - } - - public function testExtendingServiceAfterOtherServiceFreeze() - { - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $pimple['bar'] = function () { - return 'bar'; - }; - $foo = $pimple['foo']; - - $pimple['bar'] = $pimple->extend('bar', function ($bar, $app) { - return "$bar.baz"; - }); - $this->assertSame('bar.baz', $pimple['bar']); - } -} - -class Invokable -{ - public function __invoke($value = null) - { - $service = new Service(); - $service->value = $value; - - return $service; - } -} - -class NonInvokable -{ - public function __call($a, $b) - { - } -} - -class Service -{ - public $value; -} diff --git a/tests/src/Component/Ssh/IOArgumentsTest.php b/tests/src/Component/Ssh/IOArgumentsTest.php deleted file mode 100644 index 4a722cde1..000000000 --- a/tests/src/Component/Ssh/IOArgumentsTest.php +++ /dev/null @@ -1,34 +0,0 @@ -set('foo', 'a'); - $config['bar'] = 'b'; - - self::assertEquals('a b', $config->parse('{{foo}} {{bar}}')); - } - - public function testUnset() - { - $config = new Configuration(); - $config->set('opt', true); - unset($config['opt']); - self::assertFalse(isset($config['opt'])); - } - - public function testGet() - { - $config = new Configuration(); - $config->set('opt', true); - $config->set('fn', function () { - return 'func'; - }); - - self::assertTrue(isset($config['opt'])); - self::assertEquals(true, $config['opt']); - self::assertEquals('func', $config['fn']); - } - - public function testGetDefault() - { - $config = new Configuration(); - $config->set('name', 'alpha'); - - self::assertEquals('/alpha', $config->get('path', '/{{name}}')); - } - - public function testGetException() - { - $this->expectException(ConfigurationException::class); - - $config = new Configuration(); - $config->set('name', 'alpha'); - - self::assertEquals('/alpha', $config->get('path')); - } - - public function testGetParent() - { - $parent = new Configuration(); - $config = new Configuration($parent); - - $parent->set('opt', 'value'); - self::assertEquals('value', $parent['opt']); - self::assertEquals('value', $config['opt']); - - $parent->set('opt', 'newValue'); - self::assertEquals('newValue', $parent['opt']); - self::assertEquals('value', $config['opt']); - - $config->set('opt', 'hostValue'); - self::assertEquals('newValue', $parent['opt']); - self::assertEquals('hostValue', $config['opt']); - self::assertEquals('okay', $config->get('miss', 'okay')); - } - - public function testGetParentParent() - { - $global = new Configuration(); - $parent = new Configuration($global); - $config = new Configuration($parent); - - $global->set('global', 'value from {{path}}'); - $parent->set('path', 'parent'); - - self::assertEquals('value from parent', $config->get('global')); - } - - public function testGetParentWhatDependsOnChild() - { - $parent = new Configuration(); - $alpha = new Configuration($parent); - $beta = new Configuration($parent); - - $parent->set('deploy_path', 'path/{{name}}'); - $alpha->set('name', 'alpha'); - $beta->set('name', 'beta'); - - self::assertEquals('path/alpha', $alpha->get('deploy_path')); - self::assertEquals('path/beta', $beta->get('deploy_path')); - } - - public function testGetFromCallback() - { - $config = new Configuration(); - $config->set('func', function () { - return 'param'; - }); - self::assertEquals('param', $config['func']); - } - - public function testAdd() - { - $config = new Configuration(); - $config->set('opt', ['foo', 'bar']); - $config->add('opt', ['baz']); - self::assertEquals(['foo', 'bar', 'baz'], $config['opt']); - } - - public function testAddEmpty() - { - $config = new Configuration(); - $config->add('opt', ['baz']); - self::assertEquals(['baz'], $config['opt']); - } - - public function testAddDefaultToNotArray() - { - $this->expectException(\RuntimeException::class); - $this->expectExceptionMessage('Config option "config" isn\'t array.'); - - $config = new Configuration(); - $config->set('config', 'option'); - $config->add('config', ['three']); - } - - public function testAddToParent() - { - $parent = new Configuration(); - $alpha = new Configuration($parent); - - $parent->set('files', ['a', 'b']); - $alpha->add('files', ['c']); - - self::assertEquals(['a', 'b', 'c'], $alpha->get('files')); - } - - public function testAddToParentCallback() - { - $parent = new Configuration(); - $alpha = new Configuration($parent); - - $parent->set('files', function () { - return ['a', 'b']; - }); - $alpha->add('files', ['c']); - - self::assertEquals(['a', 'b', 'c'], $alpha->get('files')); - } - - public function testPersist() - { - $parent = new Configuration(); - $alpha = new Configuration($parent); - - $parent->set('global', 'do not include'); - $alpha->set('whoami', function () { - $this->fail('should not be called'); - }); - $alpha->set('name', 'alpha'); - - self::assertEquals(['name' => 'alpha'], $alpha->persist()); - } -} diff --git a/tests/src/DeployerTest.php b/tests/src/DeployerTest.php deleted file mode 100644 index e3b4d4da4..000000000 --- a/tests/src/DeployerTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class DeployerTest extends TestCase -{ - private $deployer; - - protected function setUp(): void - { - $console = new Application(); - $input = $this->createMock(InputInterface::class); - $output = $this->createMock(OutputInterface::class); - $this->deployer = new Deployer($console, $input, $output); - } - - protected function tearDown(): void - { - unset($this->deployer); - } - - public function testInstance() - { - $this->assertEquals($this->deployer, Deployer::get()); - } -} diff --git a/tests/src/FunctionsTest.php b/tests/src/FunctionsTest.php deleted file mode 100644 index ceae06a05..000000000 --- a/tests/src/FunctionsTest.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -use Deployer\Configuration\Configuration; -use Deployer\Host\Host; -use Deployer\Host\Localhost; -use Deployer\Task\Context; -use Deployer\Task\GroupTask; -use Deployer\Task\Task; -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\Input; -use Symfony\Component\Console\Output\Output; -use function Deployer\localhost; - -class FunctionsTest extends TestCase -{ - /** - * @var Deployer - */ - private $deployer; - - protected function setUp(): void - { - $console = new Application(); - - $input = $this->createMock(Input::class); - $output = $this->createMock(Output::class); - $host = new Localhost(); - - $this->deployer = new Deployer($console); - $this->deployer['input'] = $input; - $this->deployer['output'] = $output; - Context::push(new Context($host)); - } - - protected function tearDown(): void - { - Context::pop(); - unset($this->deployer); - $this->deployer = null; - } - - public function testHost() - { - host('domain.com'); - self::assertInstanceOf(Host::class, $this->deployer->hosts->get('domain.com')); - - host('a1.domain.com', 'a2.domain.com')->set('roles', 'app'); - self::assertInstanceOf(Host::class, $this->deployer->hosts->get('a1.domain.com')); - self::assertInstanceOf(Host::class, $this->deployer->hosts->get('a2.domain.com')); - - host('db[1:2].domain.com')->set('roles', 'db'); - self::assertInstanceOf(Host::class, $this->deployer->hosts->get('db1.domain.com')); - self::assertInstanceOf(Host::class, $this->deployer->hosts->get('db2.domain.com')); - } - - public function testLocalhost() - { - localhost('domain.com'); - self::assertInstanceOf(Localhost::class, $this->deployer->hosts->get('domain.com')); - } - - public function testTask() - { - task('task', function () { - }); - - $task = $this->deployer->tasks->get('task'); - self::assertInstanceOf(Task::class, $task); - - $task = task('task'); - self::assertInstanceOf(Task::class, $task); - - task('group', ['task']); - $task = $this->deployer->tasks->get('group'); - self::assertInstanceOf(GroupTask::class, $task); - - $task = task('callable', [$this, __METHOD__]); - self::assertInstanceOf(Task::class, $task); - } - - public function testBefore() - { - task('main', function () {}); - task('before', function () {}); - before('main', 'before'); - before('before', function () {}); - - $names = $this->taskToNames($this->deployer->scriptManager->getTasks('main')); - self::assertEquals(['before:before', 'before', 'main'], $names); - } - - public function testAfter() - { - task('main', function () {}); - task('after', function () {}); - after('main', 'after'); - after('after', function () {}); - - $names = $this->taskToNames($this->deployer->scriptManager->getTasks('main')); - self::assertEquals(['main', 'after', 'after:after'], $names); - } - - public function testRunLocally() - { - $output = runLocally('echo "hello"'); - self::assertEquals('hello', $output); - } - - public function testRunLocallyWithOptions() - { - Context::get()->getConfig()->set('env', ['DEPLOYER_ENV' => 'default', 'DEPLOYER_ENV_TMP' => 'default']); - - $output = runLocally('echo $DEPLOYER_ENV'); - self::assertEquals('default', $output); - $output = runLocally('echo $DEPLOYER_ENV_TMP'); - self::assertEquals('default', $output); - - $output = runLocally('echo $DEPLOYER_ENV', ['env' => ['DEPLOYER_ENV_TMP' => 'overwritten']]); - self::assertEquals('default', $output); - $output = runLocally('echo $DEPLOYER_ENV_TMP', ['env' => ['DEPLOYER_ENV_TMP' => 'overwritten']]); - self::assertEquals('overwritten', $output); - } - - public function testWithinSetsWorkingPaths() - { - Context::get()->getConfig()->set('working_path', '/foo'); - - within('/bar', function () { - $withinWorkingPath = Context::get()->getConfig()->get('working_path'); - self::assertEquals('/bar', $withinWorkingPath); - }); - - $originalWorkingPath = Context::get()->getConfig()->get('working_path'); - self::assertEquals('/foo', $originalWorkingPath); - } - - public function testWithinRestoresWorkingPathInCaseOfException() - { - Context::get()->getConfig()->set('working_path', '/foo'); - - try { - within('/bar', function () { - throw new \Exception('Dummy exception'); - }); - } catch (\Exception $exception) { - // noop - } - - $originalWorkingPath = Context::get()->getConfig()->get('working_path'); - self::assertEquals('/foo', $originalWorkingPath); - } - - public function testWithinReturningValue() - { - $output = within('/foo', function () { - return 'bar'; - }); - - self::assertEquals('bar', $output); - } - - public function testWithinWithVoidFunction() - { - $output = within('/foo', function () { - // noop - }); - - self::assertNull($output); - } - - private function taskToNames($tasks) - { - return array_map(function (Task $task) { - return $task->getName(); - }, $tasks); - } -} diff --git a/tests/src/Host/ConfigurationTest.php b/tests/src/Host/ConfigurationTest.php deleted file mode 100644 index ae5a6d82e..000000000 --- a/tests/src/Host/ConfigurationTest.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Host; - -use Deployer\Configuration\Configuration; -use Deployer\Exception\ConfigurationException; -use PHPUnit\Framework\TestCase; - -class ConfigurationTest extends TestCase -{ - public function testConfiguration() - { - $config = new Configuration(); - $config->set('int', 42); - $config->set('string', 'value'); - $config->set('array', [1, 'two']); - $config->set('hyphen-ated', 'hyphen'); - $config->set('parse', 'is {{int}}'); - $config->set('parse-hyphen', 'has {{hyphen-ated}}'); - $config->set('callback', function () { - return 'callback'; - }); - $this->assertEquals(42, $config->get('int')); - $this->assertEquals('value', $config->get('string')); - $this->assertEquals([1, 'two'], $config->get('array')); - $this->assertEquals('default', $config->get('no', 'default')); - $this->assertEquals(null, $config->get('no', null)); - $this->assertEquals('callback', $config->get('callback')); - $this->assertEquals('is 42', $config->get('parse')); - $this->assertEquals('has hyphen', $config->get('parse-hyphen')); - - $config->set('int', 11); - $this->assertEquals('is 11', $config->get('parse')); - - $this->expectException('RuntimeException'); - $config->get('so'); - } - - public function testAddParams() - { - $config = new Configuration(); - $config->set('config', [ - 'one', - 'two' => 2, - 'nested' => [], - ]); - $config->add('config', [ - 'two' => 20, - 'nested' => [ - 'first', - ], - ]); - $config->add('config', [ - 'nested' => [ - 'second', - ], - ]); - $config->add('config', [ - 'extra', - ]); - - $expected = [ - 'one', - 'two' => 20, - 'nested' => [ - 'first', - 'second', - ], - 'extra', - ]; - $this->assertEquals($expected, $config->get('config')); - } - - public function testAddParamsToNotArray() - { - $this->expectException(ConfigurationException::class); - - $config = new Configuration(); - $config->set('config', 'option'); - $config->add('config', ['three']); - } -} diff --git a/tests/src/Host/HostTest.php b/tests/src/Host/HostTest.php deleted file mode 100644 index d1f66234c..000000000 --- a/tests/src/Host/HostTest.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Host; - -use Deployer\Configuration\Configuration; -use PHPUnit\Framework\TestCase; - -class HostTest extends TestCase -{ - public function testHost() - { - $host = new Host('host'); - $host - ->setHostname('hostname') - ->setRemoteUser('remote_user') - ->setPort(22) - ->setConfigFile('~/.ssh/config') - ->setIdentityFile('~/.ssh/id_rsa') - ->setForwardAgent(true) - ->setSshMultiplexing(true); - - self::assertEquals('host', $host->getAlias()); - self::assertStringContainsString('host', $host->getTag()); - self::assertEquals('hostname', $host->getHostname()); - self::assertEquals('remote_user', $host->getRemoteUser()); - self::assertEquals(22, $host->getPort()); - self::assertEquals('~/.ssh/config', $host->getConfigFile()); - self::assertEquals('~/.ssh/id_rsa', $host->getIdentityFile()); - self::assertEquals(true, $host->getForwardAgent()); - self::assertEquals(true, $host->getSshMultiplexing()); - } - - public function testConfigurationAccessor() - { - $host = new Host('host'); - $host - ->set('roles', ['db', 'app']) - ->set('key', 'value') - ->set('array', [1]) - ->add('array', [2]); - - self::assertEquals(['db', 'app'], $host->get('roles')); - self::assertEquals('value', $host->get('key')); - self::assertEquals([1, 2], $host->get('array')); - } - - public function testHostAlias() - { - $host = new Host('host/alias'); - self::assertEquals('host/alias', $host->getAlias()); - self::assertEquals('host', $host->getHostname()); - } - - public function testHostWithParams() - { - $host = new Host('host'); - $value = 'new_value'; - $host - ->set('env', $value) - ->set('identity_file', '{{env}}'); - - self::assertEquals($value, $host->getIdentityFile()); - } - - public function testHostWithUserFromConfig() - { - $parent = new Configuration(); - $parent->set("deploy_user", function () { - return "test_user"; - }); - - $host = new Host('host'); - $host->config()->bind($parent); - $host - ->setHostname('host') - ->setRemoteUser('{{deploy_user}}') - ->setPort(22); - - self::assertEquals('test_user@host', $host->connectionString()); - } -} diff --git a/tests/src/Host/RangeTest.php b/tests/src/Host/RangeTest.php deleted file mode 100644 index 15cb9c0a4..000000000 --- a/tests/src/Host/RangeTest.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Host; - -use PHPUnit\Framework\TestCase; - -class RangeTest extends TestCase -{ - public function testExpand() - { - self::assertEquals(['h1', 'h2', 'h3'], Range::expand(['h[1:3]'])); - self::assertEquals(['h1', 'h2', 'ha'], Range::expand(['h[1:2]', 'ha'])); - self::assertEquals(['h0', 'h1'], Range::expand(['h[0:1]'])); - self::assertEquals(['h1'], Range::expand(['h[1:1]'])); - self::assertEquals(['ha', 'hb', 'hc', 'hd'], Range::expand(['h[a:d]'])); - - $hostnames = Range::expand(['h[01:20]']); - self::assertContains('h01', $hostnames); - self::assertContains('h10', $hostnames); - self::assertContains('h20', $hostnames); - - self::assertCount(100, Range::expand(['h[1:100]'])); - self::assertCount(26, Range::expand(['h[a:z]'])); - } -} diff --git a/tests/src/Importer/ImporterTest.php b/tests/src/Importer/ImporterTest.php deleted file mode 100644 index 1f03602db..000000000 --- a/tests/src/Importer/ImporterTest.php +++ /dev/null @@ -1,82 +0,0 @@ -previousInput = $deployer->input; - $this->previousOutput = $deployer->output; - } - - public function tearDown(): void - { - Deployer::get()->input = $this->previousInput; - Deployer::get()->output = $this->previousOutput; - } - - public function testCanOneOverrideStaticMethod(): void - { - $extendedImporter = new class extends Importer - { - public static $config = []; - - protected static function config(array $config) - { - static::$config = $config; - } - }; - - $data = << 'bar'], $extendedImporter::$config); - } - - public function testImporterIgnoresYamlHiddenKeys(): void - { - $data = <<hosts->has('production')); - self::assertTrue(Deployer::get()->hosts->has('acceptance')); - self::assertTrue(Deployer::get()->hosts->has('production.beta')); - self::assertEquals('acceptance', Deployer::get()->hosts->get('acceptance')->getLabels()['stage']); - self::assertEquals('production', Deployer::get()->hosts->get('production')->getLabels()['stage']); - self::assertEquals('foo', Deployer::get()->hosts->get('acceptance')->getRemoteUser()); - self::assertEquals('bar', Deployer::get()->hosts->get('production')->getRemoteUser()); - } -} diff --git a/tests/src/Selector/SelectorTest.php b/tests/src/Selector/SelectorTest.php deleted file mode 100644 index d8dc61a99..000000000 --- a/tests/src/Selector/SelectorTest.php +++ /dev/null @@ -1,32 +0,0 @@ -set('labels', ['stage' => 'prod']); - $front = (new Host('prod.domain.com/front'))->set('labels', ['stage' => 'prod', 'tier' => 'frontend']); - $beta = (new Host('beta.domain.com'))->set('labels', ['stage' => 'beta']); - $dev = (new Host('dev'))->set('labels', ['stage' => 'dev']); - $multi = (new Host('multi'))->set('labels', ['stage' => ['prod', 'beta']]); - $allHosts = [$prod, $front, $beta, $dev, $multi]; - - $hosts = new HostCollection(); - foreach ($allHosts as $host) { - $hosts->set($host->getAlias(), $host); - } - $selector = new Selector($hosts); - self::assertEquals($allHosts, $selector->select('all')); - self::assertEquals([$prod, $front, $multi], $selector->select('stage=prod')); - self::assertEquals([$front], $selector->select('stage=prod & tier=frontend')); - self::assertEquals([$front, $beta, $multi], $selector->select('prod.domain.com/front, stage=beta')); - self::assertEquals([$prod, $beta, $dev, $multi], $selector->select('all & tier != frontend')); - self::assertEquals([$prod, $front, $dev], $selector->select('stage != beta')); - } -} diff --git a/tests/src/Support/HelpersTest.php b/tests/src/Support/HelpersTest.php deleted file mode 100644 index 1a4624761..000000000 --- a/tests/src/Support/HelpersTest.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Support; - -use PHPUnit\Framework\TestCase; - -class HelpersTest extends TestCase -{ - public function testArrayFlatten() - { - self::assertEquals(['a', 'b', 'c'], array_flatten(['a', ['b', 'key' => ['c']]])); - } - - public function testArrayMergeAlternate() - { - $config = [ - 'one', - 'two' => 2, - 'nested' => [], - ]; - - $config = array_merge_alternate($config, [ - 'two' => 20, - 'nested' => [ - 'first', - ], - ]); - - $config = array_merge_alternate($config, [ - 'nested' => [ - 'second', - ], - ]); - - $config = array_merge_alternate($config, [ - 'extra' - ]); - - self::assertEquals([ - 'one', - 'two' => 20, - 'nested' => [ - 'first', - 'second', - ], - 'extra', - ], $config); - } - - public function testParseHomeDir() - { - $this->assertStringStartsWith('/', parse_home_dir('~/path')); - $this->assertStringStartsWith('/', parse_home_dir('~')); - $this->assertStringStartsWith('~', parse_home_dir('~path')); - $this->assertStringEndsWith('~', parse_home_dir('path~')); - } -} diff --git a/tests/src/Support/ObjectProxyTest.php b/tests/src/Support/ObjectProxyTest.php deleted file mode 100644 index 42322ed5e..000000000 --- a/tests/src/Support/ObjectProxyTest.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Support; - -use PHPUnit\Framework\TestCase; - -class ObjectProxyTest extends TestCase -{ - public function testObjectProxy() - { - $mock = self::getMockBuilder('stdClass') - ->setMethods(['foo']) - ->getMock(); - $mock - ->expects(self::once()) - ->method('foo') - ->with('a', 'b'); - - $proxy = new ObjectProxy([$mock]); - $proxy->foo('a', 'b'); - } -} diff --git a/tests/src/Task/ContextTest.php b/tests/src/Task/ContextTest.php deleted file mode 100644 index 131b01db4..000000000 --- a/tests/src/Task/ContextTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Task; - -use Deployer\Configuration\Configuration; -use Deployer\Host\Host; -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class ContextTest extends TestCase -{ - public function testContext() - { - $host = $this->getMockBuilder(Host::class)->disableOriginalConstructor()->getMock(); - $host - ->expects($this->once()) - ->method('config') - ->willReturn($this->createMock(Configuration::class)); - - $context = new Context($host); - - $this->assertInstanceOf(Host::class, $context->getHost()); - $this->assertInstanceOf(Configuration::class, $context->getConfig()); - - Context::push($context); - - $this->assertEquals($context, Context::get()); - $this->assertEquals($context, Context::pop()); - } -} diff --git a/tests/src/Task/ScriptManagerTest.php b/tests/src/Task/ScriptManagerTest.php deleted file mode 100644 index c061ffd78..000000000 --- a/tests/src/Task/ScriptManagerTest.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Task; - -use PHPUnit\Framework\TestCase; - -class ScriptManagerTest extends TestCase -{ - public function testGetTasks() - { - $notify = new Task('notify'); - $info = new GroupTask('info', ['notify']); - $deploy = new GroupTask('deploy', ['deploy:setup', 'deploy:release']); - $deploy->addBefore($info); - $setup = new Task('deploy:setup'); - $release = new Task('deploy:release'); - - $taskCollection = new TaskCollection(); - $taskCollection->set($notify->getName(), $notify); - $taskCollection->set($info->getName(), $info); - $taskCollection->set($deploy->getName(), $deploy); - $taskCollection->set($setup->getName(), $setup); - $taskCollection->set($release->getName(), $release); - - $scriptManager = new ScriptManager($taskCollection); - self::assertEquals([$notify, $setup, $release], $scriptManager->getTasks('deploy')); - } - - public function testOnce() - { - $a = new Task('a'); - $b = new Task('b'); - $b->once(); - $group = new GroupTask('group', ['a', 'b']); - - $taskCollection = new TaskCollection(); - $taskCollection->add($a); - $taskCollection->add($b); - $taskCollection->add($group); - - $scriptManager = new ScriptManager($taskCollection); - self::assertEquals([$a, $b], $scriptManager->getTasks('group')); - self::assertFalse($a->isOnce()); - self::assertTrue($b->isOnce()); - - $group->once(); - self::assertEquals([$a, $b], $scriptManager->getTasks('group')); - self::assertTrue($a->isOnce()); - self::assertTrue($b->isOnce()); - } - - public function testSelectsCombine() - { - $a = new Task('a'); - $b = new Task('b'); - $b->select('stage=beta'); - $group = new GroupTask('group', ['a', 'b']); - - $taskCollection = new TaskCollection(); - $taskCollection->add($a); - $taskCollection->add($b); - $taskCollection->add($group); - - $scriptManager = new ScriptManager($taskCollection); - self::assertEquals([$a, $b], $scriptManager->getTasks('group')); - self::assertNull($a->getSelector()); - self::assertEquals([[['=', 'stage', 'beta']]], $b->getSelector()); - - $group->select('role=prod'); - self::assertEquals([$a, $b], $scriptManager->getTasks('group')); - self::assertEquals([[['=', 'role', 'prod']]], $a->getSelector()); - self::assertEquals([[['=', 'stage', 'beta']],[['=', 'role', 'prod']]], $b->getSelector()); - } - - public function testThrowsExceptionIfTaskCollectionEmpty() - { - self::expectException(\InvalidArgumentException::class); - - $scriptManager = new ScriptManager(new TaskCollection()); - $scriptManager->getTasks(''); - } - - public function testThrowsExceptionIfTaskDontExists() - { - self::expectException(\InvalidArgumentException::class); - - $taskCollection = new TaskCollection(); - $taskCollection->set('testTask', new Task('testTask')); - - $scriptManager = new ScriptManager($taskCollection); - $scriptManager->getTasks('testTask2'); - } -} diff --git a/tests/src/Task/TaskTest.php b/tests/src/Task/TaskTest.php deleted file mode 100644 index 16c44f4b6..000000000 --- a/tests/src/Task/TaskTest.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer\Task; - -use Deployer\Host\Host; -use PHPUnit\Framework\TestCase; -use function Deployer\invoke; -use function Deployer\task; - -class TaskTest extends TestCase -{ - protected function tearDown(): void - { - StubTask::$runned = 0; - } - - public function testTask() - { - $mock = self::getMockBuilder('stdClass') - ->setMethods(['callback']) - ->getMock(); - $mock - ->expects(self::exactly(1)) - ->method('callback'); - - $task = new Task('task_name', function () use ($mock) { - $mock->callback(); - }); - - $context = self::getMockBuilder(Context::class) - ->disableOriginalConstructor() - ->getMock(); - $task->run($context); - - self::assertEquals('task_name', $task->getName()); - - $task->desc('Task description.'); - self::assertEquals('Task description.', $task->getDescription()); - - $task->hidden(); - self::assertTrue($task->isHidden()); - - $task->once(); - self::assertTrue($task->isOnce()); - - $task->oncePerNode(); - self::assertTrue($task->isOncePerNode()); - } - - public function testInit() - { - $context = self::getMockBuilder(Context::class)->disableOriginalConstructor()->getMock(); - - // Test create task with [$object, 'method'] - $mock1 = self::getMockBuilder('stdClass') - ->setMethods(['callback']) - ->getMock(); - $mock1 - ->expects(self::once()) - ->method('callback'); - $task1 = new Task('task1', [$mock1, 'callback']); - $task1->run($context); - - // Test create task with anonymous functions - $mock2 = self::getMockBuilder('stdClass') - ->setMethods(['callback']) - ->getMock(); - $mock2 - ->expects(self::once()) - ->method('callback'); - $task2 = new Task('task2', function () use ($mock2) { - $mock2->callback(); - }); - $task2->run($context); - - self::assertEquals(0, StubTask::$runned); - $task3 = new Task('task3', new StubTask()); - $task3->run($context); - self::assertEquals(1, StubTask::$runned); - } - - public function testGroupInvoke(): void - { - $spy = new StubTask(); - - task('foo', $spy); - task('bar', $spy); - task('group', ['foo', 'bar']); - - (new Task('group:invoke', function () { - invoke('group'); - }))->run(new Context(new Host('localhost'))); - - $this->assertSame(2, StubTask::$runned); - } -} - -/** - * Stub class for task callable by __invoke() - */ -class StubTask -{ - public static $runned = 0; - - public function __invoke() - { - self::$runned++; - } -}