From 7be4267e5c2563e4aafedb4d88b491b3434ab7f6 Mon Sep 17 00:00:00 2001 From: dpi Date: Tue, 29 Jun 2021 18:00:05 +0800 Subject: [PATCH 01/23] =?UTF-8?q?=E2=9E=96=20Removed=20optional=20dependen?= =?UTF-8?q?cy=20drupal-composer/drupal-scaffold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 48ad4e3..398ec04 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,6 @@ "php": ">=7.0", "composer-plugin-api": "^1.1", "composer/semver": "^1.4", - "drupal-composer/drupal-scaffold": "^2.2", "symfony/filesystem": "~3.0 || ^4.0" }, "config": { From 70334e4470628f1aa2ad877c866ef5bcb7f193c8 Mon Sep 17 00:00:00 2001 From: dpi Date: Tue, 29 Jun 2021 18:14:18 +0800 Subject: [PATCH 02/23] Deleted files not needed for D9 --- drush/config-delete.yml | 1 - drush/config-ignore.yml | 1 - src/Handler.php | 2 -- 3 files changed, 4 deletions(-) delete mode 100644 drush/config-delete.yml delete mode 100644 drush/config-ignore.yml diff --git a/drush/config-delete.yml b/drush/config-delete.yml deleted file mode 100644 index f2ed695..0000000 --- a/drush/config-delete.yml +++ /dev/null @@ -1 +0,0 @@ -delete: {} diff --git a/drush/config-ignore.yml b/drush/config-ignore.yml deleted file mode 100644 index 50c0dbb..0000000 --- a/drush/config-ignore.yml +++ /dev/null @@ -1 +0,0 @@ -ignore: {} diff --git a/src/Handler.php b/src/Handler.php index a414294..d038336 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -81,8 +81,6 @@ public function updateShepherdScaffoldFiles() [ 'docker-compose.linux.yml', 'docker-compose.osx.yml', - 'drush/config-delete.yml', - 'drush/config-ignore.yml', 'dsh_bash', 'phpcs.xml', 'RoboFile.php', From b18ea7a460438eb7681d9f5a7bb2c313422a87ca Mon Sep 17 00:00:00 2001 From: dpi Date: Tue, 29 Jun 2021 18:21:06 +0800 Subject: [PATCH 03/23] stop chmodding argh --- src/Handler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Handler.php b/src/Handler.php index d038336..6d723e2 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -124,7 +124,7 @@ public function populateSettingsFile() $root = $this->getDrupalRootPath(); // Assume Drupal scaffold created the settings.php - $this->filesystem->chmod($root . '/sites/default/settings.php', 0664); +// $this->filesystem->chmod($root . '/sites/default/settings.php', 0664); // If we haven't already written to settings.php. if (!(strpos(file_get_contents($root . '/sites/default/settings.php'), 'START SHEPHERD CONFIG') !== false)) { @@ -157,8 +157,8 @@ public function generateSettings() public function removeWritePermissions() { $root = $this->getDrupalRootPath(); - $this->filesystem->chmod($root . '/sites/default/settings.php', 0444); - $this->filesystem->chmod($root . '/sites/default', 0555); +// $this->filesystem->chmod($root . '/sites/default/settings.php', 0444); +// $this->filesystem->chmod($root . '/sites/default', 0555); } /** From 06bf17bfab13c11529646e59c3f2ae80aa0b516d Mon Sep 17 00:00:00 2001 From: dpi Date: Tue, 29 Jun 2021 18:43:28 +0800 Subject: [PATCH 04/23] update plugin --- .gitignore | 3 +- composer.json | 11 ++-- src/Handler.php | 64 ++++++------------- ...n.php => ShepherdDrupalScaffoldPlugin.php} | 18 ++---- 4 files changed, 32 insertions(+), 64 deletions(-) rename src/{Plugin.php => ShepherdDrupalScaffoldPlugin.php} (69%) diff --git a/.gitignore b/.gitignore index 78b63b5..e402b0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -/.idea/ +.idea vendor docker-compose.yml +bin/ diff --git a/composer.json b/composer.json index 398ec04..ab4652a 100644 --- a/composer.json +++ b/composer.json @@ -4,10 +4,11 @@ "type": "composer-plugin", "license": "GPL-2.0+", "require": { - "php": ">=7.0", - "composer-plugin-api": "^1.1", - "composer/semver": "^1.4", - "symfony/filesystem": "~3.0 || ^4.0" + "php": ">=7.4", + "composer-plugin-api": "^2", + "composer/semver": "^3", + "symfony/filesystem": "~3.0 || ^4.0", + "composer/composer": "^2.1" }, "config": { "bin-dir": "bin/" @@ -18,6 +19,6 @@ } }, "extra": { - "class": "UniversityOfAdelaide\\ShepherdDrupalScaffold\\Plugin" + "class": "UniversityOfAdelaide\\ShepherdDrupalScaffold\\ShepherdDrupalScaffoldPlugin" } } diff --git a/src/Handler.php b/src/Handler.php index 6d723e2..36c50ee 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -4,33 +4,17 @@ use Composer\Composer; use Composer\IO\IOInterface; +use Composer\Script\Event; use Composer\Util\Filesystem as ComposerFilesystem; use Symfony\Component\Filesystem\Filesystem; class Handler { - /** - * @var \Composer\Composer - */ - protected $composer; - - /** - * @var \Composer\IO\IOInterface - */ - protected $io; + protected Composer $composer; + protected IOInterface $io; + protected Filesystem $filesystem; - /** - * @var \Symfony\Component\Filesystem\Filesystem - */ - protected $filesystem; - - /** - * Handler constructor. - * - * @param Composer $composer - * @param IOInterface $io - */ public function __construct(Composer $composer, IOInterface $io) { $this->composer = $composer; @@ -40,10 +24,8 @@ public function __construct(Composer $composer, IOInterface $io) /** * Post update command event to execute the scaffolding. - * - * @param \Composer\Script\Event $event */ - public function onPostCmdEvent(\Composer\Script\Event $event) + public function onPostCmdEvent(Event $event): void { $event->getIO()->write("Updating Shepherd scaffold files."); $this->updateShepherdScaffoldFiles(); @@ -58,7 +40,7 @@ public function onPostCmdEvent(\Composer\Script\Event $event) /** * Update the Shepherd scaffold files. */ - public function updateShepherdScaffoldFiles() + public function updateShepherdScaffoldFiles(): void { $packagePath = $this->getPackagePath(); $projectPath = $this->getProjectPath(); @@ -94,7 +76,7 @@ public function updateShepherdScaffoldFiles() /** * Ensure necessary directories exist. */ - public function createDirectories() + public function createDirectories(): void { $root = $this->getDrupalRootPath(); $dirs = [ @@ -119,7 +101,7 @@ public function createDirectories() * * Note: does nothing if the file already exists. */ - public function populateSettingsFile() + public function populateSettingsFile(): void { $root = $this->getDrupalRootPath(); @@ -144,7 +126,7 @@ public function populateSettingsFile() * PHP code. * @throws \Exception */ - public function generateSettings() + public function generateSettings(): string { $settings = file_get_contents(__DIR__ . '/../fixtures/php/settings.php.txt'); $hashSalt = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(random_bytes(55))); @@ -154,7 +136,7 @@ public function generateSettings() /** * Remove all write permissions on Drupal configuration files and folder. */ - public function removeWritePermissions() + public function removeWritePermissions(): void { $root = $this->getDrupalRootPath(); // $this->filesystem->chmod($root . '/sites/default/settings.php', 0444); @@ -167,7 +149,7 @@ public function removeWritePermissions() * @param bool $overwriteExisting * If true, replace existing files. Defaults to false. */ - public function copyFiles($origin, $destination, $filenames, $overwriteExisting = false) + public function copyFiles($origin, $destination, $filenames, $overwriteExisting = false): void { foreach ($filenames as $filename) { // Skip copying files that already exist at the destination. @@ -189,7 +171,7 @@ public function copyFiles($origin, $destination, $filenames, $overwriteExisting * * @return string */ - public function getVendorPath() + public function getVendorPath(): string { // Load ComposerFilesystem to get access to path normalisation. $composerFilesystem = new ComposerFilesystem(); @@ -205,38 +187,30 @@ public function getVendorPath() * Get the path to the project directory. * * E.g. /home/user/code/project - * - * @return string */ - public function getProjectPath() + public function getProjectPath(): string { - $projectPath = dirname($this->getVendorPath()); - return $projectPath; + return dirname($this->getVendorPath()); } /** * Get the path to the package directory. * * E.g. /home/user/code/project/vendor/universityofadelaide/shepherd-drupal-scaffold - * - * @return string */ - public function getPackagePath() + public function getPackagePath(): string { - $packagePath = $this->getVendorPath() . '/universityofadelaide/shepherd-drupal-scaffold'; - return $packagePath; + return $this->getVendorPath() . '/universityofadelaide/shepherd-drupal-scaffold'; } /** * Get the path to the Drupal root directory. * * E.g. /home/user/code/project/web - * - * @return string */ - public function getDrupalRootPath() + public function getDrupalRootPath(): string { - $drupalRootPath = $this->getProjectPath() . '/web'; - return $drupalRootPath; + return $this->getProjectPath() . '/web'; } + } diff --git a/src/Plugin.php b/src/ShepherdDrupalScaffoldPlugin.php similarity index 69% rename from src/Plugin.php rename to src/ShepherdDrupalScaffoldPlugin.php index 7540fd6..642088d 100644 --- a/src/Plugin.php +++ b/src/ShepherdDrupalScaffoldPlugin.php @@ -10,19 +10,16 @@ use Composer\EventDispatcher\EventSubscriberInterface; use Composer\IO\IOInterface; use Composer\Plugin\PluginInterface; +use Composer\Script\Event; use Composer\Script\ScriptEvents; -use Composer\Util\RemoteFilesystem; /** * Composer plugin for handling Shepherd Drupal scaffold. */ -class Plugin implements PluginInterface, EventSubscriberInterface +class ShepherdDrupalScaffoldPlugin implements PluginInterface, EventSubscriberInterface { - /** - * @var \UniversityOfAdelaide\ShepherdDrupalScaffold\Handler - */ - protected $handler; + protected Handler $handler; /** * {@inheritdoc} @@ -38,17 +35,14 @@ public function activate(Composer $composer, IOInterface $io) public static function getSubscribedEvents() { return array( - // ScriptEvents::POST_INSTALL_CMD => 'postCmd', ScriptEvents::POST_UPDATE_CMD => 'postCmd', ); } /** * Post command event callback. - * - * @param \Composer\Script\Event $event */ - public function postCmd(\Composer\Script\Event $event) + public function postCmd(Event $event) { $this->handler->onPostCmdEvent($event); } @@ -57,10 +51,8 @@ public function postCmd(\Composer\Script\Event $event) /** * Script callback for putting in composer scripts to download the * scaffold files. - * - * @param \Composer\Script\Event $event */ - public static function scaffold(\Composer\Script\Event $event) + public static function scaffold(Event $event) { $handler = new Handler($event->getComposer(), $event->getIO()); $handler->onPostCmdEvent($event); From 4e6a9a2afca70f8a0133bc20b4c09590840c813c Mon Sep 17 00:00:00 2001 From: dpi Date: Tue, 29 Jun 2021 18:51:38 +0800 Subject: [PATCH 05/23] deps --- composer.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index ab4652a..c6bc994 100644 --- a/composer.json +++ b/composer.json @@ -6,9 +6,7 @@ "require": { "php": ">=7.4", "composer-plugin-api": "^2", - "composer/semver": "^3", - "symfony/filesystem": "~3.0 || ^4.0", - "composer/composer": "^2.1" + "symfony/filesystem": "~3.0 || ^4.0" }, "config": { "bin-dir": "bin/" @@ -20,5 +18,8 @@ }, "extra": { "class": "UniversityOfAdelaide\\ShepherdDrupalScaffold\\ShepherdDrupalScaffoldPlugin" + }, + "require-dev": { + "composer/composer": "^1.8@stable" } } From 0fce569a6b463c923a7bc3489f7a5ca76228ad5e Mon Sep 17 00:00:00 2001 From: dpi Date: Tue, 29 Jun 2021 19:04:18 +0800 Subject: [PATCH 06/23] composer2 compat --- src/ShepherdDrupalScaffoldPlugin.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/ShepherdDrupalScaffoldPlugin.php b/src/ShepherdDrupalScaffoldPlugin.php index 642088d..6e00f9f 100644 --- a/src/ShepherdDrupalScaffoldPlugin.php +++ b/src/ShepherdDrupalScaffoldPlugin.php @@ -1,8 +1,4 @@ handler = new Handler($composer, $io); } - /** - * {@inheritdoc} - */ + public function deactivate(Composer $composer, IOInterface $io) { + } + + public function uninstall(Composer $composer, IOInterface $io) { + } + public static function getSubscribedEvents() { return array( From ec38c1ad9b830bb004e736e5414f9c99e564ae19 Mon Sep 17 00:00:00 2001 From: dpi Date: Wed, 30 Jun 2021 11:26:47 +0800 Subject: [PATCH 07/23] restore post install --- src/ShepherdDrupalScaffoldPlugin.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ShepherdDrupalScaffoldPlugin.php b/src/ShepherdDrupalScaffoldPlugin.php index 6e00f9f..8bd9721 100644 --- a/src/ShepherdDrupalScaffoldPlugin.php +++ b/src/ShepherdDrupalScaffoldPlugin.php @@ -31,6 +31,7 @@ public function uninstall(Composer $composer, IOInterface $io) { public static function getSubscribedEvents() { return array( + ScriptEvents::POST_INSTALL_CMD => 'postCmd', ScriptEvents::POST_UPDATE_CMD => 'postCmd', ); } From 95419d62281f0b591c8e785f8201ae9593028027 Mon Sep 17 00:00:00 2001 From: dpi Date: Wed, 30 Jun 2021 13:57:27 +0800 Subject: [PATCH 08/23] rework, csfixer, cs --- .gitignore | 1 + .php-cs-fixer.dist.php | 21 + README.md | 8 +- composer.json | 8 +- composer.lock | 2575 +++++++++++++++++ .../optional/RoboFile.php | 0 .../optional/docker-compose.linux.yml | 0 .../optional/docker-compose.osx.yml | 0 .../optional/docker}/Dockerfile | 0 .../optional/docker}/php_custom.ini | 0 .../optional/docker}/xdebug.ini | 0 dsh_bash => scaffold/optional/dsh_bash | 0 phpcs.xml => scaffold/optional/phpcs.xml | 0 .../required/RoboFileBase.php | 0 dsh => scaffold/required/dsh | 0 src/Handler.php | 64 +- src/ShepherdDrupalScaffoldPlugin.php | 20 +- 17 files changed, 2649 insertions(+), 48 deletions(-) create mode 100644 .php-cs-fixer.dist.php create mode 100644 composer.lock rename RoboFile.php => scaffold/optional/RoboFile.php (100%) rename docker-compose.linux.yml => scaffold/optional/docker-compose.linux.yml (100%) rename docker-compose.osx.yml => scaffold/optional/docker-compose.osx.yml (100%) rename {docker => scaffold/optional/docker}/Dockerfile (100%) rename {docker => scaffold/optional/docker}/php_custom.ini (100%) rename {docker => scaffold/optional/docker}/xdebug.ini (100%) rename dsh_bash => scaffold/optional/dsh_bash (100%) rename phpcs.xml => scaffold/optional/phpcs.xml (100%) rename RoboFileBase.php => scaffold/required/RoboFileBase.php (100%) rename dsh => scaffold/required/dsh (100%) diff --git a/.gitignore b/.gitignore index e402b0a..868f11d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ vendor docker-compose.yml bin/ +.php_cs.cache diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..76595ca --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,21 @@ +in('src'); +$config = new Config(); + +return $config + ->setFinder($finder) + ->setRules([ + '@Symfony' => true, + 'strict_param' => true, + 'array_syntax' => ['syntax' => 'short'], + 'concat_space' => ['spacing' => 'one'], + 'no_superfluous_phpdoc_tags' => true, + 'phpdoc_align' => false, + 'phpdoc_no_useless_inheritdoc' => true, + ]); diff --git a/README.md b/README.md index 396e44a..aa612be 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# shepherd-drupal-scaffold +# Shephard Drupal Scaffold -Composer plugin for automatically downloading Shepherd tools files (like -`RoboFileBase.php`, …). +Composer plugin for automatically adding files to a project. + + - Some files are always added, replacing existing files. + - Some files are only added if they don't exist. This is referenced by projects created using `shepherd-drupal-project`. diff --git a/composer.json b/composer.json index c6bc994..9180174 100644 --- a/composer.json +++ b/composer.json @@ -3,11 +3,16 @@ "description": "Composer Plugin for updating the Shepherd Drupal tools.", "type": "composer-plugin", "license": "GPL-2.0+", + "minimum-stability": "dev", "require": { "php": ">=7.4", "composer-plugin-api": "^2", "symfony/filesystem": "~3.0 || ^4.0" }, + "require-dev": { + "composer/composer": "^1.8@stable", + "friendsofphp/php-cs-fixer": "^2" + }, "config": { "bin-dir": "bin/" }, @@ -18,8 +23,5 @@ }, "extra": { "class": "UniversityOfAdelaide\\ShepherdDrupalScaffold\\ShepherdDrupalScaffoldPlugin" - }, - "require-dev": { - "composer/composer": "^1.8@stable" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..62afc96 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2575 @@ +{ + "_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": "521f15b940088429bf9be88ab14c4142", + "packages": [ + { + "name": "symfony/filesystem", + "version": "4.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "2d926ebd76f52352deb3c9577d8c1d4b96eae429" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/2d926ebd76f52352deb3c9577d8c1d4b96eae429", + "reference": "2d926ebd76f52352deb3c9577d8c1d4b96eae429", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "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": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/4.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-26T17:30:55+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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.23.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" + } + ], + "packages-dev": [ + { + "name": "composer/ca-bundle", + "version": "1.2.10", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.2.10" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-06-07T13:58:28+00:00" + }, + { + "name": "composer/composer", + "version": "1.10.22", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "28c9dfbe2351635961f670773e8d7b17bc5eda25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/28c9dfbe2351635961f670773e8d7b17bc5eda25", + "reference": "28c9dfbe2351635961f670773e8d7b17bc5eda25", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/semver": "^1.0", + "composer/spdx-licenses": "^1.2", + "composer/xdebug-handler": "^1.1", + "justinrainbow/json-schema": "^5.2.10", + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.0", + "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0" + }, + "conflict": { + "symfony/console": "2.8.38" + }, + "require-dev": { + "phpspec/prophecy": "^1.10", + "symfony/phpunit-bridge": "^4.2" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/1.10.22" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-27T11:10:45+00:00" + }, + { + "name": "composer/semver", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a", + "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/1.7.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-12-03T15:47:16+00:00" + }, + { + "name": "composer/spdx-licenses", + "version": "1.5.5", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "de30328a7af8680efdc03e396aad24befd513200" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", + "reference": "de30328a7af8680efdc03e396aad24befd513200", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-12-03T16:04:16+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-03-25T17:01:18+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.14.x-dev", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "5e802cc8a05c8679b01ef60423642702bdef6e6b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5e802cc8a05c8679b01ef60423642702bdef6e6b", + "reference": "5e802cc8a05c8679b01ef60423642702bdef6e6b", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.14.x" + }, + "time": "2021-05-16T18:15:24+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.3.x-dev", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "59bfb3b9be04237be4cd1afea9bbb58794c25ce8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/59bfb3b9be04237be4cd1afea9bbb58794c25ce8", + "reference": "59bfb3b9be04237be4cd1afea9bbb58794c25ce8", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^8.2 || ^9.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.3.x" + }, + "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%2Flexer", + "type": "tidelift" + } + ], + "time": "2021-01-20T07:15:06+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "2.19.x-dev", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "bddb80c8a5d9e64e91f8d15e0087c3ee3d44ba7d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/bddb80c8a5d9e64e91f8d15e0087c3ee3d44ba7d", + "reference": "bddb80c8a5d9e64e91f8d15e0087c3ee3d44ba7d", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.2 || ^2.0", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0 || ^8.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", + "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^3.0 || ^4.0 || ^5.0", + "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0 || ^5.0", + "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.4", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.4.2", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", + "symfony/phpunit-bridge": "^5.2.1", + "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.19-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", + "tests/Test/TokensWithObservedTransformers.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/2.19" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2021-06-28T17:07:05+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.10", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "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.10" + }, + "time": "2020-05-27T16:41:55+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", + "symfony/process": "^3.3" + }, + "type": "library", + "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" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + }, + "time": "2020-10-14T08:39:05+00:00" + }, + { + "name": "psr/cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "0a7c67d0d1c8167b342eb74339d6f961663826ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/0a7c67d0d1c8167b342eb74339d6f961663826ce", + "reference": "0a7c67d0d1c8167b342eb74339d6f961663826ce", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "suggest": { + "fig/cache-util": "Provides some useful PSR-6 utilities" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, + "time": "2021-02-24T03:25:37+00:00" + }, + { + "name": "psr/container", + "version": "1.1.x-dev", + "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.x" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "aa4f89e91c423b516ff226c50dc83f824011c253" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/aa4f89e91c423b516ff226c50dc83f824011c253", + "reference": "aa4f89e91c423b516ff226c50dc83f824011c253", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "suggest": { + "fig/event-dispatcher-util": "Provides some useful PSR-14 utilities" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "source": "https://github.com/php-fig/event-dispatcher/tree/master" + }, + "time": "2021-02-08T21:15:39+00:00" + }, + { + "name": "psr/log", + "version": "dev-master", + "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" + }, + "default-branch": true, + "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": "seld/jsonlint", + "version": "1.8.3", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2020-11-11T09:19:24+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8674b1d84ffb47cc59a101f5d5a3b61e87d23796", + "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phar" + ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/master" + }, + "time": "2020-07-07T18:42:57+00:00" + }, + { + "name": "symfony/console", + "version": "5.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "4411daa706a497da39b56619c0b2dbbe42b1fba3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/4411daa706a497da39b56619c0b2dbbe42b1fba3", + "reference": "4411daa706a497da39b56619c0b2dbbe42b1fba3", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "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" + }, + "require-dev": { + "psr/log": "~1.0", + "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/5.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-06-12T10:16:15+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "36b691b0bdbc963fb610da193a48b4c009d03a62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/36b691b0bdbc963fb610da193a48b4c009d03a62", + "reference": "36b691b0bdbc963fb610da193a48b4c009d03a62", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "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/main" + }, + "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-09T13:36:38+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "5.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "aecf90ffee8f1d2a2c169ec51cd1177027fc3ace" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/aecf90ffee8f1d2a2c169ec51cd1177027fc3ace", + "reference": "aecf90ffee8f1d2a2c169ec51cd1177027fc3ace", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0|^6.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/5.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-26T17:43:50+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "9af5330a64a6aebd8eabad988b50b77d8a9ec8a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/9af5330a64a6aebd8eabad988b50b77d8a9ec8a7", + "reference": "9af5330a64a6aebd8eabad988b50b77d8a9ec8a7", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "default-branch": true, + "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\\EventDispatcher\\": "" + } + }, + "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 dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/main" + }, + "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-09T13:36:38+00:00" + }, + { + "name": "symfony/finder", + "version": "5.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.3.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-05-26T12:52:38+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "5.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "162e886ca035869866d233a2bfef70cc28f9bbe5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/162e886ca035869866d233a2bfef70cc28f9bbe5", + "reference": "162e886ca035869866d233a2bfef70cc28f9bbe5", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "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": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.3.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-05-26T17:43:10+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.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": "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/main" + }, + "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-05-27T12:26:48+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "dev-main", + "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" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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.23.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": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.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": "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/main" + }, + "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-05-27T12:26:48+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "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.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.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": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.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": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.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-05-27T09:17:38+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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.23.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-php80", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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.23.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/process", + "version": "5.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "714b47f9196de61a196d86c4bad5f09201b307df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/714b47f9196de61a196d86c4bad5f09201b307df", + "reference": "714b47f9196de61a196d86c4bad5f09201b307df", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "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/5.2" + }, + "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-12T10:15:01+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "0d8e07c43ec256df5dd92574ed468e72f444c914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/0d8e07c43ec256df5dd92574ed468e72f444c914", + "reference": "0d8e07c43ec256df5dd92574ed468e72f444c914", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "psr/container": "^1.1" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "default-branch": true, + "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/main" + }, + "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-09T13:36:38+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "5.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "313d02f59d6543311865007e5ff4ace05b35ee65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/313d02f59d6543311865007e5ff4ace05b35ee65", + "reference": "313d02f59d6543311865007e5ff4ace05b35ee65", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "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": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.3.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-05-26T17:43:10+00:00" + }, + { + "name": "symfony/string", + "version": "6.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "9ffb831972fc0aa2eb6f9e44d52f4ad862164a8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/9ffb831972fc0aa2eb6f9e44d52f4ad862164a8d", + "reference": "9ffb831972fc0aa2eb6f9e44d52f4ad862164a8d", + "shasum": "" + }, + "require": { + "php": ">=8.0.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "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/6.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-27T12:36:10+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": { + "composer/composer": 0 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.4", + "composer-plugin-api": "^2" + }, + "platform-dev": [], + "plugin-api-version": "2.1.0" +} diff --git a/RoboFile.php b/scaffold/optional/RoboFile.php similarity index 100% rename from RoboFile.php rename to scaffold/optional/RoboFile.php diff --git a/docker-compose.linux.yml b/scaffold/optional/docker-compose.linux.yml similarity index 100% rename from docker-compose.linux.yml rename to scaffold/optional/docker-compose.linux.yml diff --git a/docker-compose.osx.yml b/scaffold/optional/docker-compose.osx.yml similarity index 100% rename from docker-compose.osx.yml rename to scaffold/optional/docker-compose.osx.yml diff --git a/docker/Dockerfile b/scaffold/optional/docker/Dockerfile similarity index 100% rename from docker/Dockerfile rename to scaffold/optional/docker/Dockerfile diff --git a/docker/php_custom.ini b/scaffold/optional/docker/php_custom.ini similarity index 100% rename from docker/php_custom.ini rename to scaffold/optional/docker/php_custom.ini diff --git a/docker/xdebug.ini b/scaffold/optional/docker/xdebug.ini similarity index 100% rename from docker/xdebug.ini rename to scaffold/optional/docker/xdebug.ini diff --git a/dsh_bash b/scaffold/optional/dsh_bash similarity index 100% rename from dsh_bash rename to scaffold/optional/dsh_bash diff --git a/phpcs.xml b/scaffold/optional/phpcs.xml similarity index 100% rename from phpcs.xml rename to scaffold/optional/phpcs.xml diff --git a/RoboFileBase.php b/scaffold/required/RoboFileBase.php similarity index 100% rename from RoboFileBase.php rename to scaffold/required/RoboFileBase.php diff --git a/dsh b/scaffold/required/dsh similarity index 100% rename from dsh rename to scaffold/required/dsh diff --git a/src/Handler.php b/src/Handler.php index 36c50ee..1e23d16 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -1,5 +1,7 @@ getIO()->write("Updating Shepherd scaffold files."); + $event->getIO()->write('Updating Shepherd scaffold files.'); $this->updateShepherdScaffoldFiles(); - $event->getIO()->write("Creating necessary directories."); + $event->getIO()->write('Creating necessary directories.'); $this->createDirectories(); - $event->getIO()->write("Creating settings.php file if not present."); + $event->getIO()->write('Creating settings.php file if not present.'); $this->populateSettingsFile(); - $event->getIO()->write("Removing write permissions on settings files."); + $event->getIO()->write('Removing write permissions on settings files.'); $this->removeWritePermissions(); } @@ -42,12 +43,12 @@ public function onPostCmdEvent(Event $event): void */ public function updateShepherdScaffoldFiles(): void { - $packagePath = $this->getPackagePath(); $projectPath = $this->getProjectPath(); + $scaffoldPath = $this->getScaffoldDirectory(); // Always copy and replace these files. $this->copyFiles( - $packagePath, + $scaffoldPath . '/required', $projectPath, [ 'dsh', @@ -58,7 +59,7 @@ public function updateShepherdScaffoldFiles(): void // Only copy these files if they do not exist at the destination. $this->copyFiles( - $packagePath, + $scaffoldPath . '/optional', $projectPath, [ 'docker-compose.linux.yml', @@ -78,6 +79,7 @@ public function updateShepherdScaffoldFiles(): void */ public function createDirectories(): void { + // @todo is this necessary???????????????? $root = $this->getDrupalRootPath(); $dirs = [ $root . '/modules', @@ -109,10 +111,10 @@ public function populateSettingsFile(): void // $this->filesystem->chmod($root . '/sites/default/settings.php', 0664); // If we haven't already written to settings.php. - if (!(strpos(file_get_contents($root . '/sites/default/settings.php'), 'START SHEPHERD CONFIG') !== false)) { - // Append Shepherd-specific environment variable settings to settings.php. + if (!(false !== strpos(file_get_contents($root . '/sites/default/settings.php'), 'START SHEPHERD CONFIG'))) { + // Append Shepherd-specific environment variable settings to settings.php. file_put_contents( - $root.'/sites/default/settings.php', + $root . '/sites/default/settings.php', $this->generateSettings(), FILE_APPEND ); @@ -123,14 +125,14 @@ public function populateSettingsFile(): void * Generates the "template" settings.php configuration. * * @return string - * PHP code. - * @throws \Exception + * Contents of the settings.php file. */ public function generateSettings(): string { - $settings = file_get_contents(__DIR__ . '/../fixtures/php/settings.php.txt'); - $hashSalt = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(random_bytes(55))); - return str_replace('<<>>', $hashSalt, $settings); + $settings = file_get_contents(__DIR__ . '/../fixtures/php/settings.php.txt'); + $hashSalt = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(random_bytes(55))); + + return str_replace('<<>>', $hashSalt, $settings); } /** @@ -146,14 +148,15 @@ public function removeWritePermissions(): void /** * Copy files from origin to destination, optionally overwriting existing. * + * @param string[] $filenames * @param bool $overwriteExisting - * If true, replace existing files. Defaults to false. + * If true, replace existing files. Defaults to false. */ - public function copyFiles($origin, $destination, $filenames, $overwriteExisting = false): void + public function copyFiles(string $origin, string $destination, array $filenames, bool $overwriteExisting = false): void { foreach ($filenames as $filename) { // Skip copying files that already exist at the destination. - if (! $overwriteExisting && $this->filesystem->exists($destination . '/' . $filename)) { + if (!$overwriteExisting && $this->filesystem->exists($destination . '/' . $filename)) { continue; } $this->filesystem->copy( @@ -168,8 +171,6 @@ public function copyFiles($origin, $destination, $filenames, $overwriteExisting * Get the path to the vendor directory. * * E.g. /home/user/code/project/vendor - * - * @return string */ public function getVendorPath(): string { @@ -193,16 +194,6 @@ public function getProjectPath(): string return dirname($this->getVendorPath()); } - /** - * Get the path to the package directory. - * - * E.g. /home/user/code/project/vendor/universityofadelaide/shepherd-drupal-scaffold - */ - public function getPackagePath(): string - { - return $this->getVendorPath() . '/universityofadelaide/shepherd-drupal-scaffold'; - } - /** * Get the path to the Drupal root directory. * @@ -213,4 +204,11 @@ public function getDrupalRootPath(): string return $this->getProjectPath() . '/web'; } + /** + * Path to scaffold files. + */ + public function getScaffoldDirectory(): string + { + return $this->getVendorPath() . '/universityofadelaide/shepherd-drupal-scaffold/scaffold'; + } } diff --git a/src/ShepherdDrupalScaffoldPlugin.php b/src/ShepherdDrupalScaffoldPlugin.php index 8bd9721..660e1b4 100644 --- a/src/ShepherdDrupalScaffoldPlugin.php +++ b/src/ShepherdDrupalScaffoldPlugin.php @@ -1,5 +1,7 @@ handler = new Handler($composer, $io); } - public function deactivate(Composer $composer, IOInterface $io) { + public function deactivate(Composer $composer, IOInterface $io) + { } - public function uninstall(Composer $composer, IOInterface $io) { + public function uninstall(Composer $composer, IOInterface $io) + { } public static function getSubscribedEvents() { - return array( + return [ ScriptEvents::POST_INSTALL_CMD => 'postCmd', ScriptEvents::POST_UPDATE_CMD => 'postCmd', - ); + ]; } /** - * Post command event callback. - */ + * Post command event callback. + */ public function postCmd(Event $event) { $this->handler->onPostCmdEvent($event); } - /** * Script callback for putting in composer scripts to download the * scaffold files. - */ + */ public static function scaffold(Event $event) { $handler = new Handler($event->getComposer(), $event->getIO()); From e4549626f4b945eb7c966128f8e7dc6cacb129aa Mon Sep 17 00:00:00 2001 From: dpi Date: Wed, 30 Jun 2021 13:58:39 +0800 Subject: [PATCH 09/23] Composer 2 --- scaffold/optional/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scaffold/optional/docker/Dockerfile b/scaffold/optional/docker/Dockerfile index c9d0ad9..fc74cf7 100644 --- a/scaffold/optional/docker/Dockerfile +++ b/scaffold/optional/docker/Dockerfile @@ -46,7 +46,7 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz # Install Composer. -RUN wget -q https://getcomposer.org/installer -O - | php -d allow_url_fopen=On -- --install-dir=/usr/local/bin --filename=composer --1 +RUN wget -q https://getcomposer.org/installer -O - | php -d allow_url_fopen=On -- --install-dir=/usr/local/bin --filename=composer COPY ./docker/xdebug.ini /etc/php/${PHP_VERSION}/mods-available/xdebug.ini From 8179efe787fd2fd4c3aab2ffc3f50414dc3ed7f0 Mon Sep 17 00:00:00 2001 From: dpi Date: Wed, 30 Jun 2021 14:28:45 +0800 Subject: [PATCH 10/23] taskify --- .editorconfig | 2 +- src/Handler.php | 108 ++++++++++++++-------------------- src/tasks/CopyFile.php | 58 ++++++++++++++++++ src/tasks/CreateDirectory.php | 35 +++++++++++ src/tasks/TaskInterface.php | 9 +++ 5 files changed, 146 insertions(+), 66 deletions(-) create mode 100644 src/tasks/CopyFile.php create mode 100644 src/tasks/CreateDirectory.php create mode 100644 src/tasks/TaskInterface.php diff --git a/.editorconfig b/.editorconfig index 12bcb27..c385c34 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,7 @@ root = true [*] end_of_line = LF indent_style = space -indent_size = 2 +indent_size = 4 charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true diff --git a/src/Handler.php b/src/Handler.php index 1e23d16..3cdb772 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -9,6 +9,8 @@ use Composer\Script\Event; use Composer\Util\Filesystem as ComposerFilesystem; use Symfony\Component\Filesystem\Filesystem; +use UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CopyFile; +use UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CreateDirectory; class Handler { @@ -43,35 +45,10 @@ public function onPostCmdEvent(Event $event): void */ public function updateShepherdScaffoldFiles(): void { - $projectPath = $this->getProjectPath(); $scaffoldPath = $this->getScaffoldDirectory(); - - // Always copy and replace these files. - $this->copyFiles( - $scaffoldPath . '/required', - $projectPath, - [ - 'dsh', - 'RoboFileBase.php', - ], - true - ); - - // Only copy these files if they do not exist at the destination. - $this->copyFiles( - $scaffoldPath . '/optional', - $projectPath, - [ - 'docker-compose.linux.yml', - 'docker-compose.osx.yml', - 'dsh_bash', - 'phpcs.xml', - 'RoboFile.php', - 'docker/Dockerfile', - 'docker/xdebug.ini', - 'docker/php_custom.ini', - ] - ); + foreach ($this->getFileTasks($scaffoldPath) as $task) { + $task->execute($this->filesystem, $this->getProjectPath()); + } } /** @@ -79,22 +56,9 @@ public function updateShepherdScaffoldFiles(): void */ public function createDirectories(): void { - // @todo is this necessary???????????????? $root = $this->getDrupalRootPath(); - $dirs = [ - $root . '/modules', - $root . '/profiles', - $root . '/themes', - 'config-install', - 'config-export', - ]; - - // Required for unit testing. - foreach ($dirs as $dir) { - if (!$this->filesystem->exists($dir)) { - $this->filesystem->mkdir($dir); - $this->filesystem->touch($dir . '/.gitkeep'); - } + foreach ($this->getCreateDirectoryTasks($root) as $task) { + $task->execute($this->filesystem); } } @@ -145,28 +109,6 @@ public function removeWritePermissions(): void // $this->filesystem->chmod($root . '/sites/default', 0555); } - /** - * Copy files from origin to destination, optionally overwriting existing. - * - * @param string[] $filenames - * @param bool $overwriteExisting - * If true, replace existing files. Defaults to false. - */ - public function copyFiles(string $origin, string $destination, array $filenames, bool $overwriteExisting = false): void - { - foreach ($filenames as $filename) { - // Skip copying files that already exist at the destination. - if (!$overwriteExisting && $this->filesystem->exists($destination . '/' . $filename)) { - continue; - } - $this->filesystem->copy( - $origin . '/' . $filename, - $destination . '/' . $filename, - true - ); - } - } - /** * Get the path to the vendor directory. * @@ -211,4 +153,40 @@ public function getScaffoldDirectory(): string { return $this->getVendorPath() . '/universityofadelaide/shepherd-drupal-scaffold/scaffold'; } + + /** + * @return \UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CopyFile[] + */ + protected function getFileTasks(string $scaffoldPath): array + { + return array_map(fn (...$args): CopyFile => new CopyFile(...$args), [ + // Always copy and replace these files. + [$scaffoldPath . '/required', 'dsh', true], + [$scaffoldPath . '/required', 'RoboFileBase.php', true], + + // Only copy these files if they do not exist at the destination. + [$scaffoldPath . '/optional', 'docker-compose.linux.yml'], + [$scaffoldPath . '/optional', 'docker-compose.osx.yml'], + [$scaffoldPath . '/optional', 'dsh_bash'], + [$scaffoldPath . '/optional', 'phpcs.xml'], + [$scaffoldPath . '/optional', 'RoboFile.php'], + [$scaffoldPath . '/optional', 'docker/Dockerfile'], + [$scaffoldPath . '/optional', 'docker/xdebug.ini'], + [$scaffoldPath . '/optional', 'docker/php_custom.ini'], + ]); + } + + /** + * @return \UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CreateDirectory[] + */ + protected function getCreateDirectoryTasks(string $root): array + { + return array_map(fn (string $path): CreateDirectory => new CreateDirectory($path), [ + $root . '/modules', + $root . '/profiles', + $root . '/themes', + 'config-install', + 'config-export', + ]); + } } diff --git a/src/tasks/CopyFile.php b/src/tasks/CopyFile.php new file mode 100644 index 0000000..a3f0f91 --- /dev/null +++ b/src/tasks/CopyFile.php @@ -0,0 +1,58 @@ +origin = $origin; + $this->filename = $filename; + $this->overwriteExisting = $overwriteExisting; + } + + public function getOrigin(): string + { + return $this->origin; + } + + public function getFilename(): string + { + return $this->filename; + } + + public function isOverwriting(): bool + { + return $this->overwriteExisting; + } + + /** + * @throws \Symfony\Component\Filesystem\Exception\FileNotFoundException + * When original file doesn't exist + * @throws \Symfony\Component\Filesystem\Exception\IOException + * When copy fails + */ + public function execute(Filesystem $filesystem, string $destination): void + { + // Skip copying files that already exist at the destination. + if (!$this->overwriteExisting && $filesystem->exists($destination . '/' . $this->filename)) { + return; + } + + $filesystem->copy( + $this->origin . '/' . $this->filename, + $destination . '/' . $this->filename, + $this->overwriteExisting, + ); + } +} diff --git a/src/tasks/CreateDirectory.php b/src/tasks/CreateDirectory.php new file mode 100644 index 0000000..da3ae78 --- /dev/null +++ b/src/tasks/CreateDirectory.php @@ -0,0 +1,35 @@ +path = $path; + $this->gitKeep = $gitKeep; + } + + /** + * @throws \Symfony\Component\Filesystem\Exception\IOException + * On any directory creation failure or when touch fails + */ + public function execute(Filesystem $filesystem): void + { + if (!$filesystem->exists($this->path)) { + $filesystem->mkdir($this->path); + } + + if ($this->gitKeep) { + $filesystem->touch($this->path . '/.gitkeep'); + } + } +} diff --git a/src/tasks/TaskInterface.php b/src/tasks/TaskInterface.php new file mode 100644 index 0000000..de0da3a --- /dev/null +++ b/src/tasks/TaskInterface.php @@ -0,0 +1,9 @@ + Date: Wed, 30 Jun 2021 14:45:30 +0800 Subject: [PATCH 11/23] .gitignore append --- src/Handler.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Handler.php b/src/Handler.php index 3cdb772..7856d8a 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -32,6 +32,8 @@ public function onPostCmdEvent(Event $event): void { $event->getIO()->write('Updating Shepherd scaffold files.'); $this->updateShepherdScaffoldFiles(); + $event->getIO()->write('Adding scaffold files to .gitignore'); + $this->updateGitIgnoreScaffoldFiles(); $event->getIO()->write('Creating necessary directories.'); $this->createDirectories(); $event->getIO()->write('Creating settings.php file if not present.'); @@ -51,6 +53,34 @@ public function updateShepherdScaffoldFiles(): void } } + public function updateGitIgnoreScaffoldFiles(): void + { + // Only continue if there is a .gitignore file. + $gitIgnorePath = $this->getProjectPath() . '/.gitignore'; + if (!$this->filesystem->exists($gitIgnorePath)) { + return; + } + + $gitIgnore = file_get_contents($gitIgnorePath); + + // Get list of file paths which need to be added to .gitignore. + $paths = array_filter( + array_map(fn (CopyFile $task) => $task->getFilename(), $this->getFileTasks($this->getScaffoldDirectory())), + function (string $fileName) use ($gitIgnore): bool { + return false !== strpos($gitIgnore, $fileName); + } + ); + + $append = ''; + foreach ($paths as $path) { + $append .= sprintf("%s\n", $path); + } + + if (!empty($append)) { + file_put_contents($gitIgnorePath, "\n" . $append, \FILE_APPEND); + } + } + /** * Ensure necessary directories exist. */ From 97fe2cc808a200dd32bc384ddbc4b98bc03cd9bf Mon Sep 17 00:00:00 2001 From: dpi Date: Wed, 30 Jun 2021 14:53:25 +0800 Subject: [PATCH 12/23] fixup --- src/Handler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handler.php b/src/Handler.php index 7856d8a..a9b4aad 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -67,7 +67,7 @@ public function updateGitIgnoreScaffoldFiles(): void $paths = array_filter( array_map(fn (CopyFile $task) => $task->getFilename(), $this->getFileTasks($this->getScaffoldDirectory())), function (string $fileName) use ($gitIgnore): bool { - return false !== strpos($gitIgnore, $fileName); + return false === strpos($gitIgnore, $fileName); } ); @@ -189,7 +189,7 @@ public function getScaffoldDirectory(): string */ protected function getFileTasks(string $scaffoldPath): array { - return array_map(fn (...$args): CopyFile => new CopyFile(...$args), [ + return array_map(fn ($args): CopyFile => new CopyFile(...$args), [ // Always copy and replace these files. [$scaffoldPath . '/required', 'dsh', true], [$scaffoldPath . '/required', 'RoboFileBase.php', true], From d4ab741d1cfe7d315c51542173cd9b0198c7477c Mon Sep 17 00:00:00 2001 From: dpi Date: Wed, 30 Jun 2021 14:58:29 +0800 Subject: [PATCH 13/23] docs --- src/Handler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Handler.php b/src/Handler.php index a9b4aad..68bafb8 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -53,6 +53,9 @@ public function updateShepherdScaffoldFiles(): void } } + /** + * Adds scaffold files to .gitignore. + */ public function updateGitIgnoreScaffoldFiles(): void { // Only continue if there is a .gitignore file. From 69eee382b48df6033212f135a53d1b69d4bb0de1 Mon Sep 17 00:00:00 2001 From: dpi Date: Wed, 30 Jun 2021 16:00:12 +0800 Subject: [PATCH 14/23] fn-ize --- src/Handler.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Handler.php b/src/Handler.php index 68bafb8..209b5b8 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -69,9 +69,7 @@ public function updateGitIgnoreScaffoldFiles(): void // Get list of file paths which need to be added to .gitignore. $paths = array_filter( array_map(fn (CopyFile $task) => $task->getFilename(), $this->getFileTasks($this->getScaffoldDirectory())), - function (string $fileName) use ($gitIgnore): bool { - return false === strpos($gitIgnore, $fileName); - } + fn (string $fileName): bool => false === strpos($gitIgnore, $fileName) ); $append = ''; From 2f58e680ac9fe6e89cb369a74fc09b0efd18a1e7 Mon Sep 17 00:00:00 2001 From: dpi Date: Thu, 1 Jul 2021 21:45:28 +0800 Subject: [PATCH 15/23] refactors --- src/Handler.php | 223 --------------------------- src/ScaffoldTrait.php | 68 ++++++++ src/ShepherdDrupalScaffoldPlugin.php | 32 ++-- src/actions/ActionInterface.php | 19 +++ src/actions/Directories.php | 42 +++++ src/actions/DrupalSettings.php | 56 +++++++ src/actions/GitIgnore.php | 62 ++++++++ src/actions/ScaffoldFiles.php | 51 ++++++ src/tasks/AppendFile.php | 22 +++ src/tasks/CopyFile.php | 21 ++- src/tasks/CreateDirectory.php | 13 +- src/tasks/TaskInterface.php | 1 + 12 files changed, 356 insertions(+), 254 deletions(-) delete mode 100644 src/Handler.php create mode 100644 src/ScaffoldTrait.php create mode 100644 src/actions/ActionInterface.php create mode 100644 src/actions/Directories.php create mode 100644 src/actions/DrupalSettings.php create mode 100644 src/actions/GitIgnore.php create mode 100644 src/actions/ScaffoldFiles.php create mode 100644 src/tasks/AppendFile.php diff --git a/src/Handler.php b/src/Handler.php deleted file mode 100644 index 209b5b8..0000000 --- a/src/Handler.php +++ /dev/null @@ -1,223 +0,0 @@ -composer = $composer; - $this->io = $io; - $this->filesystem = new Filesystem(); - } - - /** - * Post update command event to execute the scaffolding. - */ - public function onPostCmdEvent(Event $event): void - { - $event->getIO()->write('Updating Shepherd scaffold files.'); - $this->updateShepherdScaffoldFiles(); - $event->getIO()->write('Adding scaffold files to .gitignore'); - $this->updateGitIgnoreScaffoldFiles(); - $event->getIO()->write('Creating necessary directories.'); - $this->createDirectories(); - $event->getIO()->write('Creating settings.php file if not present.'); - $this->populateSettingsFile(); - $event->getIO()->write('Removing write permissions on settings files.'); - $this->removeWritePermissions(); - } - - /** - * Update the Shepherd scaffold files. - */ - public function updateShepherdScaffoldFiles(): void - { - $scaffoldPath = $this->getScaffoldDirectory(); - foreach ($this->getFileTasks($scaffoldPath) as $task) { - $task->execute($this->filesystem, $this->getProjectPath()); - } - } - - /** - * Adds scaffold files to .gitignore. - */ - public function updateGitIgnoreScaffoldFiles(): void - { - // Only continue if there is a .gitignore file. - $gitIgnorePath = $this->getProjectPath() . '/.gitignore'; - if (!$this->filesystem->exists($gitIgnorePath)) { - return; - } - - $gitIgnore = file_get_contents($gitIgnorePath); - - // Get list of file paths which need to be added to .gitignore. - $paths = array_filter( - array_map(fn (CopyFile $task) => $task->getFilename(), $this->getFileTasks($this->getScaffoldDirectory())), - fn (string $fileName): bool => false === strpos($gitIgnore, $fileName) - ); - - $append = ''; - foreach ($paths as $path) { - $append .= sprintf("%s\n", $path); - } - - if (!empty($append)) { - file_put_contents($gitIgnorePath, "\n" . $append, \FILE_APPEND); - } - } - - /** - * Ensure necessary directories exist. - */ - public function createDirectories(): void - { - $root = $this->getDrupalRootPath(); - foreach ($this->getCreateDirectoryTasks($root) as $task) { - $task->execute($this->filesystem); - } - } - - /** - * Create settings.php file and inject Shepherd-specific settings. - * - * Note: does nothing if the file already exists. - */ - public function populateSettingsFile(): void - { - $root = $this->getDrupalRootPath(); - - // Assume Drupal scaffold created the settings.php -// $this->filesystem->chmod($root . '/sites/default/settings.php', 0664); - - // If we haven't already written to settings.php. - if (!(false !== strpos(file_get_contents($root . '/sites/default/settings.php'), 'START SHEPHERD CONFIG'))) { - // Append Shepherd-specific environment variable settings to settings.php. - file_put_contents( - $root . '/sites/default/settings.php', - $this->generateSettings(), - FILE_APPEND - ); - } - } - - /** - * Generates the "template" settings.php configuration. - * - * @return string - * Contents of the settings.php file. - */ - public function generateSettings(): string - { - $settings = file_get_contents(__DIR__ . '/../fixtures/php/settings.php.txt'); - $hashSalt = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(random_bytes(55))); - - return str_replace('<<>>', $hashSalt, $settings); - } - - /** - * Remove all write permissions on Drupal configuration files and folder. - */ - public function removeWritePermissions(): void - { - $root = $this->getDrupalRootPath(); -// $this->filesystem->chmod($root . '/sites/default/settings.php', 0444); -// $this->filesystem->chmod($root . '/sites/default', 0555); - } - - /** - * Get the path to the vendor directory. - * - * E.g. /home/user/code/project/vendor - */ - public function getVendorPath(): string - { - // Load ComposerFilesystem to get access to path normalisation. - $composerFilesystem = new ComposerFilesystem(); - - $config = $this->composer->getConfig(); - $composerFilesystem->ensureDirectoryExists($config->get('vendor-dir')); - $vendorPath = $composerFilesystem->normalizePath(realpath($config->get('vendor-dir'))); - - return $vendorPath; - } - - /** - * Get the path to the project directory. - * - * E.g. /home/user/code/project - */ - public function getProjectPath(): string - { - return dirname($this->getVendorPath()); - } - - /** - * Get the path to the Drupal root directory. - * - * E.g. /home/user/code/project/web - */ - public function getDrupalRootPath(): string - { - return $this->getProjectPath() . '/web'; - } - - /** - * Path to scaffold files. - */ - public function getScaffoldDirectory(): string - { - return $this->getVendorPath() . '/universityofadelaide/shepherd-drupal-scaffold/scaffold'; - } - - /** - * @return \UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CopyFile[] - */ - protected function getFileTasks(string $scaffoldPath): array - { - return array_map(fn ($args): CopyFile => new CopyFile(...$args), [ - // Always copy and replace these files. - [$scaffoldPath . '/required', 'dsh', true], - [$scaffoldPath . '/required', 'RoboFileBase.php', true], - - // Only copy these files if they do not exist at the destination. - [$scaffoldPath . '/optional', 'docker-compose.linux.yml'], - [$scaffoldPath . '/optional', 'docker-compose.osx.yml'], - [$scaffoldPath . '/optional', 'dsh_bash'], - [$scaffoldPath . '/optional', 'phpcs.xml'], - [$scaffoldPath . '/optional', 'RoboFile.php'], - [$scaffoldPath . '/optional', 'docker/Dockerfile'], - [$scaffoldPath . '/optional', 'docker/xdebug.ini'], - [$scaffoldPath . '/optional', 'docker/php_custom.ini'], - ]); - } - - /** - * @return \UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CreateDirectory[] - */ - protected function getCreateDirectoryTasks(string $root): array - { - return array_map(fn (string $path): CreateDirectory => new CreateDirectory($path), [ - $root . '/modules', - $root . '/profiles', - $root . '/themes', - 'config-install', - 'config-export', - ]); - } -} diff --git a/src/ScaffoldTrait.php b/src/ScaffoldTrait.php new file mode 100644 index 0000000..ab37ee3 --- /dev/null +++ b/src/ScaffoldTrait.php @@ -0,0 +1,68 @@ +composer = $composer; + $this->io = $io; + $this->filesystem = new Filesystem(); + } + + /** + * Get the path to the Drupal root directory. + * + * E.g. /home/user/code/project/web + */ + protected function getDrupalRootPath(): string + { + return $this->getProjectPath() . '/web'; + } + + /** + * Get the path to the project directory. + * + * E.g. /home/user/code/project + */ + protected function getProjectPath(): string + { + return dirname($this->getVendorPath()); + } + + /** + * Path to scaffold files. + */ + protected function getScaffoldDirectory(): string + { + return $this->getVendorPath() . '/universityofadelaide/shepherd-drupal-scaffold/scaffold'; + } + + /** + * Get the path to the vendor directory. + * + * E.g. /home/user/code/project/vendor + */ + protected function getVendorPath(): string + { + // Load ComposerFilesystem to get access to path normalisation. + $composerFilesystem = new ComposerFilesystem(); + + $config = $this->composer->getConfig(); + $composerFilesystem->ensureDirectoryExists($config->get('vendor-dir')); + + return $composerFilesystem->normalizePath(realpath($config->get('vendor-dir'))); + } +} diff --git a/src/ShepherdDrupalScaffoldPlugin.php b/src/ShepherdDrupalScaffoldPlugin.php index 660e1b4..0419ccd 100644 --- a/src/ShepherdDrupalScaffoldPlugin.php +++ b/src/ShepherdDrupalScaffoldPlugin.php @@ -10,17 +10,24 @@ use Composer\Plugin\PluginInterface; use Composer\Script\Event; use Composer\Script\ScriptEvents; +use UniversityOfAdelaide\ShepherdDrupalScaffold\actions\ActionInterface; +use UniversityOfAdelaide\ShepherdDrupalScaffold\actions\Directories; +use UniversityOfAdelaide\ShepherdDrupalScaffold\actions\DrupalSettings; +use UniversityOfAdelaide\ShepherdDrupalScaffold\actions\GitIgnore; +use UniversityOfAdelaide\ShepherdDrupalScaffold\actions\ScaffoldFiles; /** * Composer plugin for handling Shepherd Drupal scaffold. */ class ShepherdDrupalScaffoldPlugin implements PluginInterface, EventSubscriberInterface { - protected Handler $handler; + protected IOInterface $io; + protected Composer $composer; public function activate(Composer $composer, IOInterface $io) { - $this->handler = new Handler($composer, $io); + $this->composer = $composer; + $this->io = $io; } public function deactivate(Composer $composer, IOInterface $io) @@ -44,16 +51,15 @@ public static function getSubscribedEvents() */ public function postCmd(Event $event) { - $this->handler->onPostCmdEvent($event); - } - - /** - * Script callback for putting in composer scripts to download the - * scaffold files. - */ - public static function scaffold(Event $event) - { - $handler = new Handler($event->getComposer(), $event->getIO()); - $handler->onPostCmdEvent($event); + foreach ([ + Directories::class, + DrupalSettings::class, + GitIgnore::class, + ScaffoldFiles::class, + ] as $actionClass) { + $action = $actionClass::create($this->io, $this->composer); + assert($action instanceof ActionInterface); + $action->onEvent($event); + } } } diff --git a/src/actions/ActionInterface.php b/src/actions/ActionInterface.php new file mode 100644 index 0000000..49bef40 --- /dev/null +++ b/src/actions/ActionInterface.php @@ -0,0 +1,19 @@ +getIO()->write('Creating necessary directories.'); + + $root = $this->getDrupalRootPath(); + foreach (static::tasks($this->filesystem, $root) as $task) { + $task->execute(); + } + } + + /** + * @return \UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CreateDirectory[] + */ + public static function tasks(Filesystem $filesystem, string $root): array + { + return array_map(fn (string $path): CreateDirectory => new CreateDirectory($filesystem, $path), [ + $root . '/modules', + $root . '/profiles', + $root . '/themes', + 'config-install', + 'config-export', + ]); + } +} diff --git a/src/actions/DrupalSettings.php b/src/actions/DrupalSettings.php new file mode 100644 index 0000000..3c20b27 --- /dev/null +++ b/src/actions/DrupalSettings.php @@ -0,0 +1,56 @@ +getIO()->write('Creating settings.php file if not present.'); + + $drupalRootPath = $this->getDrupalRootPath(); + foreach (static::tasks($this->filesystem, $drupalRootPath) as $task) { + $task->execute(); + } + } + + /** + * @return \UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\AppendFile[] + */ + public static function tasks(Filesystem $filesystem, string $drupalRootPath): array + { + $settingsFile = $drupalRootPath . '/sites/default/settings.php'; + + // settings.php comes from drupal/core-composer-scaffold. + if (!$filesystem->exists($settingsFile)) { + return []; + } + + // If we have already written to settings.php. + if (false !== strpos(file_get_contents($settingsFile), 'START SHEPHERD CONFIG')) { + return []; + } + + $settings = file_get_contents(__DIR__ . '/../fixtures/php/settings.php.txt'); + $hashSalt = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(random_bytes(55))); + $data = str_replace('<<>>', $hashSalt, $settings); + + // Append Shepherd-specific environment variable settings to settings.php. + return [new AppendFile($settingsFile, "\n" . $data)]; + } +} diff --git a/src/actions/GitIgnore.php b/src/actions/GitIgnore.php new file mode 100644 index 0000000..ad0c6a6 --- /dev/null +++ b/src/actions/GitIgnore.php @@ -0,0 +1,62 @@ +getIO()->write('Adding scaffold files to .gitignore'); + + $scaffoldPath = $this->getScaffoldDirectory(); + $projectPath = $this->getProjectPath(); + foreach (static::tasks($this->filesystem, $scaffoldPath, $projectPath) as $task) { + $task->execute(); + } + } + + /** + * @return \UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\AppendFile[] + */ + public static function tasks(Filesystem $filesystem, string $scaffoldPath, string $projectPath): array + { + // Only continue if there is a .gitignore file. + $gitIgnorePath = $projectPath . '/.gitignore'; + if (!$filesystem->exists($gitIgnorePath)) { + return []; + } + + $gitIgnore = file_get_contents($gitIgnorePath); + + // Get list of file paths which need to be added to .gitignore. + $fileTasks = ScaffoldFiles::tasks($filesystem, $scaffoldPath, $projectPath); + $paths = array_filter( + array_map(fn (CopyFile $task) => $task->getFilename(), $fileTasks), + fn (string $fileName): bool => false === strpos($gitIgnore, $fileName) + ); + + $data = ''; + foreach ($paths as $path) { + $data .= sprintf("%s\n", $path); + } + + if (!empty($data)) { + return [new AppendFile($gitIgnorePath, "\n" . $data)]; + } + + return []; + } +} diff --git a/src/actions/ScaffoldFiles.php b/src/actions/ScaffoldFiles.php new file mode 100644 index 0000000..feb3055 --- /dev/null +++ b/src/actions/ScaffoldFiles.php @@ -0,0 +1,51 @@ +getIO()->write('Updating Shepherd scaffold files.'); + + $scaffoldPath = $this->getScaffoldDirectory(); + $projectPath = $this->getProjectPath(); + foreach (static::tasks($this->filesystem, $scaffoldPath, $projectPath) as $task) { + $task->execute(); + } + } + + /** + * @return \UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CopyFile[] + */ + public static function tasks(Filesystem $filesystem, string $scaffoldPath, string $projectPath): array + { + return array_map(fn ($args): CopyFile => new CopyFile($filesystem, $projectPath, ...$args), [ + // Always copy and replace these files. + [$scaffoldPath . '/required', 'dsh', true], + [$scaffoldPath . '/required', 'RoboFileBase.php', true], + + // Only copy these files if they do not exist at the destination. + [$scaffoldPath . '/optional', 'docker-compose.linux.yml'], + [$scaffoldPath . '/optional', 'docker-compose.osx.yml'], + [$scaffoldPath . '/optional', 'dsh_bash'], + [$scaffoldPath . '/optional', 'phpcs.xml'], + [$scaffoldPath . '/optional', 'RoboFile.php'], + [$scaffoldPath . '/optional', 'docker/Dockerfile'], + [$scaffoldPath . '/optional', 'docker/xdebug.ini'], + [$scaffoldPath . '/optional', 'docker/php_custom.ini'], + ]); + } +} diff --git a/src/tasks/AppendFile.php b/src/tasks/AppendFile.php new file mode 100644 index 0000000..8316d0f --- /dev/null +++ b/src/tasks/AppendFile.php @@ -0,0 +1,22 @@ +filePath = $filePath; + $this->data = $data; + } + + public function execute(): void + { + \file_put_contents($this->filePath, $this->data, \FILE_APPEND); + } +} diff --git a/src/tasks/CopyFile.php b/src/tasks/CopyFile.php index a3f0f91..29286f3 100644 --- a/src/tasks/CopyFile.php +++ b/src/tasks/CopyFile.php @@ -8,14 +8,16 @@ class CopyFile implements TaskInterface { + protected Filesystem $filesystem; + protected string $destination; protected string $origin; - protected string $filename; - protected bool $overwriteExisting; - public function __construct(string $origin, string $filename, bool $overwriteExisting = false) + public function __construct(Filesystem $filesystem, string $destination, string $origin, string $filename, bool $overwriteExisting = false) { + $this->filesystem = $filesystem; + $this->destination = $destination; $this->origin = $origin; $this->filename = $filename; $this->overwriteExisting = $overwriteExisting; @@ -31,27 +33,22 @@ public function getFilename(): string return $this->filename; } - public function isOverwriting(): bool - { - return $this->overwriteExisting; - } - /** * @throws \Symfony\Component\Filesystem\Exception\FileNotFoundException * When original file doesn't exist * @throws \Symfony\Component\Filesystem\Exception\IOException * When copy fails */ - public function execute(Filesystem $filesystem, string $destination): void + public function execute(): void { // Skip copying files that already exist at the destination. - if (!$this->overwriteExisting && $filesystem->exists($destination . '/' . $this->filename)) { + if (!$this->overwriteExisting && $this->filesystem->exists($this->destination . '/' . $this->filename)) { return; } - $filesystem->copy( + $this->filesystem->copy( $this->origin . '/' . $this->filename, - $destination . '/' . $this->filename, + $this->destination . '/' . $this->filename, $this->overwriteExisting, ); } diff --git a/src/tasks/CreateDirectory.php b/src/tasks/CreateDirectory.php index da3ae78..1fe626b 100644 --- a/src/tasks/CreateDirectory.php +++ b/src/tasks/CreateDirectory.php @@ -9,11 +9,12 @@ class CreateDirectory implements TaskInterface { protected string $path; - protected bool $gitKeep; + protected Filesystem $filesystem; - public function __construct(string $path, bool $gitKeep = true) + public function __construct(Filesystem $filesystem, string $path, bool $gitKeep = true) { + $this->filesystem = $filesystem; $this->path = $path; $this->gitKeep = $gitKeep; } @@ -22,14 +23,14 @@ public function __construct(string $path, bool $gitKeep = true) * @throws \Symfony\Component\Filesystem\Exception\IOException * On any directory creation failure or when touch fails */ - public function execute(Filesystem $filesystem): void + public function execute(): void { - if (!$filesystem->exists($this->path)) { - $filesystem->mkdir($this->path); + if (!$this->filesystem->exists($this->path)) { + $this->filesystem->mkdir($this->path); } if ($this->gitKeep) { - $filesystem->touch($this->path . '/.gitkeep'); + $this->filesystem->touch($this->path . '/.gitkeep'); } } } diff --git a/src/tasks/TaskInterface.php b/src/tasks/TaskInterface.php index de0da3a..081bd3e 100644 --- a/src/tasks/TaskInterface.php +++ b/src/tasks/TaskInterface.php @@ -6,4 +6,5 @@ interface TaskInterface { + public function execute(): void; } From f15ccc5757cc347e31b67b7d4301a6dca73fa9ce Mon Sep 17 00:00:00 2001 From: dpi Date: Thu, 1 Jul 2021 21:52:15 +0800 Subject: [PATCH 16/23] fixes --- src/ScaffoldTrait.php | 10 ++++++---- src/actions/ActionInterface.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ScaffoldTrait.php b/src/ScaffoldTrait.php index ab37ee3..9cf5935 100644 --- a/src/ScaffoldTrait.php +++ b/src/ScaffoldTrait.php @@ -15,11 +15,13 @@ trait ScaffoldTrait protected IOInterface $io; protected Filesystem $filesystem; - public function create(Composer $composer, IOInterface $io) + public static function create(Composer $composer, IOInterface $io) { - $this->composer = $composer; - $this->io = $io; - $this->filesystem = new Filesystem(); + $instance = new static(); + $instance->composer = $composer; + $instance->io = $io; + $instance->filesystem = new Filesystem(); + return $instance; } /** diff --git a/src/actions/ActionInterface.php b/src/actions/ActionInterface.php index 49bef40..31bcda4 100644 --- a/src/actions/ActionInterface.php +++ b/src/actions/ActionInterface.php @@ -13,7 +13,7 @@ interface ActionInterface /** * @return static */ - public function create(Composer $composer, IOInterface $io); + public static function create(Composer $composer, IOInterface $io); public function onEvent(Event $event): void; } From 2ed31a1f1281ab582b9ffa5f0838c9cd0f31de79 Mon Sep 17 00:00:00 2001 From: dpi Date: Thu, 1 Jul 2021 21:54:02 +0800 Subject: [PATCH 17/23] args --- src/ShepherdDrupalScaffoldPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShepherdDrupalScaffoldPlugin.php b/src/ShepherdDrupalScaffoldPlugin.php index 0419ccd..0f6626c 100644 --- a/src/ShepherdDrupalScaffoldPlugin.php +++ b/src/ShepherdDrupalScaffoldPlugin.php @@ -57,7 +57,7 @@ public function postCmd(Event $event) GitIgnore::class, ScaffoldFiles::class, ] as $actionClass) { - $action = $actionClass::create($this->io, $this->composer); + $action = $actionClass::create($this->composer, $this->io); assert($action instanceof ActionInterface); $action->onEvent($event); } From bae02080afaef7ed3707b7658898c8968c36519c Mon Sep 17 00:00:00 2001 From: dpi Date: Thu, 1 Jul 2021 21:55:10 +0800 Subject: [PATCH 18/23] dir --- src/actions/DrupalSettings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/DrupalSettings.php b/src/actions/DrupalSettings.php index 3c20b27..0f6a169 100644 --- a/src/actions/DrupalSettings.php +++ b/src/actions/DrupalSettings.php @@ -46,7 +46,7 @@ public static function tasks(Filesystem $filesystem, string $drupalRootPath): ar return []; } - $settings = file_get_contents(__DIR__ . '/../fixtures/php/settings.php.txt'); + $settings = file_get_contents(__DIR__ . '/../../fixtures/php/settings.php.txt'); $hashSalt = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(random_bytes(55))); $data = str_replace('<<>>', $hashSalt, $settings); From c5f149aac4b40fad5d9f4d558bc6cf0d0b670216 Mon Sep 17 00:00:00 2001 From: dpi Date: Thu, 1 Jul 2021 22:03:31 +0800 Subject: [PATCH 19/23] bits --- README.md | 6 +++++- src/ScaffoldTrait.php | 1 + src/actions/DrupalSettings.php | 12 +++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index aa612be..3c092a2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Shephard Drupal Scaffold +# Shepherd Drupal Scaffold Composer plugin for automatically adding files to a project. @@ -6,3 +6,7 @@ Composer plugin for automatically adding files to a project. - Some files are only added if they don't exist. This is referenced by projects created using `shepherd-drupal-project`. + +## Development + +Run coding standards and fixer with: ` ./bin/php-cs-fixer fix --allow-risky=yes` diff --git a/src/ScaffoldTrait.php b/src/ScaffoldTrait.php index 9cf5935..84fda90 100644 --- a/src/ScaffoldTrait.php +++ b/src/ScaffoldTrait.php @@ -21,6 +21,7 @@ public static function create(Composer $composer, IOInterface $io) $instance->composer = $composer; $instance->io = $io; $instance->filesystem = new Filesystem(); + return $instance; } diff --git a/src/actions/DrupalSettings.php b/src/actions/DrupalSettings.php index 0f6a169..8c382df 100644 --- a/src/actions/DrupalSettings.php +++ b/src/actions/DrupalSettings.php @@ -13,7 +13,9 @@ /** * Create settings.php file and inject Shepherd-specific settings. * - * Note: does nothing if the file already exists. + * Sites shouldn't commit their own settings.php. Site-specific settings should + * be added with a `settings.app.php` adjacent to `settings.php`. This file + * include is done with the append task below. */ final class DrupalSettings implements ActionInterface { @@ -34,14 +36,10 @@ public function onEvent(Event $event): void */ public static function tasks(Filesystem $filesystem, string $drupalRootPath): array { - $settingsFile = $drupalRootPath . '/sites/default/settings.php'; - // settings.php comes from drupal/core-composer-scaffold. - if (!$filesystem->exists($settingsFile)) { - return []; - } + $settingsFile = $drupalRootPath . '/sites/default/settings.php'; - // If we have already written to settings.php. + // Exit if a site has a committed settings.php with this text fragment. if (false !== strpos(file_get_contents($settingsFile), 'START SHEPHERD CONFIG')) { return []; } From 98f3e3fff36b1176c86e226fca0f44971e30c873 Mon Sep 17 00:00:00 2001 From: dpi Date: Fri, 2 Jul 2021 14:48:49 +0800 Subject: [PATCH 20/23] new, config update things, robo things --- .editorconfig | 4 +- composer.json | 3 +- composer.lock | 1154 +++++++++++++++++++--------- scaffold/required/RoboFileBase.php | 202 +---- 4 files changed, 844 insertions(+), 519 deletions(-) diff --git a/.editorconfig b/.editorconfig index c385c34..78bd256 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,5 +13,5 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[{composer.json,composer.lock}] -indent_size = 4 +[scaffold/required/RoboFileBase.php] +indent_size = 2 diff --git a/composer.json b/composer.json index 9180174..18ac40d 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ }, "require-dev": { "composer/composer": "^1.8@stable", - "friendsofphp/php-cs-fixer": "^2" + "friendsofphp/php-cs-fixer": "^2", + "consolidation/robo": "^1" }, "config": { "bin-dir": "bin/" diff --git a/composer.lock b/composer.lock index 62afc96..1ffee87 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "521f15b940088429bf9be88ab14c4142", + "content-hash": "3ae2b811b771d1914a908900db35ee0a", "packages": [ { "name": "symfony/filesystem", @@ -12,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "2d926ebd76f52352deb3c9577d8c1d4b96eae429" + "reference": "a501126eb6ec9288a3434af01b3d4499ec1268a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/2d926ebd76f52352deb3c9577d8c1d4b96eae429", - "reference": "2d926ebd76f52352deb3c9577d8c1d4b96eae429", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a501126eb6ec9288a3434af01b3d4499ec1268a0", + "reference": "a501126eb6ec9288a3434af01b3d4499ec1268a0", "shasum": "" }, "require": { @@ -66,7 +66,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T17:30:55+00:00" + "time": "2021-06-30T07:12:23+00:00" }, { "name": "symfony/polyfill-ctype", @@ -548,6 +548,532 @@ ], "time": "2021-03-25T17:01:18+00:00" }, + { + "name": "consolidation/annotated-command", + "version": "4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/consolidation/annotated-command.git", + "reference": "789358bdc7ae1e76d9fe92e33703d15139cfb4e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/789358bdc7ae1e76d9fe92e33703d15139cfb4e5", + "reference": "789358bdc7ae1e76d9fe92e33703d15139cfb4e5", + "shasum": "" + }, + "require": { + "consolidation/output-formatters": "^4.1.1", + "php": ">=7.1.3", + "psr/log": "^1|^2", + "symfony/console": "^4.4.8|~5.1.0", + "symfony/event-dispatcher": "^4.4.8|^5", + "symfony/finder": "^4.4.8|^5" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.20 || ^8 || ^9", + "squizlabs/php_codesniffer": "^3", + "yoast/phpunit-polyfills": "^0.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\AnnotatedCommand\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Initialize Symfony Console commands from annotated command class methods.", + "support": { + "issues": "https://github.com/consolidation/annotated-command/issues", + "source": "https://github.com/consolidation/annotated-command/tree/4.x" + }, + "time": "2021-06-13T02:21:34+00:00" + }, + { + "name": "consolidation/config", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/consolidation/config.git", + "reference": "ddb0e6c650fc5c4e1f13d10b14604d33cebef76c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/config/zipball/ddb0e6c650fc5c4e1f13d10b14604d33cebef76c", + "reference": "ddb0e6c650fc5c4e1f13d10b14604d33cebef76c", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "grasmash/expander": "^1", + "php": ">=5.4.0" + }, + "require-dev": { + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^5", + "squizlabs/php_codesniffer": "2.*", + "symfony/console": "^2.5|^3|^4", + "symfony/yaml": "^2.8.11|^3|^4" + }, + "suggest": { + "symfony/yaml": "Required to use Consolidation\\Config\\Loader\\YamlConfigLoader" + }, + "type": "library", + "extra": { + "scenarios": { + "symfony4": { + "require-dev": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require-dev": { + "symfony/console": "^2.8", + "symfony/event-dispatcher": "^2.8", + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Provide configuration services for a commandline tool.", + "support": { + "issues": "https://github.com/consolidation/config/issues", + "source": "https://github.com/consolidation/config/tree/master" + }, + "time": "2019-04-06T17:31:34+00:00" + }, + { + "name": "consolidation/log", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/consolidation/log.git", + "reference": "12e1bbc918c5221f7a559a2c9751d2518c9b1d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/log/zipball/12e1bbc918c5221f7a559a2c9751d2518c9b1d5b", + "reference": "12e1bbc918c5221f7a559a2c9751d2518c9b1d5b", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "psr/log": "^1.0", + "symfony/console": "^4|^5" + }, + "require-dev": { + "phpunit/phpunit": ">=7.5.20", + "squizlabs/php_codesniffer": "^3", + "yoast/phpunit-polyfills": "^0.2.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", + "support": { + "issues": "https://github.com/consolidation/log/issues", + "source": "https://github.com/consolidation/log/tree/main" + }, + "time": "2020-12-10T16:53:33+00:00" + }, + { + "name": "consolidation/output-formatters", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/consolidation/output-formatters.git", + "reference": "fb12960888a53b4767e87eee9847cf6c54848e11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/fb12960888a53b4767e87eee9847cf6c54848e11", + "reference": "fb12960888a53b4767e87eee9847cf6c54848e11", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "php": ">=7.1.3", + "symfony/console": "^4|^5", + "symfony/finder": "^4|^5" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.4.2", + "phpunit/phpunit": ">=7", + "squizlabs/php_codesniffer": "^3", + "symfony/var-dumper": "^4", + "symfony/yaml": "^4", + "yoast/phpunit-polyfills": "^0.2.0" + }, + "suggest": { + "symfony/var-dumper": "For using the var_dump formatter" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\OutputFormatters\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Format text by applying transformations provided by plug-in formatters.", + "support": { + "issues": "https://github.com/consolidation/output-formatters/issues", + "source": "https://github.com/consolidation/output-formatters/tree/main" + }, + "time": "2021-03-11T14:26:55+00:00" + }, + { + "name": "consolidation/robo", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/consolidation/Robo.git", + "reference": "fbf5905ad8b2586da0b4b6946fb8ad2c0b0a804e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/fbf5905ad8b2586da0b4b6946fb8ad2c0b0a804e", + "reference": "fbf5905ad8b2586da0b4b6946fb8ad2c0b0a804e", + "shasum": "" + }, + "require": { + "consolidation/annotated-command": "^2.12.1|^4.1", + "consolidation/config": "^1.2.1", + "consolidation/log": "^1.1.1|^2", + "consolidation/output-formatters": "^3.5.1|^4.1", + "consolidation/self-update": "^1.1.5", + "grasmash/yaml-expander": "^1.4", + "league/container": "^2.4.1", + "php": ">=5.5.0", + "symfony/console": "^2.8|^3|^4", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/filesystem": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4|^5", + "symfony/process": "^2.5|^3|^4" + }, + "replace": { + "codegyre/robo": "< 1.0" + }, + "require-dev": { + "g1a/composer-test-scenarios": "^3", + "natxet/cssmin": "3.0.4", + "patchwork/jsqueeze": "^2", + "pear/archive_tar": "^1.4.4", + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^5.7.27", + "squizlabs/php_codesniffer": "^3" + }, + "suggest": { + "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", + "natxet/CssMin": "For minifying CSS files in taskMinify", + "patchwork/jsqueeze": "For minifying JS files in taskMinify", + "pear/archive_tar": "Allows tar archives to be created and extracted in taskPack and taskExtract, respectively." + }, + "bin": [ + "robo" + ], + "type": "library", + "extra": { + "scenarios": { + "finder5": { + "require": { + "symfony/finder": "^5" + }, + "config": { + "platform": { + "php": "7.2.5" + } + } + }, + "symfony4": { + "require": { + "symfony/console": "^4" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.5.9" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + } + }, + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Robo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Davert", + "email": "davert.php@resend.cc" + } + ], + "description": "Modern task runner", + "support": { + "issues": "https://github.com/consolidation/Robo/issues", + "source": "https://github.com/consolidation/Robo/tree/1.x" + }, + "time": "2021-01-18T15:54:10+00:00" + }, + { + "name": "consolidation/self-update", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/consolidation/self-update.git", + "reference": "ed68ed69a427a03bb6fd2197e6d3d564a5ce0cba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/self-update/zipball/ed68ed69a427a03bb6fd2197e6d3d564a5ce0cba", + "reference": "ed68ed69a427a03bb6fd2197e6d3d564a5ce0cba", + "shasum": "" + }, + "require": { + "php": ">=5.5.0", + "symfony/console": "^2.8|^3|^4|^5", + "symfony/filesystem": "^2.5|^3|^4|^5" + }, + "default-branch": true, + "bin": [ + "scripts/release" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "SelfUpdate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexander Menk", + "email": "menk@mestrona.net" + }, + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Provides a self:update command for Symfony Console applications.", + "support": { + "issues": "https://github.com/consolidation/self-update/issues", + "source": "https://github.com/consolidation/self-update/tree/main" + }, + "time": "2020-12-18T03:34:58+00:00" + }, + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "support": { + "issues": "https://github.com/container-interop/container-interop/issues", + "source": "https://github.com/container-interop/container-interop/tree/master" + }, + "abandoned": "psr/container", + "time": "2017-02-14T19:40:03+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Dflydev\\DotAccessData": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/master" + }, + "time": "2017-01-20T21:14:22+00:00" + }, { "name": "doctrine/annotations", "version": "1.14.x-dev", @@ -804,6 +1330,111 @@ ], "time": "2021-06-28T17:07:05+00:00" }, + { + "name": "grasmash/expander", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/grasmash/expander.git", + "reference": "54c66e9d24a03da551e6cd88c6fb4bef571c3dc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/grasmash/expander/zipball/54c66e9d24a03da551e6cd88c6fb4bef571c3dc9", + "reference": "54c66e9d24a03da551e6cd88c6fb4bef571c3dc9", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "php": ">=5.6", + "psr/log": "^1.0" + }, + "require-dev": { + "greg-1-anderson/composer-test-scenarios": "^1", + "phpunit/phpunit": "^5.5.4", + "satooshi/php-coveralls": "^1.0.2|dev-master", + "squizlabs/php_codesniffer": "^2.7" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Grasmash\\Expander\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Grasmick" + } + ], + "description": "Expands internal property references in PHP arrays file.", + "support": { + "issues": "https://github.com/grasmash/expander/issues", + "source": "https://github.com/grasmash/expander/tree/master" + }, + "time": "2020-01-09T16:20:45+00:00" + }, + { + "name": "grasmash/yaml-expander", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/grasmash/yaml-expander.git", + "reference": "3f0f6001ae707a24f4d9733958d77d92bf9693b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/grasmash/yaml-expander/zipball/3f0f6001ae707a24f4d9733958d77d92bf9693b1", + "reference": "3f0f6001ae707a24f4d9733958d77d92bf9693b1", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "php": ">=5.4", + "symfony/yaml": "^2.8.11|^3|^4" + }, + "require-dev": { + "greg-1-anderson/composer-test-scenarios": "^1", + "phpunit/phpunit": "^4.8|^5.5.4", + "satooshi/php-coveralls": "^1.0.2|dev-master", + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Grasmash\\YamlExpander\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Grasmick" + } + ], + "description": "Expands internal property references in a yaml file.", + "support": { + "issues": "https://github.com/grasmash/yaml-expander/issues", + "source": "https://github.com/grasmash/yaml-expander/tree/1.4.0" + }, + "time": "2017-12-16T16:06:03+00:00" + }, { "name": "justinrainbow/json-schema", "version": "5.2.10", @@ -826,18 +1457,94 @@ "json-schema/json-schema-test-suite": "1.2.0", "phpunit/phpunit": "^4.8.35" }, - "bin": [ - "bin/validate-json" - ], + "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.10" + }, + "time": "2020-05-27T16:41:55+00:00" + }, + { + "name": "league/container", + "version": "2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/container.git", + "reference": "dded0af3a39a27c1083bf341db79c0f73b169b7b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/container/zipball/dded0af3a39a27c1083bf341db79c0f73b169b7b", + "reference": "dded0af3a39a27c1083bf341db79c0f73b169b7b", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.2", + "php": "^5.4 || ^7.0 || ^8.0" + }, + "provide": { + "container-interop/container-interop-implementation": "^1.2", + "psr/container-implementation": "^1.0" + }, + "replace": { + "orno/di": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36", + "scrutinizer/ocular": "^1.3", + "squizlabs/php_codesniffer": "^3.5" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0.x-dev" + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" } }, "autoload": { "psr-4": { - "JsonSchema\\": "src/JsonSchema/" + "League\\Container\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -846,33 +1553,34 @@ ], "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" + "name": "Phil Bennett", + "email": "philipobenito@gmail.com", + "homepage": "http://www.philipobenito.com", + "role": "Developer" } ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", + "description": "A fast and intuitive dependency injection container.", + "homepage": "https://github.com/thephpleague/container", "keywords": [ - "json", - "schema" + "container", + "dependency", + "di", + "injection", + "league", + "provider", + "service" ], "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.10" + "issues": "https://github.com/thephpleague/container/issues", + "source": "https://github.com/thephpleague/container/tree/2.x" }, - "time": "2020-05-27T16:41:55+00:00" + "funding": [ + { + "url": "https://github.com/philipobenito", + "type": "github" + } + ], + "time": "2021-02-22T10:38:51+00:00" }, { "name": "php-cs-fixer/diff", @@ -1030,59 +1738,6 @@ }, "time": "2021-03-05T17:36:06+00:00" }, - { - "name": "psr/event-dispatcher", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "aa4f89e91c423b516ff226c50dc83f824011c253" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/aa4f89e91c423b516ff226c50dc83f824011c253", - "reference": "aa4f89e91c423b516ff226c50dc83f824011c253", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "suggest": { - "fig/event-dispatcher-util": "Provides some useful PSR-14 utilities" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "source": "https://github.com/php-fig/event-dispatcher/tree/master" - }, - "time": "2021-02-08T21:15:39+00:00" - }, { "name": "psr/log", "version": "dev-master", @@ -1247,45 +1902,42 @@ }, { "name": "symfony/console", - "version": "5.4.x-dev", + "version": "4.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "4411daa706a497da39b56619c0b2dbbe42b1fba3" + "reference": "9aa1eb46c1b12fada74dc0c529e93d1ccef22576" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4411daa706a497da39b56619c0b2dbbe42b1fba3", - "reference": "4411daa706a497da39b56619c0b2dbbe42b1fba3", + "url": "https://api.github.com/repos/symfony/console/zipball/9aa1eb46c1b12fada74dc0c529e93d1ccef22576", + "reference": "9aa1eb46c1b12fada74dc0c529e93d1ccef22576", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1|^6.0" + "symfony/service-contracts": "^1.1|^2" }, "conflict": { - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", + "symfony/dependency-injection": "<3.4", + "symfony/event-dispatcher": "<4.3|>=5", "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/process": "<3.3" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "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" + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/event-dispatcher": "^4.3", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/var-dumper": "^4.3|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1318,14 +1970,8 @@ ], "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/5.4" + "source": "https://github.com/symfony/console/tree/4.4" }, "funding": [ { @@ -1341,7 +1987,7 @@ "type": "tidelift" } ], - "time": "2021-06-12T10:16:15+00:00" + "time": "2021-06-06T09:12:27+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1413,46 +2059,43 @@ }, { "name": "symfony/event-dispatcher", - "version": "5.4.x-dev", + "version": "4.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "aecf90ffee8f1d2a2c169ec51cd1177027fc3ace" + "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/aecf90ffee8f1d2a2c169ec51cd1177027fc3ace", - "reference": "aecf90ffee8f1d2a2c169ec51cd1177027fc3ace", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/047773e7016e4fd45102cedf4bd2558ae0d0c32f", + "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/event-dispatcher-contracts": "^2", - "symfony/polyfill-php80": "^1.15" + "php": ">=7.1.3", + "symfony/event-dispatcher-contracts": "^1.1" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<3.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "1.1" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/error-handler": "~3.4|~4.4", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^4.4|^5.0|^6.0" + "symfony/stopwatch": "^3.4|^4.0|^5.0" }, "suggest": { "symfony/dependency-injection": "", "symfony/http-kernel": "" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -1479,7 +2122,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/5.4" + "source": "https://github.com/symfony/event-dispatcher/tree/4.4" }, "funding": [ { @@ -1495,34 +2138,33 @@ "type": "tidelift" } ], - "time": "2021-05-26T17:43:50+00:00" + "time": "2021-05-26T17:39:37+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "dev-main", + "version": "v1.1.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "9af5330a64a6aebd8eabad988b50b77d8a9ec8a7" + "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/9af5330a64a6aebd8eabad988b50b77d8a9ec8a7", - "reference": "9af5330a64a6aebd8eabad988b50b77d8a9ec8a7", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7", + "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7", "shasum": "" }, "require": { - "php": ">=8.0.2", - "psr/event-dispatcher": "^1" + "php": ">=7.1.3" }, "suggest": { + "psr/event-dispatcher": "", "symfony/event-dispatcher-implementation": "" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-master": "1.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -1559,7 +2201,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/main" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.9" }, "funding": [ { @@ -1575,7 +2217,7 @@ "type": "tidelift" } ], - "time": "2021-06-09T13:36:38+00:00" + "time": "2020-07-06T13:19:58+00:00" }, { "name": "symfony/finder", @@ -1708,173 +2350,6 @@ ], "time": "2021-05-26T17:43:10+00:00" }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "dev-main", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, - "files": [ - "bootstrap.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": "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/main" - }, - "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-05-27T12:26:48+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "dev-main", - "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" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "files": [ - "bootstrap.php" - ], - "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.23.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": "dev-main", @@ -2268,21 +2743,20 @@ }, { "name": "symfony/process", - "version": "5.4.x-dev", + "version": "4.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "714b47f9196de61a196d86c4bad5f09201b307df" + "reference": "7e812c84c3f2dba173d311de6e510edf701685a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/714b47f9196de61a196d86c4bad5f09201b307df", - "reference": "714b47f9196de61a196d86c4bad5f09201b307df", + "url": "https://api.github.com/repos/symfony/process/zipball/7e812c84c3f2dba173d311de6e510edf701685a8", + "reference": "7e812c84c3f2dba173d311de6e510edf701685a8", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" + "php": ">=7.1.3" }, "type": "library", "autoload": { @@ -2310,7 +2784,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/5.2" + "source": "https://github.com/symfony/process/tree/4.4" }, "funding": [ { @@ -2326,7 +2800,7 @@ "type": "tidelift" } ], - "time": "2021-06-12T10:15:01+00:00" + "time": "2021-06-09T14:57:04+00:00" }, { "name": "symfony/service-contracts", @@ -2474,43 +2948,37 @@ "time": "2021-05-26T17:43:10+00:00" }, { - "name": "symfony/string", - "version": "6.0.x-dev", + "name": "symfony/yaml", + "version": "4.4.x-dev", "source": { "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "9ffb831972fc0aa2eb6f9e44d52f4ad862164a8d" + "url": "https://github.com/symfony/yaml.git", + "reference": "8e3c2dd9318bd9b97eb7249f869a64f33c5039ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/9ffb831972fc0aa2eb6f9e44d52f4ad862164a8d", - "reference": "9ffb831972fc0aa2eb6f9e44d52f4ad862164a8d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/8e3c2dd9318bd9b97eb7249f869a64f33c5039ad", + "reference": "8e3c2dd9318bd9b97eb7249f869a64f33c5039ad", "shasum": "" }, "require": { - "php": ">=8.0.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/translation-contracts": "<2.0" + "symfony/console": "<3.4" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/translation-contracts": "^2", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/console": "^3.4|^4.0|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\String\\": "" + "Symfony\\Component\\Yaml\\": "" }, - "files": [ - "Resources/functions.php" - ], "exclude-from-classmap": [ "/Tests/" ] @@ -2521,26 +2989,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.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", + "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], "support": { - "source": "https://github.com/symfony/string/tree/6.0" + "source": "https://github.com/symfony/yaml/tree/4.4" }, "funding": [ { @@ -2556,7 +3016,7 @@ "type": "tidelift" } ], - "time": "2021-06-27T12:36:10+00:00" + "time": "2021-06-30T13:02:00+00:00" } ], "aliases": [], diff --git a/scaffold/required/RoboFileBase.php b/scaffold/required/RoboFileBase.php index cc895f6..b1fa976 100644 --- a/scaffold/required/RoboFileBase.php +++ b/scaffold/required/RoboFileBase.php @@ -7,10 +7,12 @@ * Implementation of class for Robo - http://robo.li/ */ +use Robo\Tasks; + /** * Class RoboFileBase. */ -abstract class RoboFileBase extends \Robo\Tasks { +abstract class RoboFileBase extends Tasks { protected $drush_cmd; @@ -49,36 +51,13 @@ abstract class RoboFileBase extends \Robo\Tasks { protected $config = []; - protected $config_new_directory = 'config_new'; - protected $config_old_directory = 'config_old'; - /** - * The path to the config dir. - * - * @var string + * The path to the Drupal config directories. */ - protected $configDir = '/code/config-export'; + protected const CONFIG_DIRECTORY = '/code/config-export'; + protected const CONFIG_DIRECTORY_NEW = 'config_new'; + protected const CONFIG_DIRECTORY_OLD = 'config_old'; - /** - * The path to the config install dir. - * - * @var string - */ - protected $configInstallDir = '/code/config-install'; - - /** - * The path to the config delete list. - * - * @var string - */ - protected $configDeleteList = '/code/drush/config-delete.yml'; - - /** - * The path to the config delete list. - * - * @var string - */ - protected $configIgnoreList = '/code/drush/config-ignore.yml'; /** * Initialize config variables and apply overrides. @@ -143,14 +122,14 @@ protected function readConfigFromEnv() { /** * Perform a full build on the project. */ - public function build() { + public function build(): void { $start = new DateTime(); $this->devXdebugDisable(); $this->devComposerValidate(); $this->buildMake(); $this->ensureDirectories(); $this->buildInstall(); - $this->configImportPlus(); + $this->configImport(); $this->devCacheRebuild(); $this->ensureDirectories(); $this->devXdebugEnable(); @@ -205,15 +184,6 @@ public function ensureDirectories() { } } - /** - * Set the owner and group of all files in the files dir to the web user. - * - * @deprecated Use ::ensureDirectories instead. - */ - public function buildSetFilesOwner() { - $this->ensureDirectories(); - } - /** * Clean config and files, then install Drupal and module dependencies. */ @@ -352,150 +322,44 @@ public function devXdebugDisable() { } /** - * Export the current configuration to an 'old' directory. - */ - public function configExportOld() { - $this->configExport($this->config_old_directory); - } - - /** - * Export the current configuration to a 'new' directory. + * Imports Drupal configuration. */ - public function configExportNew() { - $this->configExport($this->config_new_directory); - } - - /** - * Export config to a supplied directory. - * - * @param string $destination - * The folder within the application root. - */ - protected function configExport($destination = NULL) { - $this->yell('This command is deprecated, you should use config:export-plus instead', 40, 'red'); - if ($destination) { - $this->_exec("$this->drush_cmd -y cex --destination=" . $destination); - $this->_exec("sed -i '/^uuid:.*$/d; /^_core:$/, /^.*default_config_hash:.*$/d' $this->application_root/$destination/*.yml"); - } + public function configImport() { + $successful = $this->_exec( + sprintf('%s config:import --yes --source=%s', + $this->drush_cmd, + static::CONFIG_DIRECTORY + )) + ->wasSuccessful(); + $this->checkFail($successful, 'Config import failed.'); } /** - * Display files changed between 'config_old' and 'config_new' directories. + * Exports Drupal configuration. * - * @param array $opts - * Specify whether to show the diff output or just list them. - * - * @return array - * Diff output as an array of strings. + * @param string|null $destination + * An optional custom destination. */ - public function configChanges($opts = ['show|s' => FALSE]) { - $this->yell('This command is deprecated, you should use config:export-plus and config:import-plus instead', 40, 'red'); - $output_style = '-qbr'; - $config_old_path = $this->application_root . '/' . $this->config_old_directory; - $config_new_path = $this->application_root . '/' . $this->config_new_directory; - - if (isset($opts['show']) && $opts['show']) { - $output_style = '-ubr'; - } - - $results = $this->taskExec("diff -N -I \" - 'file:.*\" $output_style $config_old_path $config_new_path") - ->run() - ->getMessage(); - - $results_array = explode("\n", $results); - - return $results_array; - } - - /** - * Synchronise active config to the install profile or specified path. - * - * Synchronise the differences from the configured 'config_new' and - * 'config_old' directories into the install profile or a specific path. - * - * @param array $path - * If the sync is to update an entity instead of a profile, supple a path. - */ - public function configSync($path = NULL) { - $this->yell('This command is deprecated, you should use config:export-plus and config:import-plus instead', 40, 'red'); - $config_sync_already_run = FALSE; - $output_path = $this->application_root . '/profiles/' . $this->getDrupalProfile() . '/config/install'; - $config_new_path = $this->application_root . '/' . $this->config_new_directory; - - // If a path is passed in, use it to override the destination. - if (!empty($path) && is_dir($path)) { - $output_path = $path; - } - - $results_array = $this->configChanges(); - - $tasks = $this->taskFilesystemStack(); - - foreach ($results_array as $line) { - // Handle/remove blank lines. - $line = trim($line); - if (empty($line)) { - continue; - } - - // Never sync the extension file, it breaks things. - if (stristr($line, 'core.extension.yml')) { - continue; - } - - // Break up the line into fields and put the parts in their place. - $parts = explode(' ', $line); - $config_new_file = $parts[3]; - $output_file_path = $output_path . - preg_replace("/^" . str_replace('/', '\/', $config_new_path) ."/", '', $config_new_file); - - // If the source doesn't exist, we're removing it from the - // destination in the profile. - if (!file_exists($config_new_file)) { - if (file_exists($output_file_path)) { - $tasks->remove($output_file_path); - } - else { - $config_sync_already_run = TRUE; - } - } - else { - $tasks->copy($config_new_file, $output_file_path); - } - } - - if ($config_sync_already_run) { - $this->say("Config sync already run?"); - } - - $tasks->run(); + public function configExport(?string $destination = NULL): void { + $this->_exec(sprintf( + '%s config:export --yes --destination=%s', + $this->drush_cmd, + $destination ?? static::CONFIG_DIRECTORY + )); } /** - * Imports configuration using advanced drush commands. - * - * Commands provided by previousnext/drush_cmi_tools. - * - * @see https://github.com/previousnext/drush_cmi_tools + * Export the current configuration to a 'new' directory. */ - public function configImportPlus() { - $successful = $this->_exec("$this->drush_cmd cimy -y \ - --source=$this->configDir \ - --install=$this->configInstallDir \ - --delete-list=$this->configDeleteList") - ->wasSuccessful(); - $this->checkFail($successful, 'Config import failed.'); + public function configExportNew(): void { + $this->configExport(static::CONFIG_DIRECTORY_OLD); } /** - * Exports configuration using advanced drush commands. - * - * Commands provided by previousnext/drush_cmi_tools. - * - * @see https://github.com/previousnext/drush_cmi_tools + * Export the current configuration to an 'old' directory. */ - public function configExportPlus() { - $this->_exec("$this->drush_cmd cexy -y --destination=$this->configDir --ignore-list=$this->configIgnoreList"); + public function configExportOld(): void { + $this->configExport(static::CONFIG_DIRECTORY_NEW); } /** From dfe6bc22347cfc30d40e995d5b32b886b397d4e5 Mon Sep 17 00:00:00 2001 From: dpi Date: Fri, 2 Jul 2021 15:44:05 +0800 Subject: [PATCH 21/23] OO DT diff / full drush command names --- scaffold/required/RoboFileBase.php | 43 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/scaffold/required/RoboFileBase.php b/scaffold/required/RoboFileBase.php index b1fa976..9fd4bba 100644 --- a/scaffold/required/RoboFileBase.php +++ b/scaffold/required/RoboFileBase.php @@ -123,7 +123,7 @@ protected function readConfigFromEnv() { * Perform a full build on the project. */ public function build(): void { - $start = new DateTime(); + $start = new DateTimeImmutable(); $this->devXdebugDisable(); $this->devComposerValidate(); $this->buildMake(); @@ -133,7 +133,7 @@ public function build(): void { $this->devCacheRebuild(); $this->ensureDirectories(); $this->devXdebugEnable(); - $this->say('Total build duration: ' . date_diff(new DateTime(), $start)->format('%im %Ss')); + $this->say('Total build duration: ' . (new \DateTimeImmutable())->diff($start)->format('%im %Ss')); } /** @@ -164,7 +164,11 @@ public function devComposerValidate() { * Additional flags to pass to the composer install command. */ public function buildMake($flags = '') { - $successful = $this->_exec("$this->composer_bin --no-progress --no-interaction $flags install")->wasSuccessful(); + $successful = $this->_exec(sprintf( + '%s --no-progress --no-interaction %s install', + $this->composer_bin, + $flags) + )->wasSuccessful(); $this->checkFail($successful, "Composer install failed."); } @@ -191,11 +195,11 @@ public function buildInstall() { $this->devConfigWriteable(); // @TODO: When is this really used? Automated builds - can be random values. - $successful = $this->_exec("$this->drush_cmd site-install " . + $successful = $this->_exec("$this->drush_cmd site:install " . $this->getDrupalProfile() . " install_configure_form.enable_update_status_module=NULL" . " install_configure_form.enable_update_status_emails=NULL" . - " -y" . + " --yes" . " --account-mail=\"" . $this->config['site']['admin_email'] . "\"" . " --account-name=\"" . $this->config['site']['admin_user'] . "\"" . " --account-pass=\"" . $this->config['site']['admin_password'] . "\"" . @@ -206,7 +210,7 @@ public function buildInstall() { // Re-set settings.php permissions. $this->devConfigReadOnly(); - $this->checkFail($successful, 'drush site-install failed.'); + $this->checkFail($successful, 'drush site:install failed.'); $this->devCacheRebuild(); } @@ -247,7 +251,7 @@ public function buildClean() { */ public function buildApplyUpdates() { // Run the module updates. - $successful = $this->_exec("$this->drush_cmd -y updatedb")->wasSuccessful(); + $successful = $this->_exec("$this->drush_cmd --yes updatedb")->wasSuccessful(); $this->checkFail($successful, 'running drupal updates failed.'); } @@ -255,7 +259,7 @@ public function buildApplyUpdates() { * Perform cache clear in the app directory. */ public function devCacheRebuild() { - $successful = $this->_exec("$this->drush_cmd cr")->wasSuccessful(); + $successful = $this->_exec("$this->drush_cmd cache:rebuild")->wasSuccessful(); $this->checkFail($successful, 'drush cache-rebuild failed.'); } @@ -414,8 +418,8 @@ public function devTwigDebugDisable() { */ public function devAggregateAssetsDisable() { $this->taskExecStack() - ->exec($this->drush_cmd . ' cset system.performance js.preprocess 0 -y') - ->exec($this->drush_cmd . ' cset system.performance css.preprocess 0 -y') + ->exec($this->drush_cmd . ' config:set system.performance js.preprocess 0 --yes') + ->exec($this->drush_cmd . ' config:set system.performance css.preprocess 0 --yes') ->run(); $this->devCacheRebuild(); $this->say('Asset Aggregation is now disabled.'); @@ -426,8 +430,8 @@ public function devAggregateAssetsDisable() { */ public function devAggregateAssetsEnable() { $this->taskExecStack() - ->exec($this->drush_cmd . ' cset system.performance js.preprocess 1 -y') - ->exec($this->drush_cmd . ' cset system.performance css.preprocess 1 -y') + ->exec($this->drush_cmd . ' config:set system.performance js.preprocess 1 --yes') + ->exec($this->drush_cmd . ' config:set system.performance css.preprocess 1 --yes') ->run(); $this->devCacheRebuild(); $this->say('Asset Aggregation is now enabled.'); @@ -461,11 +465,12 @@ public function devConfigReadOnly() { */ public function devImportDb($sql_file) { $start = new DateTime(); - $this->_exec("$this->drush_cmd -y sql-drop"); - $this->_exec("$this->drush_cmd sqlq --file=$sql_file"); - $this->_exec("$this->drush_cmd cr"); - $this->_exec("$this->drush_cmd updb --entity-updates -y"); - $this->say('Duration: ' . date_diff(new DateTime(), $start)->format('%im %Ss')); + $this->_exec("$this->drush_cmd sql:drop --yes"); + $this->_exec("$this->drush_cmd sql:query --file=$sql_file"); + $this->_exec("$this->drush_cmd cache:rebuild"); + $this->_exec("$this->drush_cmd updatedb --entity-updates --yes"); + + $this->say('Duration: ' . (new \DateTimeImmutable())->diff($start)->format('%im %Ss')); $this->_exec("$this->drush_cmd upwd admin password"); $this->say('Database imported, admin user password is : password'); } @@ -478,8 +483,8 @@ public function devImportDb($sql_file) { */ public function devExportDb($name = 'dump') { $start = new DateTime(); - $this->_exec("$this->drush_cmd sql-dump --gzip --result-file=$name.sql"); - $this->say("Duration: " . date_diff(new DateTime(), $start)->format('%im %Ss')); + $this->_exec("$this->drush_cmd sql:dump --gzip --result-file=$name.sql"); + $this->say('Duration: ' . (new \DateTimeImmutable())->diff($start)->format('%im %Ss')); $this->say("Database $name.sql.gz exported"); } From 6f9d0a8c09796bca9c4e4671d6cfefac412f0348 Mon Sep 17 00:00:00 2001 From: dpi Date: Fri, 2 Jul 2021 15:56:28 +0800 Subject: [PATCH 22/23] recycle, -entity-updates doesnt work anymore --- scaffold/required/RoboFileBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scaffold/required/RoboFileBase.php b/scaffold/required/RoboFileBase.php index 9fd4bba..96e92a3 100644 --- a/scaffold/required/RoboFileBase.php +++ b/scaffold/required/RoboFileBase.php @@ -467,8 +467,8 @@ public function devImportDb($sql_file) { $start = new DateTime(); $this->_exec("$this->drush_cmd sql:drop --yes"); $this->_exec("$this->drush_cmd sql:query --file=$sql_file"); - $this->_exec("$this->drush_cmd cache:rebuild"); - $this->_exec("$this->drush_cmd updatedb --entity-updates --yes"); + $this->devCacheRebuild(); + $this->buildApplyUpdates(); $this->say('Duration: ' . (new \DateTimeImmutable())->diff($start)->format('%im %Ss')); $this->_exec("$this->drush_cmd upwd admin password"); From 86a2b8f8604b22215e1cbed5ee72b186a7f647e8 Mon Sep 17 00:00:00 2001 From: dpi Date: Tue, 6 Jul 2021 14:04:32 +0800 Subject: [PATCH 23/23] =?UTF-8?q?one=20of=20these=20is=20not=20like=20the?= =?UTF-8?q?=20other=20=F0=9F=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scaffold/required/RoboFileBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scaffold/required/RoboFileBase.php b/scaffold/required/RoboFileBase.php index 96e92a3..7c3d990 100644 --- a/scaffold/required/RoboFileBase.php +++ b/scaffold/required/RoboFileBase.php @@ -464,7 +464,7 @@ public function devConfigReadOnly() { * Path to sql file to import. */ public function devImportDb($sql_file) { - $start = new DateTime(); + $start = new DateTimeImmutable(); $this->_exec("$this->drush_cmd sql:drop --yes"); $this->_exec("$this->drush_cmd sql:query --file=$sql_file"); $this->devCacheRebuild(); @@ -482,7 +482,7 @@ public function devImportDb($sql_file) { * Name of sql file to be exported. */ public function devExportDb($name = 'dump') { - $start = new DateTime(); + $start = new DateTimeImmutable(); $this->_exec("$this->drush_cmd sql:dump --gzip --result-file=$name.sql"); $this->say('Duration: ' . (new \DateTimeImmutable())->diff($start)->format('%im %Ss')); $this->say("Database $name.sql.gz exported");