From eee6a3f8cba4e5e9819870dadcb47add21554ee8 Mon Sep 17 00:00:00 2001 From: Haja Date: Mon, 16 Dec 2024 17:28:13 +0300 Subject: [PATCH] Update .gitignore --- calendar/.gitignore | 1 - calendar/vendor/autoload.php | 25 + .../.github/workflows/phpstan.yml | 35 ++ .../.github/workflows/tests.yaml | 80 +++ .../composer-bin-plugin/.makefile/touch.sh | 61 ++ .../composer-bin-plugin/.phive/phars.xml | 6 + .../composer-bin-plugin/.php-cs-fixer.php | 17 + .../bamarni/composer-bin-plugin/LICENSE | 19 + .../bamarni/composer-bin-plugin/Makefile | 121 ++++ .../bamarni/composer-bin-plugin/README.md | 248 ++++++++ .../bamarni/composer-bin-plugin/composer.json | 50 ++ .../e2e/scenario0/README.md | 1 + .../e2e/scenario0/composer.json | 16 + .../e2e/scenario0/expected.txt | 16 + .../e2e/scenario0/script.sh | 28 + .../scenario0/vendor-bin/ns1/composer.json | 1 + .../scenario0/vendor-bin/ns2/composer.json | 1 + .../e2e/scenario1/README.md | 1 + .../e2e/scenario1/composer.json | 16 + .../e2e/scenario1/expected.txt | 28 + .../e2e/scenario1/script.sh | 28 + .../scenario1/vendor-bin/ns1/composer.json | 1 + .../scenario1/vendor-bin/ns2/composer.json | 1 + .../e2e/scenario10/README.md | 1 + .../e2e/scenario10/composer.json | 21 + .../e2e/scenario10/expected.txt | 2 + .../e2e/scenario10/script.sh | 31 + .../scenario10/vendor-bin/ns1/composer.json | 5 + .../e2e/scenario11/README.md | 1 + .../e2e/scenario11/composer.json | 21 + .../e2e/scenario11/expected.txt | 19 + .../e2e/scenario11/script.sh | 28 + .../scenario11/vendor-bin/ns1/composer.json | 1 + .../e2e/scenario12/README.md | 1 + .../e2e/scenario12/composer.json | 22 + .../e2e/scenario12/expected.txt | 8 + .../e2e/scenario12/root_root.php | 10 + .../e2e/scenario12/root_vendorbin.php | 10 + .../e2e/scenario12/script.sh | 33 + .../scenario12/vendor-bin/tool/composer.json | 5 + .../scenario12/vendor-bin/tool/root_root.php | 10 + .../vendor-bin/tool/root_vendorbin.php | 10 + .../e2e/scenario2/README.md | 1 + .../e2e/scenario2/composer.json | 16 + .../e2e/scenario2/expected.txt | 6 + .../e2e/scenario2/script.sh | 28 + .../scenario2/vendor-bin/ns1/composer.json | 5 + .../scenario2/vendor-bin/ns2/composer.json | 5 + .../e2e/scenario3/README.md | 1 + .../e2e/scenario3/composer.json | 22 + .../e2e/scenario3/expected.txt | 59 ++ .../e2e/scenario3/script.sh | 28 + .../scenario3/vendor-bin/ns1/composer.json | 1 + .../e2e/scenario5/README.md | 1 + .../e2e/scenario5/composer.json | 21 + .../e2e/scenario5/expected.txt | 5 + .../e2e/scenario5/script.sh | 29 + .../scenario5/vendor-bin/ns1/composer.json | 5 + .../scenario5/vendor-bin/ns2/composer.json | 5 + .../e2e/scenario6/README.md | 1 + .../e2e/scenario6/composer.json | 21 + .../e2e/scenario6/expected.txt | 4 + .../e2e/scenario6/script.sh | 30 + .../scenario6/vendor-bin/ns1/composer.json | 5 + .../scenario6/vendor-bin/ns2/composer.json | 5 + .../e2e/scenario7/README.md | 1 + .../e2e/scenario7/composer.json | 16 + .../e2e/scenario7/expected.txt | 10 + .../e2e/scenario7/script.sh | 30 + .../scenario7/vendor-bin/ns1/composer.json | 8 + .../e2e/scenario8/README.md | 1 + .../e2e/scenario8/composer.json | 22 + .../e2e/scenario8/expected.txt | 31 + .../e2e/scenario8/script.sh | 26 + .../scenario8/vendor-bin/ns1/composer.json | 1 + .../e2e/scenario9/README.md | 1 + .../e2e/scenario9/composer.json | 21 + .../e2e/scenario9/expected.txt | 9 + .../e2e/scenario9/script.sh | 28 + .../vendor-bin/composer-unused/composer.json | 11 + .../composer-bin-plugin/infection.json | 14 + .../FreshInstanceApplicationFactory.php | 15 + .../NamespaceApplicationFactory.php | 12 + .../src/BamarniBinPlugin.php | 184 ++++++ .../src/Command/BinCommand.php | 330 ++++++++++ .../Command/CouldNotCreateNamespaceDir.php | 21 + .../src/CommandProvider.php | 19 + .../composer-bin-plugin/src/Config/Config.php | 156 +++++ .../src/Config/ConfigFactory.php | 39 ++ .../InvalidBamarniComposerExtraConfig.php | 11 + .../src/Input/BinInputFactory.php | 102 +++ .../src/Input/InvalidBinInput.php | 32 + .../composer-bin-plugin/src/Logger.php | 39 ++ .../composer-bin-plugin/src/PublicIO.php | 31 + calendar/vendor/bin/php-cs-fixer | 119 ++++ calendar/vendor/bin/php-cs-fixer.bat | 5 + calendar/vendor/bin/php-cs-fixer.phar | 119 ++++ calendar/vendor/bin/php-cs-fixer.phar.bat | 5 + calendar/vendor/bin/php-parse | 119 ++++ calendar/vendor/bin/php-parse.bat | 5 + calendar/vendor/bin/phpunit | 122 ++++ calendar/vendor/bin/phpunit.bat | 5 + calendar/vendor/bin/psalm | 119 ++++ calendar/vendor/bin/psalm-language-server | 119 ++++ calendar/vendor/bin/psalm-language-server.bat | 5 + calendar/vendor/bin/psalm-plugin | 119 ++++ calendar/vendor/bin/psalm-plugin.bat | 5 + calendar/vendor/bin/psalm-refactor | 119 ++++ calendar/vendor/bin/psalm-refactor.bat | 5 + calendar/vendor/bin/psalm.bat | 5 + calendar/vendor/bin/psalter | 119 ++++ calendar/vendor/bin/psalter.bat | 5 + calendar/vendor/composer/ClassLoader.php | 579 ++++++++++++++++++ .../vendor/composer/InstalledVersions.php | 359 +++++++++++ calendar/vendor/composer/LICENSE | 21 + .../vendor/composer/autoload_classmap.php | 67 ++ .../vendor/composer/autoload_namespaces.php | 9 + calendar/vendor/composer/autoload_psr4.php | 11 + calendar/vendor/composer/autoload_real.php | 38 ++ calendar/vendor/composer/autoload_static.php | 101 +++ calendar/vendor/composer/installed.json | 66 ++ calendar/vendor/composer/installed.php | 32 + calendar/vendor/composer/platform_check.php | 26 + 123 files changed, 4992 insertions(+), 1 deletion(-) create mode 100644 calendar/vendor/autoload.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/.github/workflows/phpstan.yml create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/.github/workflows/tests.yaml create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/.makefile/touch.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/.phive/phars.xml create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/.php-cs-fixer.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/LICENSE create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/Makefile create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/vendor-bin/ns2/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/vendor-bin/ns2/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/root_root.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/root_vendorbin.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/root_root.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/root_vendorbin.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/vendor-bin/ns2/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/vendor-bin/ns2/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/vendor-bin/ns2/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/vendor-bin/ns1/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/README.md create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/expected.txt create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/script.sh create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/vendor-bin/composer-unused/composer.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/infection.json create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/ApplicationFactory/FreshInstanceApplicationFactory.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/ApplicationFactory/NamespaceApplicationFactory.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/BamarniBinPlugin.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/Command/BinCommand.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/CommandProvider.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/Config/Config.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/Config/ConfigFactory.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/Config/InvalidBamarniComposerExtraConfig.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/Input/BinInputFactory.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/Logger.php create mode 100644 calendar/vendor/bamarni/composer-bin-plugin/src/PublicIO.php create mode 100644 calendar/vendor/bin/php-cs-fixer create mode 100644 calendar/vendor/bin/php-cs-fixer.bat create mode 100644 calendar/vendor/bin/php-cs-fixer.phar create mode 100644 calendar/vendor/bin/php-cs-fixer.phar.bat create mode 100644 calendar/vendor/bin/php-parse create mode 100644 calendar/vendor/bin/php-parse.bat create mode 100644 calendar/vendor/bin/phpunit create mode 100644 calendar/vendor/bin/phpunit.bat create mode 100644 calendar/vendor/bin/psalm create mode 100644 calendar/vendor/bin/psalm-language-server create mode 100644 calendar/vendor/bin/psalm-language-server.bat create mode 100644 calendar/vendor/bin/psalm-plugin create mode 100644 calendar/vendor/bin/psalm-plugin.bat create mode 100644 calendar/vendor/bin/psalm-refactor create mode 100644 calendar/vendor/bin/psalm-refactor.bat create mode 100644 calendar/vendor/bin/psalm.bat create mode 100644 calendar/vendor/bin/psalter create mode 100644 calendar/vendor/bin/psalter.bat create mode 100644 calendar/vendor/composer/ClassLoader.php create mode 100644 calendar/vendor/composer/InstalledVersions.php create mode 100644 calendar/vendor/composer/LICENSE create mode 100644 calendar/vendor/composer/autoload_classmap.php create mode 100644 calendar/vendor/composer/autoload_namespaces.php create mode 100644 calendar/vendor/composer/autoload_psr4.php create mode 100644 calendar/vendor/composer/autoload_real.php create mode 100644 calendar/vendor/composer/autoload_static.php create mode 100644 calendar/vendor/composer/installed.json create mode 100644 calendar/vendor/composer/installed.php create mode 100644 calendar/vendor/composer/platform_check.php diff --git a/calendar/.gitignore b/calendar/.gitignore index 1addc0f..33ce871 100644 --- a/calendar/.gitignore +++ b/calendar/.gitignore @@ -62,7 +62,6 @@ build/.sass-cache/ ### Composer ### composer.phar -/vendor/ /vendor-bin/*/vendor # vim ex mode diff --git a/calendar/vendor/autoload.php b/calendar/vendor/autoload.php new file mode 100644 index 0000000..740867c --- /dev/null +++ b/calendar/vendor/autoload.php @@ -0,0 +1,25 @@ + + + + + + diff --git a/calendar/vendor/bamarni/composer-bin-plugin/.php-cs-fixer.php b/calendar/vendor/bamarni/composer-bin-plugin/.php-cs-fixer.php new file mode 100644 index 0000000..507763a --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/.php-cs-fixer.php @@ -0,0 +1,17 @@ +files() + ->in(['src', 'tests']); + +$config = new PhpCsFixer\Config(); + +return $config + ->setRules([ + '@PSR12' => true, + 'strict_param' => true, + 'array_syntax' => ['syntax' => 'short'], + 'no_unused_imports' => true, + ]) + ->setRiskyAllowed(true) + ->setFinder($finder); diff --git a/calendar/vendor/bamarni/composer-bin-plugin/LICENSE b/calendar/vendor/bamarni/composer-bin-plugin/LICENSE new file mode 100644 index 0000000..b5b6c2f --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2016 Bilal Amarni + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/Makefile b/calendar/vendor/bamarni/composer-bin-plugin/Makefile new file mode 100644 index 0000000..031dfde --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/Makefile @@ -0,0 +1,121 @@ +# See https://tech.davis-hansson.com/p/make/ +MAKEFLAGS += --warn-undefined-variables +MAKEFLAGS += --no-builtin-rules + +# General variables +TOUCH = bash .makefile/touch.sh + +# PHP variables +COMPOSER=composer +COVERAGE_DIR = dist/coverage +INFECTION_BIN = tools/infection +INFECTION = php -d zend.enable_gc=0 $(INFECTION_BIN) --skip-initial-tests --coverage=$(COVERAGE_DIR) --only-covered --threads=4 --min-msi=100 --min-covered-msi=100 --ansi +PHPUNIT_BIN = vendor/bin/phpunit +PHPUNIT = php -d zend.enable_gc=0 $(PHPUNIT_BIN) +PHPUNIT_COVERAGE = XDEBUG_MODE=coverage $(PHPUNIT) --group default --coverage-xml=$(COVERAGE_DIR)/coverage-xml --log-junit=$(COVERAGE_DIR)/phpunit.junit.xml +PHPSTAN_BIN = vendor/bin/phpstan +PHPSTAN = $(PHPSTAN_BIN) analyse --level=5 src tests +PHP_CS_FIXER_BIN = tools/php-cs-fixer +PHP_CS_FIXER = $(PHP_CS_FIXER_BIN) fix --ansi --verbose --config=.php-cs-fixer.php +COMPOSER_NORMALIZE_BIN=tools/composer-normalize +COMPOSER_NORMALIZE = ./$(COMPOSER_NORMALIZE_BIN) + + +.DEFAULT_GOAL := default + + +# +# Command +#--------------------------------------------------------------------------- + +.PHONY: help +help: ## Shows the help +help: + @printf "\033[33mUsage:\033[0m\n make TARGET\n\n\033[32m#\n# Commands\n#---------------------------------------------------------------------------\033[0m\n" + @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | awk 'BEGIN {FS = ":"}; {printf "\033[33m%s:\033[0m%s\n", $$1, $$2}' + + +.PHONY: default +default: ## Runs the default task: CS fix and all the tests +default: cs test + + +.PHONY: cs +cs: ## Runs PHP-CS-Fixer +cs: $(PHP_CS_FIXER_BIN) $(COMPOSER_NORMALIZE_BIN) + $(PHP_CS_FIXER) + $(COMPOSER_NORMALIZE) + + +.PHONY: phpstan +phpstan: ## Runs PHPStan +phpstan: + $(PHPSTAN) + + +.PHONY: infection +infection: ## Runs infection +infection: $(INFECTION_BIN) $(COVERAGE_DIR) vendor + if [ -d $(COVERAGE_DIR)/coverage-xml ]; then $(INFECTION); fi + + +.PHONY: test +test: ## Runs all the tests +test: validate-package phpstan $(COVERAGE_DIR) e2e #infection include infection later + + +.PHONY: validate-package +validate-package: ## Validates the Composer package +validate-package: vendor + $(COMPOSER) validate --strict + + +.PHONY: coverage +coverage: ## Runs PHPUnit with code coverage +coverage: $(PHPUNIT_BIN) vendor + $(PHPUNIT_COVERAGE) + + +.PHONY: unit-test +unit-test: ## Runs PHPUnit (default group) +unit-test: $(PHPUNIT_BIN) vendor + $(PHPUNIT) --group default + + +.PHONY: e2e +e2e: ## Runs PHPUnit end-to-end tests +e2e: $(PHPUNIT_BIN) vendor + $(PHPUNIT) --group e2e + + +# +# Rules +#--------------------------------------------------------------------------- + +# Vendor does not depend on the composer.lock since the later is not tracked +# or committed. +vendor: composer.json + $(COMPOSER) update + $(TOUCH) "$@" + +$(PHPUNIT_BIN): vendor + $(TOUCH) "$@" + +$(INFECTION_BIN): ./.phive/phars.xml + phive install infection + $(TOUCH) "$@" + +$(COMPOSER_NORMALIZE_BIN): ./.phive/phars.xml + phive install composer-normalize + $(TOUCH) "$@" + +$(COVERAGE_DIR): $(PHPUNIT_BIN) src tests phpunit.xml.dist + $(PHPUNIT_COVERAGE) + $(TOUCH) "$@" + +$(PHP_CS_FIXER_BIN): vendor + phive install php-cs-fixer + $(TOUCH) "$@" + +$(PHPSTAN_BIN): vendor + $(TOUCH) "$@" diff --git a/calendar/vendor/bamarni/composer-bin-plugin/README.md b/calendar/vendor/bamarni/composer-bin-plugin/README.md new file mode 100644 index 0000000..1950951 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/README.md @@ -0,0 +1,248 @@ +# Composer bin plugin — Isolate your bin dependencies + +[![Package version](http://img.shields.io/packagist/v/bamarni/composer-bin-plugin.svg?style=flat-square)](https://packagist.org/packages/bamarni/composer-bin-plugin) +[![License](https://img.shields.io/badge/license-MIT-red.svg?style=flat-square)](LICENSE) + + +## Table of Contents + +1. [Why? A hard problem with a simple solution.](#why-a-hard-problem-with-a-simple-solution) +1. [Usage; How does this plugin work?](#usage-how-does-this-plugin-work) +1. [Installation](#installation) +1. [Configuration](#configuration) + 1. [Bin links (`bin-links`)](#bin-links-bin-links) + 1. [Target directory (`target-directory`)](#target-directory-target-directory) + 1. [Forward command (`forward-command`)](#forward-command-forward-command) +1. [Tips & Tricks](#tips--tricks) + 1. [Auto-installation](#auto-installation) + 1. [Reduce clutter](#reduce-clutter) + 1. [GitHub Actions integration](#github-actions-integration) +1. [Related plugins](#related-plugins) +1. [Backward Compatibility Promise](#backward-compatibility-promise) +1. [Contributing](#contributing) + + +## Why? A hard problem with a simple solution. + +When managing your dependencies with [Composer][composer], your dependencies are +flattened with compatible versions, or when not possible, result in conflict +errors. + +There is cases however when adding a tool as a dependency, for example [PHPStan][phpstan]* +or [Rector][rector] could have undesired effects due to the dependencies they +are bringing. For example if phpstan depends on `nikic/php-parser` 4.x and rector +3.x, you cannot install both tools at the same time (despite the fact that from +a usage perspective, they do not need to be compatible). Another example, maybe +you can no longer add a non-dev dependency because a dependency brought by PHPStan +is not compatible with it. + +There is nothing special or exceptional about this problem: this is how dependencies +work in PHP with Composer. It is however annoying in the case highlighted above, +because the conflicts should not be: it is a limitation of Composer because it +cannot infer how you are using each dependency. + +One way to solve the problem above, is to install those dependencies in a +different `composer.json` file. It comes with its caveats, for example if you +were to do that with [PHPUnit][phpunit], you may find yourself in the scenario +where PHPUnit will not be able to execute your tests because your code is not +compatible with it and Composer is not able to tell since the PHPUnit dependency +sits alone in its own `composer.json`. It is the very problem Composer aim to +solve. As a rule of thumb, **you should limit this approach to tools which do not +autoload your code.** + +However, managing several `composer.json` kind be a bit annoying. This plugin +aims at helping you doing this. + + +*: You will in practice not have this problem with PHPStan as the Composer package +`phpstan/phpstan` is shipping a scoped PHAR (scoped via [PHP-Scoper][php-scoper]) +which provides not only a package with no dependencies but as well that has no +risk of conflicting/crash when autoloading your code. + + +## Usage; How does this plugin work? + +This plugin registers a `bin ` command that allows you to +interact with the `vendor-bin//composer.json`* file. + +For example: + +```bash +$ composer bin php-cs-fixer require --dev friendsofphp/php-cs-fixer + +# Equivalent to manually doing: +$ mkdir vendor-bin/php-cs-fixer +$ cd vendor-bin/php-cs-fixer && composer require --dev friendsofphp/php-cs-fixer +``` + +You also have a special `all` namespace to interact with all the bin namespaces: + +```bash +# Runs "composer update" for each bin namespace +$ composer bin all update +``` + + +## Installation + +```bash +$ composer require --dev bamarni/composer-bin-plugin +``` + + +## Configuration + +```json +{ + ... + "extra": { + "bamarni-bin": { + "bin-links": false, + "target-directory": "vendor-bin", + "forward-command": true + } + } +} +``` + + +### Bin links (`bin-links`) + +In 1.x: enabled by default. +In 2.x: disabled by default. + +When installing a Composer package, Composer may add "bin links" to a bin +directory. For example, by default when installing `phpunit/phpunit`, it will +add a symlink `vendor/bin/phpunit` pointing to the PHPUnit script somewhere in +`vendor/phpunit/phpunit`. + +In 1.x, BamarniBinPlugin behaves the same way for "bin dependencies", i.e. when +executing `composer bin php-cs-fixer require --dev friendsofphp/php-cs-fixer`, +it will add a bin link `vendor/bin/php-cs-fixer -> vendor-bin/php-cs-fixer/vendor/friendsofphp/php-cs-fixer`. + +This is however a bit tricky and cannot provide consistent behaviour. For example +when installing several packages with the same bin, (e.g. with the case above installing +another tool that uses PHP-CS-Fixer as a dependency in another bin namespace), +the symlink may or may not be overridden, or not created at all. Since it is not +possible to control this behaviour, neither provide an intuitive or deterministic +approach, it is recommended to set this setting to `false` which will be the +default in 2.x. + +It does mean that instead of using `vendor/bin/php-cs-fixer` you will have to +use `vendor-bin/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/path/tophp-cs-fixer` +(in which case setting an alias via a Composer script or something is recommended). + + +### Target directory (`target-directory`) + +Defaults to `vendor-bin`, can be overridden to anything you wish. + + +### Forward command (`forward-command`) + +Disabled by default in 1.x, will be enabled by default in 2.x. If this mode is +enabled, all your `composer install` and `composer update` commands are forwarded +to _all_ bin directories. + +This is a replacement for the tasks shown in section [Auto-installation](#auto-installation). + + +## Tips & Tricks + +### Auto-installation + +You can easily forward a command upon a `composer install` to forward the install +to all (in which case having `extra.bamarni-bin.forward_command = true` is more +adapted) or a specific of bin namespace: + +```json +{ + "scripts": { + "bin": "echo 'bin not installed'", + "post-install-cmd": ["@composer bin php-cs-fixer install --ansi"] + } +} +``` + +You can customise this as you wish leveraging the [Composer script events][composer-script-events]). + + +### Reduce clutter + +You can add the following line to your `.gitignore` file in order to avoid +committing dependencies of your tools. + +```.gitignore +# .gitignore +/vendor-bin/**/vendor/ +``` + +Updating each tool can create many not legible changes in `composer.lock` files. +You can use a `.gitattributes` file in order to inform git that it shouldn't show +diffs of `composer.lock` files. + +```.gitattributes +# .gitattributes +/vendor-bin/**/composer.lock binary +``` + +### GitHub Actions integration + +There is currently no way to leverage `ramsey/composer-install` to install all +namespace bins. However it is unlikely you need this in the CI and not locally, +in which case [forwarding the command](#forward-command-forward-command) should +be good enough. + +If you still need to install specific bin namespaces, you can do it by setting +the `working-directory`: + +```yaml +#... + - name: "Install PHP-CS-Fixer Composer dependencies" + uses: "ramsey/composer-install@v2" + with: + working-directory: "vendor-bin/php-cs-fixer" +``` + + + +## Related plugins + +* [theofidry/composer-inheritance-plugin][theofidry-composer-inheritance-plugin]: Opinionated version + of [Wikimedia composer-merge-plugin][wikimedia-composer-merge-plugin] to work in pair with this plugin. + + +## Backward Compatibility Promise + +The backward compatibility promise only applies to the following API: + +- The commands registered by the plugin +- The behaviour of the commands (but not their logging/output) +- The Composer configuration + +The plugin implementation is considered to be strictly internal and its code may +change at any time in a non back-ward compatible way. + + +## Contributing + +A makefile is available to help out: + +```bash +$ make # Runs all checks +$ make help # List all available commands +``` + +**Note:** you do need to install [phive][phive] first. + + +[composer]: https://getcomposer.org +[composer-script-events]: https://getcomposer.org/doc/articles/scripts.md#command-events +[phive]: https://phar.io/ +[php-scoper]: https://github.com/humbug/php-scoper +[phpstan]: https://phpstan.org/ +[phpunit]: https://github.com/sebastianbergmann/phpunit +[rector]: https://github.com/rectorphp/rector +[symfony-bc-policy]: https://symfony.com/doc/current/contributing/code/bc.html +[theofidry-composer-inheritance-plugin]: https://github.com/theofidry/composer-inheritance-plugin +[wikimedia-composer-merge-plugin]: https://github.com/wikimedia/composer-merge-plugin diff --git a/calendar/vendor/bamarni/composer-bin-plugin/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/composer.json new file mode 100644 index 0000000..5b3809b --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/composer.json @@ -0,0 +1,50 @@ +{ + "name": "bamarni/composer-bin-plugin", + "description": "No conflicts for your bin dependencies", + "license": "MIT", + "type": "composer-plugin", + "keywords": [ + "composer", + "dependency", + "tool", + "isolation", + "conflict", + "executable" + ], + "require": { + "php": "^7.2.5 || ^8.0", + "composer-plugin-api": "^2.0" + }, + "require-dev": { + "ext-json": "*", + "composer/composer": "^2.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + }, + "autoload": { + "psr-4": { + "Bamarni\\Composer\\Bin\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Bamarni\\Composer\\Bin\\Tests\\": "tests" + } + }, + "config": { + "allow-plugins": { + "phpstan/extension-installer": true, + "ergebnis/composer-normalize": true, + "infection/extension-installer": true + }, + "sort-packages": true + }, + "extra": { + "class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/README.md new file mode 100644 index 0000000..6b2a3c9 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/README.md @@ -0,0 +1 @@ +Regular installation on a project with multiple namespaces. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/composer.json new file mode 100644 index 0000000..dff4cca --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/composer.json @@ -0,0 +1,16 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require-dev": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/expected.txt new file mode 100644 index 0000000..a192945 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/expected.txt @@ -0,0 +1,16 @@ +[bamarni-bin] Checking namespace vendor-bin/ns1 +Loading composer repositories with package information +Updating dependencies +Nothing to modify in lock file +Writing lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files +[bamarni-bin] Checking namespace vendor-bin/ns2 +Loading composer repositories with package information +Updating dependencies +Nothing to modify in lock file +Writing lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/script.sh new file mode 100644 index 0000000..75e81f0 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/script.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +composer update + +# Actual command to execute the test itself +composer bin all update 2>&1 | tee > actual.txt diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/vendor-bin/ns1/composer.json @@ -0,0 +1 @@ +{} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/vendor-bin/ns2/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/vendor-bin/ns2/composer.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario0/vendor-bin/ns2/composer.json @@ -0,0 +1 @@ +{} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/README.md new file mode 100644 index 0000000..4552c26 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/README.md @@ -0,0 +1 @@ +Regular installation on a project with multiple namespaces in verbose mode. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/composer.json new file mode 100644 index 0000000..dff4cca --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/composer.json @@ -0,0 +1,16 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require-dev": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/expected.txt new file mode 100644 index 0000000..d0dcc1c --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/expected.txt @@ -0,0 +1,28 @@ +[bamarni-bin] Current working directory: /path/to/project/e2e/scenario1 +[bamarni-bin] Configuring bin directory to /path/to/project/e2e/scenario1/vendor/bin. +[bamarni-bin] Checking namespace vendor-bin/ns1 +[bamarni-bin] Changed current directory to vendor-bin/ns1. +[bamarni-bin] Running `@composer update --verbose --working-dir='.'`. +Loading composer repositories with package information +Updating dependencies +Analyzed 90 packages to resolve dependencies +Analyzed 90 rules to resolve dependencies +Nothing to modify in lock file +Writing lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files +[bamarni-bin] Changed current directory to /path/to/project/e2e/scenario1. +[bamarni-bin] Checking namespace vendor-bin/ns2 +[bamarni-bin] Changed current directory to vendor-bin/ns2. +[bamarni-bin] Running `@composer update --verbose --working-dir='.'`. +Loading composer repositories with package information +Updating dependencies +Analyzed 90 packages to resolve dependencies +Analyzed 90 rules to resolve dependencies +Nothing to modify in lock file +Writing lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files +[bamarni-bin] Changed current directory to /path/to/project/e2e/scenario1. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/script.sh new file mode 100644 index 0000000..4edb432 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/script.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +composer update + +# Actual command to execute the test itself +composer bin all update --verbose 2>&1 | tee > actual.txt diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/vendor-bin/ns1/composer.json @@ -0,0 +1 @@ +{} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/vendor-bin/ns2/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/vendor-bin/ns2/composer.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario1/vendor-bin/ns2/composer.json @@ -0,0 +1 @@ +{} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/README.md new file mode 100644 index 0000000..0ffbf03 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/README.md @@ -0,0 +1 @@ +Check that the composer environment variables are well respected when commands are forwarded to the namespaces. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/composer.json new file mode 100644 index 0000000..3061d0c --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/composer.json @@ -0,0 +1,21 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, + "extra": { + "bamarni-bin": { + "forward-command": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/expected.txt new file mode 100644 index 0000000..033cf0b --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/expected.txt @@ -0,0 +1,2 @@ +./.composer +.composer diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/script.sh new file mode 100644 index 0000000..20bc504 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/script.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf .composer || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true +rm -rf vendor-bin/*/.composer || true + +readonly CUSTOM_COMPOSER_DIR=$(pwd)/.composer +COMPOSER_CACHE_DIR=$CUSTOM_COMPOSER_DIR composer update + +# Actual command to execute the test itself +find . ".composer" -name ".composer" -type d 2>&1 | sort -n | tee > actual.txt || true diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..9871ea3 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario10/vendor-bin/ns1/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "nikic/iter": "v1.6.0" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/README.md new file mode 100644 index 0000000..03ab64e --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/README.md @@ -0,0 +1 @@ +Check that the deprecation messages are well rendered. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/composer.json new file mode 100644 index 0000000..3061d0c --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/composer.json @@ -0,0 +1,21 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, + "extra": { + "bamarni-bin": { + "forward-command": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/expected.txt new file mode 100644 index 0000000..1d2c3f3 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/expected.txt @@ -0,0 +1,19 @@ +Loading composer repositories with package information +Updating dependencies +Lock file operations: 1 install, 0 updates, 0 removals + - Locking bamarni/composer-bin-plugin (dev-hash) +Writing lock file +Installing dependencies from lock file (including require-dev) +Package operations: 1 install, 0 updates, 0 removals + - Installing bamarni/composer-bin-plugin (dev-hash): Symlinking from ../.. +Generating autoload files +[bamarni-bin] The setting "extra.bamarni-bin.bin-links" will be set to "false" from 2.x onwards. If you wish to keep it to "true", you need to set it explicitly. +[bamarni-bin] The command is being forwarded. +[bamarni-bin] Checking namespace vendor-bin/ns1 +Loading composer repositories with package information +Updating dependencies +Nothing to modify in lock file +Writing lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/script.sh new file mode 100644 index 0000000..ef69309 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/script.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf .composer || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true +rm -rf vendor-bin/*/.composer || true + +# Actual command to execute the test itself +composer update 2>&1 | tee > actual.txt diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario11/vendor-bin/ns1/composer.json @@ -0,0 +1 @@ +{} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/README.md new file mode 100644 index 0000000..03ab64e --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/README.md @@ -0,0 +1 @@ +Check that the deprecation messages are well rendered. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/composer.json new file mode 100644 index 0000000..ae4fe64 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/composer.json @@ -0,0 +1,22 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require": { + "bamarni/composer-bin-plugin": "dev-master", + "psr/log": "=3.0.0" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, + "extra": { + "bamarni-bin": { + "forward-command": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/expected.txt new file mode 100644 index 0000000..2965cc8 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/expected.txt @@ -0,0 +1,8 @@ +Get versions installed in root; executed from root. +3.0.0 +Get versions installed in vendor-bin/tool; executed from root. +2.0.0 +Get versions installed in root; executed from vendor-bin/tool. +3.0.0 +Get versions installed in vendor-bin/too; executed from vendor-bin/tool. +2.0.0 diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/root_root.php b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/root_root.php new file mode 100644 index 0000000..d6ba00c --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/root_root.php @@ -0,0 +1,10 @@ +> actual.txt +php root_vendorbin.php | tee >> actual.txt +php vendor-bin/tool/root_root.php | tee >> actual.txt +php vendor-bin/tool/root_vendorbin.php | tee >> actual.txt diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/composer.json new file mode 100644 index 0000000..ff49ff8 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "psr/log": "=2.0.0" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/root_root.php b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/root_root.php new file mode 100644 index 0000000..ac9c40f --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario12/vendor-bin/tool/root_root.php @@ -0,0 +1,10 @@ + echo ns1 +ns1 +[bamarni-bin] Checking namespace vendor-bin/ns2 +> echo ns2 +ns2 diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/script.sh new file mode 100644 index 0000000..f01dc75 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/script.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +composer update + +# Actual command to execute the test itself +composer bin all run-script foo 2>&1 | tee > actual.txt diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..7f276e9 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/vendor-bin/ns1/composer.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "foo": "echo ns1" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/vendor-bin/ns2/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/vendor-bin/ns2/composer.json new file mode 100644 index 0000000..3b8933b --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario2/vendor-bin/ns2/composer.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "foo": "echo ns2" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/README.md new file mode 100644 index 0000000..ad1c3b8 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/README.md @@ -0,0 +1 @@ +Regular installation on a project with forwarded mode enabled. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/composer.json new file mode 100644 index 0000000..a1cc737 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/composer.json @@ -0,0 +1,22 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require-dev": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, + "extra": { + "bamarni-bin": { + "bin-links": false, + "forward-command": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/expected.txt new file mode 100644 index 0000000..133ffe7 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/expected.txt @@ -0,0 +1,59 @@ +Loading composer repositories with package information +Updating dependencies +Analyzed 90 packages to resolve dependencies +Analyzed 90 rules to resolve dependencies +Lock file operations: 1 install, 0 updates, 0 removals +Installs: bamarni/composer-bin-plugin:dev-hash + - Locking bamarni/composer-bin-plugin (dev-hash) +Writing lock file +Installing dependencies from lock file (including require-dev) +Package operations: 1 install, 0 updates, 0 removals +Installs: bamarni/composer-bin-plugin:dev-hash + - Installing bamarni/composer-bin-plugin (dev-hash): Symlinking from ../.. +Generating autoload files +> post-autoload-dump: Bamarni\Composer\Bin\BamarniBinPlugin->onPostAutoloadDump +[bamarni-bin] Calling onPostAutoloadDump(). +[bamarni-bin] The command is being forwarded. +[bamarni-bin] Original input: update --verbose. +[bamarni-bin] Current working directory: /path/to/project/e2e/scenario3 +[bamarni-bin] Checking namespace vendor-bin/ns1 +[bamarni-bin] Changed current directory to vendor-bin/ns1. +[bamarni-bin] Running `@composer update --verbose --working-dir='.'`. +Loading composer repositories with package information +Updating dependencies +Analyzed 90 packages to resolve dependencies +Analyzed 90 rules to resolve dependencies +Nothing to modify in lock file +Writing lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files +[bamarni-bin] Changed current directory to /path/to/project/e2e/scenario3. +––––––––––––––––––––– +[bamarni-bin] Calling onCommandEvent(). +[bamarni-bin] The command is being forwarded. +[bamarni-bin] Original input: update --verbose. +[bamarni-bin] Current working directory: /path/to/project/e2e/scenario3 +[bamarni-bin] Checking namespace vendor-bin/ns1 +[bamarni-bin] Changed current directory to vendor-bin/ns1. +[bamarni-bin] Running `@composer update --verbose --working-dir='.'`. +Loading composer repositories with package information +Updating dependencies +Analyzed 90 packages to resolve dependencies +Analyzed 90 rules to resolve dependencies +Nothing to modify in lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files +[bamarni-bin] Changed current directory to /path/to/project/e2e/scenario3. +Loading composer repositories with package information +Updating dependencies +Analyzed 90 packages to resolve dependencies +Analyzed 90 rules to resolve dependencies +Nothing to modify in lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files +> post-autoload-dump: Bamarni\Composer\Bin\BamarniBinPlugin->onPostAutoloadDump +[bamarni-bin] Calling onPostAutoloadDump(). +[bamarni-bin] Command already forwarded within the process: skipping. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/script.sh new file mode 100644 index 0000000..b66fa41 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/script.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +# Actual command to execute the test itself +composer update --verbose 2>&1 | tee > actual.txt +echo "–––––––––––––––––––––" >> actual.txt +composer update --verbose 2>&1 | tee >> actual.txt diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario3/vendor-bin/ns1/composer.json @@ -0,0 +1 @@ +{} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/README.md new file mode 100644 index 0000000..71f75d8 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/README.md @@ -0,0 +1 @@ +Regular installation on a project with multiple namespaces and with links disabled. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/composer.json new file mode 100644 index 0000000..3d06a59 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/composer.json @@ -0,0 +1,21 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require-dev": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, + "extra": { + "bamarni-bin": { + "bin-links": false + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/expected.txt new file mode 100644 index 0000000..3cdb7f2 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/expected.txt @@ -0,0 +1,5 @@ +find: vendor/bin: No such file or directory +vendor-bin/ns1/vendor/bin/phpstan +vendor-bin/ns1/vendor/bin/phpstan.phar +vendor-bin/ns2/vendor/bin/phpstan +vendor-bin/ns2/vendor/bin/phpstan.phar diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/script.sh new file mode 100644 index 0000000..7ada5a1 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/script.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +composer update +composer bin all update + +# Actual command to execute the test itself +find vendor/bin vendor-bin/*/vendor/bin -maxdepth 1 -type f 2>&1 | sort -n | tee > actual.txt || true diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..ba924f7 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/vendor-bin/ns1/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpstan/phpstan": "1.8.0" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/vendor-bin/ns2/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/vendor-bin/ns2/composer.json new file mode 100644 index 0000000..ba924f7 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario5/vendor-bin/ns2/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpstan/phpstan": "1.8.0" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/README.md new file mode 100644 index 0000000..2174f99 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/README.md @@ -0,0 +1 @@ +Regular installation on a project with multiple namespaces and with links enabled and conflicting symlinks. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/composer.json new file mode 100644 index 0000000..23f275b --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/composer.json @@ -0,0 +1,21 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require-dev": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, + "extra": { + "bamarni-bin": { + "bin-links": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/expected.txt new file mode 100644 index 0000000..25f159f --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/expected.txt @@ -0,0 +1,4 @@ +find: vendor-bin/*/vendor/bin: No such file or directory +vendor/bin/phpstan +vendor/bin/phpstan.phar +PHPStan - PHP Static Analysis Tool 1.8.0 diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/script.sh new file mode 100644 index 0000000..c79a745 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/script.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +composer update +composer bin all update + +# Actual command to execute the test itself +find vendor/bin vendor-bin/*/vendor/bin -maxdepth 1 -type f 2>&1 | sort -n | tee > actual.txt || true +vendor/bin/phpstan --version >> actual.txt diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..ba924f7 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/vendor-bin/ns1/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpstan/phpstan": "1.8.0" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/vendor-bin/ns2/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/vendor-bin/ns2/composer.json new file mode 100644 index 0000000..7826cef --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario6/vendor-bin/ns2/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phpstan/phpstan": "1.6.0" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/README.md new file mode 100644 index 0000000..87140b4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/README.md @@ -0,0 +1 @@ +Tests that dev dependencies are not installed if no-dev is passed. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/composer.json new file mode 100644 index 0000000..bff880f --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/composer.json @@ -0,0 +1,16 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/expected.txt new file mode 100644 index 0000000..c00cece --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/expected.txt @@ -0,0 +1,10 @@ +[bamarni-bin] Current working directory: /path/to/project/e2e/scenario7 +[bamarni-bin] Configuring bin directory to /path/to/project/e2e/scenario7/vendor/bin. +[bamarni-bin] Checking namespace vendor-bin/ns1 +[bamarni-bin] Changed current directory to vendor-bin/ns1. +[bamarni-bin] Running `@composer update --no-dev --verbose --working-dir='.' -- foo`. +Cannot update only a partial set of packages without a lock file present. Run `composer update` to generate a lock file. +[bamarni-bin] Changed current directory to /path/to/project/e2e/scenario7. +––––––––––––––––––––– +[bamarni-bin] Checking namespace vendor-bin/ns1 +No dependencies installed. Try running composer install or update. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/script.sh new file mode 100644 index 0000000..3267002 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/script.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +composer update + +# Actual command to execute the test itself +composer bin ns1 update --no-dev --verbose -- foo 2>&1 | tee > actual.txt || true +echo "–––––––––––––––––––––" >> actual.txt +composer bin ns1 show --direct --name-only 2>&1 | tee >> actual.txt || true diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..7b72340 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario7/vendor-bin/ns1/composer.json @@ -0,0 +1,8 @@ +{ + "require": { + "nikic/iter": "v1.6.0" + }, + "require-dev": { + "phpstan/phpstan": "1.8.0" + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/README.md new file mode 100644 index 0000000..9af1b6d --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/README.md @@ -0,0 +1 @@ +Tests that extra arguments and options are not lost when forwarding the command to a bin namespace. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/composer.json new file mode 100644 index 0000000..7681c07 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/composer.json @@ -0,0 +1,22 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, + "extra": { + "bamarni-bin": { + "bin-links": false, + "forward-command": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/expected.txt new file mode 100644 index 0000000..625e41f --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/expected.txt @@ -0,0 +1,31 @@ +Loading composer repositories with package information +Updating dependencies +Analyzed 90 packages to resolve dependencies +Analyzed 90 rules to resolve dependencies +Lock file operations: 1 install, 0 updates, 0 removals +Installs: bamarni/composer-bin-plugin:dev-hash + - Locking bamarni/composer-bin-plugin (dev-hash) +Writing lock file +Installing dependencies from lock file (including require-dev) +Package operations: 1 install, 0 updates, 0 removals +Installs: bamarni/composer-bin-plugin:dev-hash + - Installing bamarni/composer-bin-plugin (dev-hash): Symlinking from ../.. +Generating autoload files +> post-autoload-dump: Bamarni\Composer\Bin\BamarniBinPlugin->onPostAutoloadDump +[bamarni-bin] Calling onPostAutoloadDump(). +[bamarni-bin] The command is being forwarded. +[bamarni-bin] Original input: update --prefer-lowest --verbose. +[bamarni-bin] Current working directory: /path/to/project/e2e/scenario8 +[bamarni-bin] Checking namespace vendor-bin/ns1 +[bamarni-bin] Changed current directory to vendor-bin/ns1. +[bamarni-bin] Running `@composer update --prefer-lowest --verbose --working-dir='.'`. +Loading composer repositories with package information +Updating dependencies +Analyzed 90 packages to resolve dependencies +Analyzed 90 rules to resolve dependencies +Nothing to modify in lock file +Writing lock file +Installing dependencies from lock file (including require-dev) +Nothing to install, update or remove +Generating autoload files +[bamarni-bin] Changed current directory to /path/to/project/e2e/scenario8. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/script.sh new file mode 100644 index 0000000..1e4d0e1 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/script.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +# Actual command to execute the test itself +composer update --prefer-lowest --verbose 2>&1 | tee >> actual.txt || true diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/vendor-bin/ns1/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/vendor-bin/ns1/composer.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario8/vendor-bin/ns1/composer.json @@ -0,0 +1 @@ +{} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/README.md b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/README.md new file mode 100644 index 0000000..80f120b --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/README.md @@ -0,0 +1 @@ +Tests that plugins installed in a namespace are loaded when a command is executed in the namespace. diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/composer.json new file mode 100644 index 0000000..3061d0c --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/composer.json @@ -0,0 +1,21 @@ +{ + "repositories": [ + { + "type": "path", + "url": "../../" + } + ], + "require": { + "bamarni/composer-bin-plugin": "dev-master" + }, + "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + }, + "extra": { + "bamarni-bin": { + "forward-command": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/expected.txt b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/expected.txt new file mode 100644 index 0000000..0515c41 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/expected.txt @@ -0,0 +1,9 @@ +[bamarni-bin] Checking namespace vendor-bin/composer-unused + +Loading packages +---------------- + + ! [NOTE] Found 0 package(s) to be checked. + + [OK] Done. No required packages to scan. + diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/script.sh b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/script.sh new file mode 100644 index 0000000..a56dfb9 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/script.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +# Set env variables in order to experience a behaviour closer to what happens +# in the CI locally. It should not hurt to set those in the CI as the CI should +# contain those values. +export CI=1 +export COMPOSER_NO_INTERACTION=1 + +readonly ORIGINAL_WORKING_DIR=$(pwd) + +trap "cd ${ORIGINAL_WORKING_DIR}" err exit + +# Change to script directory +cd "$(dirname "$0")" + +# Ensure we have a clean state +rm -rf actual.txt || true +rm -rf composer.lock || true +rm -rf vendor || true +rm -rf vendor-bin/*/composer.lock || true +rm -rf vendor-bin/*/vendor || true + +composer update + +# Actual command to execute the test itself +composer bin composer-unused unused --no-progress 2>&1 | tee > actual.txt || true diff --git a/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/vendor-bin/composer-unused/composer.json b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/vendor-bin/composer-unused/composer.json new file mode 100644 index 0000000..3c5a312 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/e2e/scenario9/vendor-bin/composer-unused/composer.json @@ -0,0 +1,11 @@ +{ + "require": { + "composer-runtime-api": "^2.2", + "icanhazstring/composer-unused": "~0.7.12" + }, + "config": { + "allow-plugins": { + "icanhazstring/composer-unused": true + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/infection.json b/calendar/vendor/bamarni/composer-bin-plugin/infection.json new file mode 100644 index 0000000..4db6121 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/infection.json @@ -0,0 +1,14 @@ +{ + "$schema": "vendor/infection/infection/resources/schema.json", + "source": { + "directories": [ + "src" + ] + }, + "logs": { + "text": "dist/infection.txt" + }, + "mutators": { + "@default": true + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/src/ApplicationFactory/FreshInstanceApplicationFactory.php b/calendar/vendor/bamarni/composer-bin-plugin/src/ApplicationFactory/FreshInstanceApplicationFactory.php new file mode 100644 index 0000000..a4dcd58 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/src/ApplicationFactory/FreshInstanceApplicationFactory.php @@ -0,0 +1,15 @@ +composer = $composer; + $this->io = $io; + $this->logger = new Logger($io); + } + + public function getCapabilities(): array + { + return [ + ComposerPluginCommandProvider::class => BamarniCommandProvider::class, + ]; + } + + public function deactivate(Composer $composer, IOInterface $io): void + { + } + + public function uninstall(Composer $composer, IOInterface $io): void + { + } + + public static function getSubscribedEvents(): array + { + return [ + PluginEvents::COMMAND => 'onCommandEvent', + ScriptEvents::POST_AUTOLOAD_DUMP => 'onPostAutoloadDump', + ]; + } + + public function onPostAutoloadDump(Event $event): void + { + $this->logger->logDebug('Calling onPostAutoloadDump().'); + + $eventIO = $event->getIO(); + + if (!($eventIO instanceof ConsoleIO)) { + return; + } + + // This is a bit convoluted but Event does not expose the input unlike + // CommandEvent. + $publicIO = PublicIO::fromConsoleIO($eventIO); + $eventInput = $publicIO->getInput(); + + $this->onEvent( + $eventInput->getArgument('command'), + $eventInput, + $publicIO->getOutput() + ); + } + + public function onCommandEvent(CommandEvent $event): bool + { + $this->logger->logDebug('Calling onCommandEvent().'); + + return $this->onEvent( + $event->getCommandName(), + $event->getInput(), + $event->getOutput() + ); + } + + private function onEvent( + string $commandName, + InputInterface $input, + OutputInterface $output + ): bool { + $config = Config::fromComposer($this->composer); + + $deprecations = $config->getDeprecations(); + + if (count($deprecations) > 0) { + foreach ($deprecations as $deprecation) { + $this->logger->logStandard($deprecation); + } + } + + if ($config->isCommandForwarded() + && in_array($commandName, self::FORWARDED_COMMANDS, true) + ) { + return $this->onForwardedCommand($input, $output); + } + + return true; + } + + protected function onForwardedCommand( + InputInterface $input, + OutputInterface $output + ): bool { + if ($this->forwarded) { + $this->logger->logDebug('Command already forwarded within the process: skipping.'); + + return true; + } + + $this->forwarded = true; + + $this->logger->logStandard('The command is being forwarded.'); + $this->logger->logDebug( + sprintf( + 'Original input: %s.', + $input->__toString() + ) + ); + + // Note that the input & output of $io should be the same as the event + // input & output. + $io = $this->io; + + $application = new Application(); + + $command = new BinCommand(); + $command->setComposer($this->composer); + $command->setApplication($application); + $command->setIO($io); + + $forwardedCommandInput = BinInputFactory::createForwardedCommandInput($input); + + try { + return Command::SUCCESS === $command->run( + $forwardedCommandInput, + $output + ); + } catch (Throwable $throwable) { + return false; + } + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/src/Command/BinCommand.php b/calendar/vendor/bamarni/composer-bin-plugin/src/Command/BinCommand.php new file mode 100644 index 0000000..9edb4c3 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/src/Command/BinCommand.php @@ -0,0 +1,330 @@ +applicationFactory = $applicationFactory ?? new FreshInstanceApplicationFactory(); + $this->logger = $logger ?? new Logger(new NullIO()); + } + + protected function configure(): void + { + $this + ->setDescription('Run a command inside a bin namespace') + ->addArgument( + self::NAMESPACE_ARG, + InputArgument::REQUIRED + ) + ->ignoreValidationErrors(); + } + + public function setIO(IOInterface $io): void + { + parent::setIO($io); + + $this->logger = new Logger($io); + } + + public function getIO(): IOInterface + { + $io = parent::getIO(); + + $this->logger = new Logger($io); + + return $io; + } + + public function isProxyCommand(): bool + { + return true; + } + + public function execute(InputInterface $input, OutputInterface $output): int + { + // Switch to requireComposer() once Composer 2.3 is set as the minimum + $composer = method_exists($this, 'requireComposer') + ? $this->requireComposer() + : $this->getComposer(); + + $config = Config::fromComposer($composer); + $currentWorkingDir = getcwd(); + + $this->logger->logDebug( + sprintf( + 'Current working directory: %s', + $currentWorkingDir + ) + ); + + // Ensures Composer is reset – we are setting some environment variables + // & co. so a fresh Composer instance is required. + $this->resetComposers(); + + $this->configureBinLinksDir($config); + + $vendorRoot = $config->getTargetDirectory(); + $namespace = $input->getArgument(self::NAMESPACE_ARG); + + $binInput = BinInputFactory::createInput( + $namespace, + $input + ); + + return (self::ALL_NAMESPACES !== $namespace) + ? $this->executeInNamespace( + $currentWorkingDir, + $vendorRoot.'/'.$namespace, + $binInput, + $output + ) + : $this->executeAllNamespaces( + $currentWorkingDir, + $vendorRoot, + $binInput, + $output + ); + } + + /** + * @return list + */ + private static function getBinNamespaces(string $binVendorRoot): array + { + return glob($binVendorRoot.'/*', GLOB_ONLYDIR); + } + + private function executeAllNamespaces( + string $originalWorkingDir, + string $binVendorRoot, + InputInterface $input, + OutputInterface $output + ): int { + $namespaces = self::getBinNamespaces($binVendorRoot); + + if (count($namespaces) === 0) { + $this->logger->logStandard('Could not find any bin namespace.'); + + // Is a valid scenario: the user may not have set up any bin + // namespace yet + return 0; + } + + $exitCode = 0; + + foreach ($namespaces as $namespace) { + $exitCode += $this->executeInNamespace( + $originalWorkingDir, + $namespace, + $input, + $output + ); + } + + return min($exitCode, 255); + } + + private function executeInNamespace( + string $originalWorkingDir, + string $namespace, + InputInterface $input, + OutputInterface $output + ): int { + $this->logger->logStandard( + sprintf( + 'Checking namespace %s', + $namespace + ) + ); + + try { + self::createNamespaceDirIfDoesNotExist($namespace); + } catch (CouldNotCreateNamespaceDir $exception) { + $this->logger->logStandard( + sprintf( + '%s', + $exception->getMessage() + ) + ); + + return 1; + } + + // Use a new application: this avoids a variety of issues: + // - A command may be added in a namespace which may cause side effects + // when executed in another namespace afterwards (since it is the same + // process). + // - Different plugins may be registered in the namespace in which case + // an already executed application will not pick that up. + $namespaceApplication = $this->applicationFactory->create( + $this->getApplication() + ); + + // It is important to clean up the state either for follow-up plugins + // or for example the execution in the next namespace. + $cleanUp = function () use ($originalWorkingDir): void { + $this->chdir($originalWorkingDir); + $this->resetComposers(); + }; + + $this->chdir($namespace); + + $this->ensureComposerFileExists(); + + $namespaceInput = BinInputFactory::createNamespaceInput($input); + + $this->logger->logDebug( + sprintf( + 'Running `@composer %s`.', + $namespaceInput->__toString() + ) + ); + + try { + $exitCode = $namespaceApplication->doRun($namespaceInput, $output); + } catch (Throwable $executionFailed) { + // Ensure we do the cleanup even in case of failure + $cleanUp(); + + throw $executionFailed; + } + + $cleanUp(); + + return $exitCode; + } + + /** + * @throws CouldNotCreateNamespaceDir + */ + private static function createNamespaceDirIfDoesNotExist(string $namespace): void + { + if (file_exists($namespace)) { + return; + } + + $mkdirResult = mkdir($namespace, 0777, true); + + if (!$mkdirResult && !is_dir($namespace)) { + throw CouldNotCreateNamespaceDir::forNamespace($namespace); + } + } + + private function configureBinLinksDir(Config $config): void + { + if (!$config->binLinksAreEnabled()) { + return; + } + + $binDir = ConfigFactory::createConfig()->get('bin-dir'); + + putenv( + sprintf( + 'COMPOSER_BIN_DIR=%s', + $binDir + ) + ); + + $this->logger->logDebug( + sprintf( + 'Configuring bin directory to %s.', + $binDir + ) + ); + } + + private function ensureComposerFileExists(): void + { + // Some plugins require access to the Composer file e.g. Symfony Flex + $namespaceComposerFile = Factory::getComposerFile(); + + if (file_exists($namespaceComposerFile)) { + return; + } + + file_put_contents($namespaceComposerFile, '{}'); + + $this->logger->logDebug( + sprintf( + 'Created the file %s.', + $namespaceComposerFile + ) + ); + } + + private function resetComposers(): void + { + $this->getApplication()->resetComposer(); + + foreach ($this->getApplication()->all() as $command) { + if ($command instanceof BaseCommand) { + $command->resetComposer(); + } + } + } + + private function chdir(string $dir): void + { + chdir($dir); + + $this->logger->logDebug( + sprintf( + 'Changed current directory to %s.', + $dir + ) + ); + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php b/calendar/vendor/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php new file mode 100644 index 0000000..3314507 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php @@ -0,0 +1,21 @@ + true, + self::TARGET_DIRECTORY => 'vendor-bin', + self::FORWARD_COMMAND => false, + ]; + + /** + * @var bool + */ + private $binLinks; + + /** + * @var string + */ + private $targetDirectory; + + /** + * @var bool + */ + private $forwardCommand; + + /** + * @var list + */ + private $deprecations = []; + + /** + * @throws InvalidBamarniComposerExtraConfig + */ + public static function fromComposer(Composer $composer): self + { + return new self($composer->getPackage()->getExtra()); + } + + /** + * @param mixed[] $extra + * + * @throws InvalidBamarniComposerExtraConfig + */ + public function __construct(array $extra) + { + $userExtra = $extra[self::EXTRA_CONFIG_KEY] ?? []; + + $config = array_merge(self::DEFAULT_CONFIG, $userExtra); + + $getType = function_exists('get_debug_type') ? 'get_debug_type' : 'gettype'; + + $binLinks = $config[self::BIN_LINKS_ENABLED]; + + if (!is_bool($binLinks)) { + throw new InvalidBamarniComposerExtraConfig( + sprintf( + 'Expected setting "extra.%s.%s" to be a boolean value. Got "%s".', + self::EXTRA_CONFIG_KEY, + self::BIN_LINKS_ENABLED, + $getType($binLinks) + ) + ); + } + + $binLinksSetExplicitly = array_key_exists(self::BIN_LINKS_ENABLED, $userExtra); + + if ($binLinks && !$binLinksSetExplicitly) { + $this->deprecations[] = sprintf( + 'The setting "extra.%s.%s" will be set to "false" from 2.x onwards. If you wish to keep it to "true", you need to set it explicitly.', + self::EXTRA_CONFIG_KEY, + self::BIN_LINKS_ENABLED + ); + } + + $targetDirectory = $config[self::TARGET_DIRECTORY]; + + if (!is_string($targetDirectory)) { + throw new InvalidBamarniComposerExtraConfig( + sprintf( + 'Expected setting "extra.%s.%s" to be a string. Got "%s".', + self::EXTRA_CONFIG_KEY, + self::TARGET_DIRECTORY, + $getType($targetDirectory) + ) + ); + } + + $forwardCommand = $config[self::FORWARD_COMMAND]; + + if (!is_bool($forwardCommand)) { + throw new InvalidBamarniComposerExtraConfig( + sprintf( + 'Expected setting "extra.%s.%s" to be a boolean value. Got "%s".', + self::EXTRA_CONFIG_KEY, + self::FORWARD_COMMAND, + gettype($forwardCommand) + ) + ); + } + + $forwardCommandSetExplicitly = array_key_exists(self::FORWARD_COMMAND, $userExtra); + + if (!$forwardCommand && !$forwardCommandSetExplicitly) { + $this->deprecations[] = sprintf( + 'The setting "extra.%s.%s" will be set to "true" from 2.x onwards. If you wish to keep it to "false", you need to set it explicitly.', + self::EXTRA_CONFIG_KEY, + self::FORWARD_COMMAND + ); + } + + $this->binLinks = $binLinks; + $this->targetDirectory = $targetDirectory; + $this->forwardCommand = $forwardCommand; + } + + public function binLinksAreEnabled(): bool + { + return $this->binLinks; + } + + public function getTargetDirectory(): string + { + return $this->targetDirectory; + } + + public function isCommandForwarded(): bool + { + return $this->forwardCommand; + } + + /** + * @return list + */ + public function getDeprecations(): array + { + return $this->deprecations; + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/src/Config/ConfigFactory.php b/calendar/vendor/bamarni/composer-bin-plugin/src/Config/ConfigFactory.php new file mode 100644 index 0000000..b2fc1d4 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/src/Config/ConfigFactory.php @@ -0,0 +1,39 @@ +exists()) { + return $config; + } + + $file->validateSchema(JsonFile::LAX_SCHEMA); + + $config->merge($file->read()); + + return $config; + } + + private function __construct() + { + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/src/Config/InvalidBamarniComposerExtraConfig.php b/calendar/vendor/bamarni/composer-bin-plugin/src/Config/InvalidBamarniComposerExtraConfig.php new file mode 100644 index 0000000..105f9ea --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/src/Config/InvalidBamarniComposerExtraConfig.php @@ -0,0 +1,11 @@ + `update --prefer-lowest` + * + * Note that no input definition is bound in the resulting input. + */ + public static function createInput( + string $namespace, + InputInterface $previousInput + ): InputInterface { + $matchResult = preg_match( + sprintf( + '/^(?.+)?bin (?:(?.+?) )?(?:%1$s|\'%1$s\') (?.+?)(? -- .*)?$/', + preg_quote($namespace, '/') + ), + $previousInput->__toString(), + $matches + ); + + if (1 !== $matchResult) { + throw InvalidBinInput::forBinInput($previousInput); + } + + $inputParts = array_filter( + array_map( + 'trim', + [ + $matches['binCommand'], + $matches['preBinOptions2'] ?? '', + $matches['preBinOptions'] ?? '', + $matches['extraInput'] ?? '', + ] + ) + ); + + // Move the options present _before_ bin namespaceName to after, but + // before the end of option marker (--) if present. + $reorderedInput = implode(' ', $inputParts); + + return new StringInput($reorderedInput); + } + + public static function createNamespaceInput(InputInterface $previousInput): InputInterface + { + $matchResult = preg_match( + '/^(.+?\s?)(--(?: .+)?)?$/', + $previousInput->__toString(), + $matches + ); + + if (1 !== $matchResult) { + throw InvalidBinInput::forNamespaceInput($previousInput); + } + + $inputParts = array_filter( + array_map( + 'trim', + [ + $matches[1], + '--working-dir=.', + $matches[2] ?? '', + ] + ) + ); + + $newInput = implode(' ', $inputParts); + + return new StringInput($newInput); + } + + public static function createForwardedCommandInput(InputInterface $input): InputInterface + { + return new StringInput( + sprintf( + 'bin all %s', + $input->__toString() + ) + ); + } + + private function __construct() + { + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php b/calendar/vendor/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php new file mode 100644 index 0000000..2418d9c --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php @@ -0,0 +1,32 @@ + ", for example "bin all update --prefer-lowest".', + $input->__toString() + ) + ); + } + + public static function forNamespaceInput(InputInterface $input): self + { + return new self( + sprintf( + 'Could not parse the input (executed within the namespace) "%s".', + $input->__toString() + ) + ); + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/src/Logger.php b/calendar/vendor/bamarni/composer-bin-plugin/src/Logger.php new file mode 100644 index 0000000..1905719 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/src/Logger.php @@ -0,0 +1,39 @@ +io = $io; + } + + public function logStandard(string $message): void + { + $this->log($message, false); + } + + public function logDebug(string $message): void + { + $this->log($message, true); + } + + private function log(string $message, bool $debug): void + { + $verbosity = $debug + ? IOInterface::VERBOSE + : IOInterface::NORMAL; + + $this->io->writeError('[bamarni-bin] '.$message, true, $verbosity); + } +} diff --git a/calendar/vendor/bamarni/composer-bin-plugin/src/PublicIO.php b/calendar/vendor/bamarni/composer-bin-plugin/src/PublicIO.php new file mode 100644 index 0000000..6c90d84 --- /dev/null +++ b/calendar/vendor/bamarni/composer-bin-plugin/src/PublicIO.php @@ -0,0 +1,31 @@ +input, + $io->output, + $io->helperSet + ); + } + + public function getInput(): InputInterface + { + return $this->input; + } + + public function getOutput(): OutputInterface + { + return $this->output; + } +} diff --git a/calendar/vendor/bin/php-cs-fixer b/calendar/vendor/bin/php-cs-fixer new file mode 100644 index 0000000..9d22adb --- /dev/null +++ b/calendar/vendor/bin/php-cs-fixer @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/cs-fixer/vendor/php-cs-fixer/shim/php-cs-fixer'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/cs-fixer/vendor/php-cs-fixer/shim/php-cs-fixer'; diff --git a/calendar/vendor/bin/php-cs-fixer.bat b/calendar/vendor/bin/php-cs-fixer.bat new file mode 100644 index 0000000..83db5d5 --- /dev/null +++ b/calendar/vendor/bin/php-cs-fixer.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/php-cs-fixer +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/bin/php-cs-fixer.phar b/calendar/vendor/bin/php-cs-fixer.phar new file mode 100644 index 0000000..e9cbb26 --- /dev/null +++ b/calendar/vendor/bin/php-cs-fixer.phar @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/cs-fixer/vendor/php-cs-fixer/shim/php-cs-fixer.phar'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/cs-fixer/vendor/php-cs-fixer/shim/php-cs-fixer.phar'; diff --git a/calendar/vendor/bin/php-cs-fixer.phar.bat b/calendar/vendor/bin/php-cs-fixer.phar.bat new file mode 100644 index 0000000..21e2eb2 --- /dev/null +++ b/calendar/vendor/bin/php-cs-fixer.phar.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/php-cs-fixer.phar +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/bin/php-parse b/calendar/vendor/bin/php-parse new file mode 100644 index 0000000..0923ae5 --- /dev/null +++ b/calendar/vendor/bin/php-parse @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/phpunit/vendor/nikic/php-parser/bin/php-parse'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/phpunit/vendor/nikic/php-parser/bin/php-parse'; diff --git a/calendar/vendor/bin/php-parse.bat b/calendar/vendor/bin/php-parse.bat new file mode 100644 index 0000000..2c5096d --- /dev/null +++ b/calendar/vendor/bin/php-parse.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/php-parse +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/bin/phpunit b/calendar/vendor/bin/phpunit new file mode 100644 index 0000000..26bf491 --- /dev/null +++ b/calendar/vendor/bin/phpunit @@ -0,0 +1,122 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = 'phpvfscomposer://'.$this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data); + $data = str_replace('__FILE__', var_export($this->realpath, true), $data); + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit'; diff --git a/calendar/vendor/bin/phpunit.bat b/calendar/vendor/bin/phpunit.bat new file mode 100644 index 0000000..2a070cd --- /dev/null +++ b/calendar/vendor/bin/phpunit.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/phpunit +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/bin/psalm b/calendar/vendor/bin/psalm new file mode 100644 index 0000000..9d1f562 --- /dev/null +++ b/calendar/vendor/bin/psalm @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalm'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalm'; diff --git a/calendar/vendor/bin/psalm-language-server b/calendar/vendor/bin/psalm-language-server new file mode 100644 index 0000000..0c881ce --- /dev/null +++ b/calendar/vendor/bin/psalm-language-server @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalm-language-server'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalm-language-server'; diff --git a/calendar/vendor/bin/psalm-language-server.bat b/calendar/vendor/bin/psalm-language-server.bat new file mode 100644 index 0000000..75da909 --- /dev/null +++ b/calendar/vendor/bin/psalm-language-server.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/psalm-language-server +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/bin/psalm-plugin b/calendar/vendor/bin/psalm-plugin new file mode 100644 index 0000000..dcfb807 --- /dev/null +++ b/calendar/vendor/bin/psalm-plugin @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalm-plugin'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalm-plugin'; diff --git a/calendar/vendor/bin/psalm-plugin.bat b/calendar/vendor/bin/psalm-plugin.bat new file mode 100644 index 0000000..16b2724 --- /dev/null +++ b/calendar/vendor/bin/psalm-plugin.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/psalm-plugin +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/bin/psalm-refactor b/calendar/vendor/bin/psalm-refactor new file mode 100644 index 0000000..a3d6079 --- /dev/null +++ b/calendar/vendor/bin/psalm-refactor @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalm-refactor'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalm-refactor'; diff --git a/calendar/vendor/bin/psalm-refactor.bat b/calendar/vendor/bin/psalm-refactor.bat new file mode 100644 index 0000000..12a08b7 --- /dev/null +++ b/calendar/vendor/bin/psalm-refactor.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/psalm-refactor +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/bin/psalm.bat b/calendar/vendor/bin/psalm.bat new file mode 100644 index 0000000..2cdc374 --- /dev/null +++ b/calendar/vendor/bin/psalm.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/psalm +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/bin/psalter b/calendar/vendor/bin/psalter new file mode 100644 index 0000000..7763237 --- /dev/null +++ b/calendar/vendor/bin/psalter @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalter'); + } +} + +return include __DIR__ . '/../..'.'/vendor-bin/psalm/vendor/vimeo/psalm/psalter'; diff --git a/calendar/vendor/bin/psalter.bat b/calendar/vendor/bin/psalter.bat new file mode 100644 index 0000000..1f5ef36 --- /dev/null +++ b/calendar/vendor/bin/psalter.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/psalter +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/calendar/vendor/composer/ClassLoader.php b/calendar/vendor/composer/ClassLoader.php new file mode 100644 index 0000000..7824d8f --- /dev/null +++ b/calendar/vendor/composer/ClassLoader.php @@ -0,0 +1,579 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ + private $vendorDir; + + // PSR-4 + /** + * @var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var list + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> + */ + private $prefixesPsr0 = array(); + /** + * @var list + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var array + */ + private $missingClasses = array(); + + /** @var string|null */ + private $apcuPrefix; + + /** + * @var array + */ + private static $registeredLoaders = array(); + + /** + * @param string|null $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return array> + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return list + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return list + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return array Array of classname => path + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + $includeFile = self::$includeFile; + $includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders keyed by their corresponding vendor directories. + * + * @return array + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } + + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } +} diff --git a/calendar/vendor/composer/InstalledVersions.php b/calendar/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..51e734a --- /dev/null +++ b/calendar/vendor/composer/InstalledVersions.php @@ -0,0 +1,359 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints((string) $constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; + } else { + self::$installed = array(); + } + } + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } + + return $installed; + } +} diff --git a/calendar/vendor/composer/LICENSE b/calendar/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/calendar/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/calendar/vendor/composer/autoload_classmap.php b/calendar/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..3647c1b --- /dev/null +++ b/calendar/vendor/composer/autoload_classmap.php @@ -0,0 +1,67 @@ + $vendorDir . '/bamarni/composer-bin-plugin/src/ApplicationFactory/FreshInstanceApplicationFactory.php', + 'Bamarni\\Composer\\Bin\\ApplicationFactory\\NamespaceApplicationFactory' => $vendorDir . '/bamarni/composer-bin-plugin/src/ApplicationFactory/NamespaceApplicationFactory.php', + 'Bamarni\\Composer\\Bin\\BamarniBinPlugin' => $vendorDir . '/bamarni/composer-bin-plugin/src/BamarniBinPlugin.php', + 'Bamarni\\Composer\\Bin\\CommandProvider' => $vendorDir . '/bamarni/composer-bin-plugin/src/CommandProvider.php', + 'Bamarni\\Composer\\Bin\\Command\\BinCommand' => $vendorDir . '/bamarni/composer-bin-plugin/src/Command/BinCommand.php', + 'Bamarni\\Composer\\Bin\\Command\\CouldNotCreateNamespaceDir' => $vendorDir . '/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php', + 'Bamarni\\Composer\\Bin\\Config\\Config' => $vendorDir . '/bamarni/composer-bin-plugin/src/Config/Config.php', + 'Bamarni\\Composer\\Bin\\Config\\ConfigFactory' => $vendorDir . '/bamarni/composer-bin-plugin/src/Config/ConfigFactory.php', + 'Bamarni\\Composer\\Bin\\Config\\InvalidBamarniComposerExtraConfig' => $vendorDir . '/bamarni/composer-bin-plugin/src/Config/InvalidBamarniComposerExtraConfig.php', + 'Bamarni\\Composer\\Bin\\Input\\BinInputFactory' => $vendorDir . '/bamarni/composer-bin-plugin/src/Input/BinInputFactory.php', + 'Bamarni\\Composer\\Bin\\Input\\InvalidBinInput' => $vendorDir . '/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php', + 'Bamarni\\Composer\\Bin\\Logger' => $vendorDir . '/bamarni/composer-bin-plugin/src/Logger.php', + 'Bamarni\\Composer\\Bin\\PublicIO' => $vendorDir . '/bamarni/composer-bin-plugin/src/PublicIO.php', + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'OCA\\Calendar\\AppInfo\\Application' => $baseDir . '/lib/AppInfo/Application.php', + 'OCA\\Calendar\\BackgroundJob\\CleanUpOutdatedBookingsJob' => $baseDir . '/lib/BackgroundJob/CleanUpOutdatedBookingsJob.php', + 'OCA\\Calendar\\Controller\\AppointmentConfigController' => $baseDir . '/lib/Controller/AppointmentConfigController.php', + 'OCA\\Calendar\\Controller\\AppointmentController' => $baseDir . '/lib/Controller/AppointmentController.php', + 'OCA\\Calendar\\Controller\\BookingController' => $baseDir . '/lib/Controller/BookingController.php', + 'OCA\\Calendar\\Controller\\ContactController' => $baseDir . '/lib/Controller/ContactController.php', + 'OCA\\Calendar\\Controller\\EmailController' => $baseDir . '/lib/Controller/EmailController.php', + 'OCA\\Calendar\\Controller\\PublicViewController' => $baseDir . '/lib/Controller/PublicViewController.php', + 'OCA\\Calendar\\Controller\\SettingsController' => $baseDir . '/lib/Controller/SettingsController.php', + 'OCA\\Calendar\\Controller\\ViewController' => $baseDir . '/lib/Controller/ViewController.php', + 'OCA\\Calendar\\Dashboard\\CalendarWidget' => $baseDir . '/lib/Dashboard/CalendarWidget.php', + 'OCA\\Calendar\\Dashboard\\CalendarWidgetV2' => $baseDir . '/lib/Dashboard/CalendarWidgetV2.php', + 'OCA\\Calendar\\Db\\AppointmentConfig' => $baseDir . '/lib/Db/AppointmentConfig.php', + 'OCA\\Calendar\\Db\\AppointmentConfigMapper' => $baseDir . '/lib/Db/AppointmentConfigMapper.php', + 'OCA\\Calendar\\Db\\Booking' => $baseDir . '/lib/Db/Booking.php', + 'OCA\\Calendar\\Db\\BookingMapper' => $baseDir . '/lib/Db/BookingMapper.php', + 'OCA\\Calendar\\Events\\BeforeAppointmentBookedEvent' => $baseDir . '/lib/Events/BeforeAppointmentBookedEvent.php', + 'OCA\\Calendar\\Exception\\ClientException' => $baseDir . '/lib/Exception/ClientException.php', + 'OCA\\Calendar\\Exception\\NoSlotFoundException' => $baseDir . '/lib/Exception/NoSlotFoundException.php', + 'OCA\\Calendar\\Exception\\ServiceException' => $baseDir . '/lib/Exception/ServiceException.php', + 'OCA\\Calendar\\Http\\JsonResponse' => $baseDir . '/lib/Http/JsonResponse.php', + 'OCA\\Calendar\\Listener\\AppointmentBookedListener' => $baseDir . '/lib/Listener/AppointmentBookedListener.php', + 'OCA\\Calendar\\Listener\\CalendarReferenceListener' => $baseDir . '/lib/Listener/CalendarReferenceListener.php', + 'OCA\\Calendar\\Listener\\UserDeletedListener' => $baseDir . '/lib/Listener/UserDeletedListener.php', + 'OCA\\Calendar\\Migration\\Version2040Date20210908101001' => $baseDir . '/lib/Migration/Version2040Date20210908101001.php', + 'OCA\\Calendar\\Migration\\Version3000Date20211109132439' => $baseDir . '/lib/Migration/Version3000Date20211109132439.php', + 'OCA\\Calendar\\Migration\\Version3010Date20220111090252' => $baseDir . '/lib/Migration/Version3010Date20220111090252.php', + 'OCA\\Calendar\\Migration\\Version4050Date20230614163505' => $baseDir . '/lib/Migration/Version4050Date20230614163505.php', + 'OCA\\Calendar\\Notification\\Notifier' => $baseDir . '/lib/Notification/Notifier.php', + 'OCA\\Calendar\\Profile\\AppointmentsAction' => $baseDir . '/lib/Profile/AppointmentsAction.php', + 'OCA\\Calendar\\Reference\\ReferenceProvider' => $baseDir . '/lib/Reference/ReferenceProvider.php', + 'OCA\\Calendar\\Service\\Appointments\\AppointmentConfigService' => $baseDir . '/lib/Service/Appointments/AppointmentConfigService.php', + 'OCA\\Calendar\\Service\\Appointments\\AvailabilityGenerator' => $baseDir . '/lib/Service/Appointments/AvailabilityGenerator.php', + 'OCA\\Calendar\\Service\\Appointments\\BookingCalendarWriter' => $baseDir . '/lib/Service/Appointments/BookingCalendarWriter.php', + 'OCA\\Calendar\\Service\\Appointments\\BookingService' => $baseDir . '/lib/Service/Appointments/BookingService.php', + 'OCA\\Calendar\\Service\\Appointments\\DailyLimitFilter' => $baseDir . '/lib/Service/Appointments/DailyLimitFilter.php', + 'OCA\\Calendar\\Service\\Appointments\\EventConflictFilter' => $baseDir . '/lib/Service/Appointments/EventConflictFilter.php', + 'OCA\\Calendar\\Service\\Appointments\\Interval' => $baseDir . '/lib/Service/Appointments/Interval.php', + 'OCA\\Calendar\\Service\\Appointments\\MailService' => $baseDir . '/lib/Service/Appointments/MailService.php', + 'OCA\\Calendar\\Service\\Appointments\\SlotExtrapolator' => $baseDir . '/lib/Service/Appointments/SlotExtrapolator.php', + 'OCA\\Calendar\\Service\\Appointments\\TimezoneGenerator' => $baseDir . '/lib/Service/Appointments/TimezoneGenerator.php', + 'OCA\\Calendar\\Service\\CalendarInitialStateService' => $baseDir . '/lib/Service/CalendarInitialStateService.php', + 'OCA\\Calendar\\Service\\JSDataService' => $baseDir . '/lib/Service/JSDataService.php', + 'OCA\\Calendar\\Service\\ServiceException' => $baseDir . '/lib/Service/ServiceException.php', +); diff --git a/calendar/vendor/composer/autoload_namespaces.php b/calendar/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..15a2ff3 --- /dev/null +++ b/calendar/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($baseDir . '/lib'), + 'Bamarni\\Composer\\Bin\\' => array($vendorDir . '/bamarni/composer-bin-plugin/src'), +); diff --git a/calendar/vendor/composer/autoload_real.php b/calendar/vendor/composer/autoload_real.php new file mode 100644 index 0000000..ebaed7e --- /dev/null +++ b/calendar/vendor/composer/autoload_real.php @@ -0,0 +1,38 @@ +register(true); + + return $loader; + } +} diff --git a/calendar/vendor/composer/autoload_static.php b/calendar/vendor/composer/autoload_static.php new file mode 100644 index 0000000..24e09fe --- /dev/null +++ b/calendar/vendor/composer/autoload_static.php @@ -0,0 +1,101 @@ + + array ( + 'OCA\\Calendar\\' => 13, + ), + 'B' => + array ( + 'Bamarni\\Composer\\Bin\\' => 21, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'OCA\\Calendar\\' => + array ( + 0 => __DIR__ . '/../..' . '/lib', + ), + 'Bamarni\\Composer\\Bin\\' => + array ( + 0 => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src', + ), + ); + + public static $classMap = array ( + 'Bamarni\\Composer\\Bin\\ApplicationFactory\\FreshInstanceApplicationFactory' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/ApplicationFactory/FreshInstanceApplicationFactory.php', + 'Bamarni\\Composer\\Bin\\ApplicationFactory\\NamespaceApplicationFactory' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/ApplicationFactory/NamespaceApplicationFactory.php', + 'Bamarni\\Composer\\Bin\\BamarniBinPlugin' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/BamarniBinPlugin.php', + 'Bamarni\\Composer\\Bin\\CommandProvider' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/CommandProvider.php', + 'Bamarni\\Composer\\Bin\\Command\\BinCommand' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/Command/BinCommand.php', + 'Bamarni\\Composer\\Bin\\Command\\CouldNotCreateNamespaceDir' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php', + 'Bamarni\\Composer\\Bin\\Config\\Config' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/Config/Config.php', + 'Bamarni\\Composer\\Bin\\Config\\ConfigFactory' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/Config/ConfigFactory.php', + 'Bamarni\\Composer\\Bin\\Config\\InvalidBamarniComposerExtraConfig' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/Config/InvalidBamarniComposerExtraConfig.php', + 'Bamarni\\Composer\\Bin\\Input\\BinInputFactory' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/Input/BinInputFactory.php', + 'Bamarni\\Composer\\Bin\\Input\\InvalidBinInput' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php', + 'Bamarni\\Composer\\Bin\\Logger' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/Logger.php', + 'Bamarni\\Composer\\Bin\\PublicIO' => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src/PublicIO.php', + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'OCA\\Calendar\\AppInfo\\Application' => __DIR__ . '/../..' . '/lib/AppInfo/Application.php', + 'OCA\\Calendar\\BackgroundJob\\CleanUpOutdatedBookingsJob' => __DIR__ . '/../..' . '/lib/BackgroundJob/CleanUpOutdatedBookingsJob.php', + 'OCA\\Calendar\\Controller\\AppointmentConfigController' => __DIR__ . '/../..' . '/lib/Controller/AppointmentConfigController.php', + 'OCA\\Calendar\\Controller\\AppointmentController' => __DIR__ . '/../..' . '/lib/Controller/AppointmentController.php', + 'OCA\\Calendar\\Controller\\BookingController' => __DIR__ . '/../..' . '/lib/Controller/BookingController.php', + 'OCA\\Calendar\\Controller\\ContactController' => __DIR__ . '/../..' . '/lib/Controller/ContactController.php', + 'OCA\\Calendar\\Controller\\EmailController' => __DIR__ . '/../..' . '/lib/Controller/EmailController.php', + 'OCA\\Calendar\\Controller\\PublicViewController' => __DIR__ . '/../..' . '/lib/Controller/PublicViewController.php', + 'OCA\\Calendar\\Controller\\SettingsController' => __DIR__ . '/../..' . '/lib/Controller/SettingsController.php', + 'OCA\\Calendar\\Controller\\ViewController' => __DIR__ . '/../..' . '/lib/Controller/ViewController.php', + 'OCA\\Calendar\\Dashboard\\CalendarWidget' => __DIR__ . '/../..' . '/lib/Dashboard/CalendarWidget.php', + 'OCA\\Calendar\\Dashboard\\CalendarWidgetV2' => __DIR__ . '/../..' . '/lib/Dashboard/CalendarWidgetV2.php', + 'OCA\\Calendar\\Db\\AppointmentConfig' => __DIR__ . '/../..' . '/lib/Db/AppointmentConfig.php', + 'OCA\\Calendar\\Db\\AppointmentConfigMapper' => __DIR__ . '/../..' . '/lib/Db/AppointmentConfigMapper.php', + 'OCA\\Calendar\\Db\\Booking' => __DIR__ . '/../..' . '/lib/Db/Booking.php', + 'OCA\\Calendar\\Db\\BookingMapper' => __DIR__ . '/../..' . '/lib/Db/BookingMapper.php', + 'OCA\\Calendar\\Events\\BeforeAppointmentBookedEvent' => __DIR__ . '/../..' . '/lib/Events/BeforeAppointmentBookedEvent.php', + 'OCA\\Calendar\\Exception\\ClientException' => __DIR__ . '/../..' . '/lib/Exception/ClientException.php', + 'OCA\\Calendar\\Exception\\NoSlotFoundException' => __DIR__ . '/../..' . '/lib/Exception/NoSlotFoundException.php', + 'OCA\\Calendar\\Exception\\ServiceException' => __DIR__ . '/../..' . '/lib/Exception/ServiceException.php', + 'OCA\\Calendar\\Http\\JsonResponse' => __DIR__ . '/../..' . '/lib/Http/JsonResponse.php', + 'OCA\\Calendar\\Listener\\AppointmentBookedListener' => __DIR__ . '/../..' . '/lib/Listener/AppointmentBookedListener.php', + 'OCA\\Calendar\\Listener\\CalendarReferenceListener' => __DIR__ . '/../..' . '/lib/Listener/CalendarReferenceListener.php', + 'OCA\\Calendar\\Listener\\UserDeletedListener' => __DIR__ . '/../..' . '/lib/Listener/UserDeletedListener.php', + 'OCA\\Calendar\\Migration\\Version2040Date20210908101001' => __DIR__ . '/../..' . '/lib/Migration/Version2040Date20210908101001.php', + 'OCA\\Calendar\\Migration\\Version3000Date20211109132439' => __DIR__ . '/../..' . '/lib/Migration/Version3000Date20211109132439.php', + 'OCA\\Calendar\\Migration\\Version3010Date20220111090252' => __DIR__ . '/../..' . '/lib/Migration/Version3010Date20220111090252.php', + 'OCA\\Calendar\\Migration\\Version4050Date20230614163505' => __DIR__ . '/../..' . '/lib/Migration/Version4050Date20230614163505.php', + 'OCA\\Calendar\\Notification\\Notifier' => __DIR__ . '/../..' . '/lib/Notification/Notifier.php', + 'OCA\\Calendar\\Profile\\AppointmentsAction' => __DIR__ . '/../..' . '/lib/Profile/AppointmentsAction.php', + 'OCA\\Calendar\\Reference\\ReferenceProvider' => __DIR__ . '/../..' . '/lib/Reference/ReferenceProvider.php', + 'OCA\\Calendar\\Service\\Appointments\\AppointmentConfigService' => __DIR__ . '/../..' . '/lib/Service/Appointments/AppointmentConfigService.php', + 'OCA\\Calendar\\Service\\Appointments\\AvailabilityGenerator' => __DIR__ . '/../..' . '/lib/Service/Appointments/AvailabilityGenerator.php', + 'OCA\\Calendar\\Service\\Appointments\\BookingCalendarWriter' => __DIR__ . '/../..' . '/lib/Service/Appointments/BookingCalendarWriter.php', + 'OCA\\Calendar\\Service\\Appointments\\BookingService' => __DIR__ . '/../..' . '/lib/Service/Appointments/BookingService.php', + 'OCA\\Calendar\\Service\\Appointments\\DailyLimitFilter' => __DIR__ . '/../..' . '/lib/Service/Appointments/DailyLimitFilter.php', + 'OCA\\Calendar\\Service\\Appointments\\EventConflictFilter' => __DIR__ . '/../..' . '/lib/Service/Appointments/EventConflictFilter.php', + 'OCA\\Calendar\\Service\\Appointments\\Interval' => __DIR__ . '/../..' . '/lib/Service/Appointments/Interval.php', + 'OCA\\Calendar\\Service\\Appointments\\MailService' => __DIR__ . '/../..' . '/lib/Service/Appointments/MailService.php', + 'OCA\\Calendar\\Service\\Appointments\\SlotExtrapolator' => __DIR__ . '/../..' . '/lib/Service/Appointments/SlotExtrapolator.php', + 'OCA\\Calendar\\Service\\Appointments\\TimezoneGenerator' => __DIR__ . '/../..' . '/lib/Service/Appointments/TimezoneGenerator.php', + 'OCA\\Calendar\\Service\\CalendarInitialStateService' => __DIR__ . '/../..' . '/lib/Service/CalendarInitialStateService.php', + 'OCA\\Calendar\\Service\\JSDataService' => __DIR__ . '/../..' . '/lib/Service/JSDataService.php', + 'OCA\\Calendar\\Service\\ServiceException' => __DIR__ . '/../..' . '/lib/Service/ServiceException.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInitCalendar::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitCalendar::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitCalendar::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/calendar/vendor/composer/installed.json b/calendar/vendor/composer/installed.json new file mode 100644 index 0000000..3c20019 --- /dev/null +++ b/calendar/vendor/composer/installed.json @@ -0,0 +1,66 @@ +{ + "packages": [ + { + "name": "bamarni/composer-bin-plugin", + "version": "1.8.2", + "version_normalized": "1.8.2.0", + "source": { + "type": "git", + "url": "https://github.com/bamarni/composer-bin-plugin.git", + "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880", + "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "ext-json": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + }, + "time": "2022-10-31T08:38:03+00:00", + "type": "composer-plugin", + "extra": { + "class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Bamarni\\Composer\\Bin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "No conflicts for your bin dependencies", + "keywords": [ + "composer", + "conflict", + "dependency", + "executable", + "isolation", + "tool" + ], + "support": { + "issues": "https://github.com/bamarni/composer-bin-plugin/issues", + "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2" + }, + "install-path": "../bamarni/composer-bin-plugin" + } + ], + "dev": true, + "dev-package-names": [] +} diff --git a/calendar/vendor/composer/installed.php b/calendar/vendor/composer/installed.php new file mode 100644 index 0000000..16d5be9 --- /dev/null +++ b/calendar/vendor/composer/installed.php @@ -0,0 +1,32 @@ + array( + 'name' => '__root__', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => NULL, + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => true, + ), + 'versions' => array( + '__root__' => array( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => NULL, + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'bamarni/composer-bin-plugin' => array( + 'pretty_version' => '1.8.2', + 'version' => '1.8.2.0', + 'reference' => '92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880', + 'type' => 'composer-plugin', + 'install_path' => __DIR__ . '/../bamarni/composer-bin-plugin', + 'aliases' => array(), + 'dev_requirement' => false, + ), + ), +); diff --git a/calendar/vendor/composer/platform_check.php b/calendar/vendor/composer/platform_check.php new file mode 100644 index 0000000..adfb472 --- /dev/null +++ b/calendar/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 80000)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +}