diff --git a/index.php b/index.php
index 2d630209..df73ab07 100644
--- a/index.php
+++ b/index.php
@@ -28,7 +28,6 @@ class LogException extends \Exception {
use Closure;
-use CurlHandle;
class Updater {
/** @var int */
@@ -694,7 +693,7 @@ private function getDownloadURLs(): array {
}
- private function getCurl(string $url): CurlHandle {
+ private function getCurl(string $url): \CurlHandle {
$ch = curl_init($url);
if ($ch === false) {
throw new \Exception('Fail to open cUrl handler');
@@ -773,7 +772,7 @@ private function isAbleToDecompress(string $ext): bool {
return $ext === 'zip' && extension_loaded($ext);
}
- private function downloadProgressCallback(CurlHandle $resource, int $download_size, int $downloaded): void {
+ private function downloadProgressCallback(\CurlHandle $resource, int $download_size, int $downloaded): void {
if ($download_size !== 0) {
$progress = (int)round($downloaded * 100 / $download_size);
if ($progress > $this->previousProgress) {
diff --git a/lib/Updater.php b/lib/Updater.php
index 9a915277..846dc0de 100644
--- a/lib/Updater.php
+++ b/lib/Updater.php
@@ -10,7 +10,6 @@
namespace NC\Updater;
use Closure;
-use CurlHandle;
class Updater {
/** @var int */
@@ -676,7 +675,7 @@ private function getDownloadURLs(): array {
}
- private function getCurl(string $url): CurlHandle {
+ private function getCurl(string $url): \CurlHandle {
$ch = curl_init($url);
if ($ch === false) {
throw new \Exception('Fail to open cUrl handler');
@@ -755,7 +754,7 @@ private function isAbleToDecompress(string $ext): bool {
return $ext === 'zip' && extension_loaded($ext);
}
- private function downloadProgressCallback(CurlHandle $resource, int $download_size, int $downloaded): void {
+ private function downloadProgressCallback(\CurlHandle $resource, int $download_size, int $downloaded): void {
if ($download_size !== 0) {
$progress = (int)round($downloaded * 100 / $download_size);
if ($progress > $this->previousProgress) {
diff --git a/updater.phar b/updater.phar
index b851fb5c..9312294d 100755
Binary files a/updater.phar and b/updater.phar differ
diff --git a/vendor/bamarni/composer-bin-plugin/.github/workflows/phpstan.yml b/vendor/bamarni/composer-bin-plugin/.github/workflows/phpstan.yml
deleted file mode 100644
index ebb57672..00000000
--- a/vendor/bamarni/composer-bin-plugin/.github/workflows/phpstan.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: "Static analysis"
-
-on:
- push:
- branches:
- - "main"
- - "master"
- pull_request: null
-
-jobs:
- static-analysis:
- runs-on: "ubuntu-latest"
- name: "PHPStan on PHP ${{ matrix.php }}"
- strategy:
- fail-fast: false
- matrix:
- php:
- - "8.1"
- steps:
- - name: "Check out repository code"
- uses: "actions/checkout@v2"
-
- - name: "Setup PHP"
- uses: "shivammathur/setup-php@v2"
- with:
- php-version: "${{ matrix.php }}"
- tools: "composer"
-
- - name: "Install Composer dependencies"
- uses: "ramsey/composer-install@v2"
- with:
- dependency-versions: "highest"
-
- - name: "Perform static analysis"
- run: "make phpstan"
diff --git a/vendor/bamarni/composer-bin-plugin/.github/workflows/tests.yaml b/vendor/bamarni/composer-bin-plugin/.github/workflows/tests.yaml
deleted file mode 100644
index 5bec38a4..00000000
--- a/vendor/bamarni/composer-bin-plugin/.github/workflows/tests.yaml
+++ /dev/null
@@ -1,80 +0,0 @@
-name: "Tests"
-
-on:
- push:
- branches:
- - "main"
- - "master"
- pull_request: null
-
-jobs:
- unit-tests:
- runs-on: "ubuntu-latest"
- name: "Unit Tests on PHP ${{ matrix.php }} and ${{ matrix.tools }}"
- strategy:
- fail-fast: false
- matrix:
- php:
- - "7.2"
- - "7.3"
- - "7.4"
- - "8.0"
- - "8.1"
- tools: [ "composer" ]
- dependency-versions: [ "highest" ]
- include:
- - php: "7.2"
- tools: "composer:v2.0"
- dependency-versions: "lowest"
-
- steps:
- - name: "Check out repository code"
- uses: "actions/checkout@v2"
-
- - name: "Setup PHP"
- uses: "shivammathur/setup-php@v2"
- with:
- php-version: "${{ matrix.php }}"
- tools: "${{ matrix.tools }}"
-
- - name: "Install Composer dependencies"
- uses: "ramsey/composer-install@v2"
- with:
- dependency-versions: "${{ matrix.dependency-versions }}"
-
- - name: "Validate composer.json"
- run: "composer validate --strict --no-check-lock"
-
- - name: "Run tests"
- run: "vendor/bin/phpunit --group default"
-
- e2e-tests:
- runs-on: "ubuntu-latest"
- name: "E2E Tests on PHP ${{ matrix.php }}"
- strategy:
- fail-fast: false
- matrix:
- php:
- - "8.1"
-
- steps:
- - name: "Check out repository code"
- uses: "actions/checkout@v2"
-
- - name: "Setup PHP"
- uses: "shivammathur/setup-php@v2"
- with:
- php-version: "${{ matrix.php }}"
- tools: "composer"
-
- - name: "Correct bin plugin version for e2e scenarios (PR-only)"
- if: github.event_name == 'pull_request'
- run: find e2e -maxdepth 1 -mindepth 1 -type d -exec bash -c "cd {} && composer require --dev bamarni/composer-bin-plugin:dev-${GITHUB_SHA} --no-update" \;
-
- - name: "Install Composer dependencies"
- uses: "ramsey/composer-install@v2"
- with:
- dependency-versions: "highest"
-
- - name: "Run tests"
- run: "vendor/bin/phpunit --group e2e"
diff --git a/vendor/bamarni/composer-bin-plugin/.makefile/touch.sh b/vendor/bamarni/composer-bin-plugin/.makefile/touch.sh
deleted file mode 100755
index 5c0a7759..00000000
--- a/vendor/bamarni/composer-bin-plugin/.makefile/touch.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env bash
-#
-# Takes a given string, e.g. 'bin/console' or 'docker-compose exec php bin/console'
-# and split it by words. For each words, if the target is a file, it is touched.
-#
-# This allows to implement a similar rule to:
-#
-# ```Makefile
-# bin/php-cs-fixer: vendor
-# touch $@
-# ```
-#
-# Indeed when the rule `bin/php-cs-fixer` is replaced with a docker-compose
-# equivalent, it will not play out as nicely.
-#
-# Arguments:
-# $1 - {string} Command potentially containing a file
-#
-
-set -Eeuo pipefail;
-
-
-readonly ERROR_COLOR="\e[41m";
-readonly NO_COLOR="\e[0m";
-
-
-if [ $# -ne 1 ]; then
- printf "${ERROR_COLOR}Illegal number of parameters.${NO_COLOR}\n";
-
- exit 1;
-fi
-
-
-readonly FILES="$1";
-
-
-#######################################
-# Touch the given file path if the target is a file and do not create the file
-# if does not exist.
-#
-# Globals:
-# None
-#
-# Arguments:
-# $1 - {string} File path
-#
-# Returns:
-# None
-#######################################
-touch_file() {
- local file="$1";
-
- if [ -e ${file} ]; then
- touch -c ${file};
- fi
-}
-
-for file in ${FILES}
-do
- touch_file ${file};
-done
diff --git a/vendor/bamarni/composer-bin-plugin/.phive/phars.xml b/vendor/bamarni/composer-bin-plugin/.phive/phars.xml
deleted file mode 100644
index 335086e3..00000000
--- a/vendor/bamarni/composer-bin-plugin/.phive/phars.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/vendor/bamarni/composer-bin-plugin/composer.json b/vendor/bamarni/composer-bin-plugin/composer.json
index 5b3809ba..e6f6e452 100644
--- a/vendor/bamarni/composer-bin-plugin/composer.json
+++ b/vendor/bamarni/composer-bin-plugin/composer.json
@@ -21,7 +21,7 @@
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
- "phpunit/phpunit": "^8.5 || ^9.5",
+ "phpunit/phpunit": "^8.5 || ^9.6 || ^10.0",
"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"
diff --git a/vendor/bamarni/composer-bin-plugin/src/BamarniBinPlugin.php b/vendor/bamarni/composer-bin-plugin/src/BamarniBinPlugin.php
index 1d21c93b..19e36e0a 100644
--- a/vendor/bamarni/composer-bin-plugin/src/BamarniBinPlugin.php
+++ b/vendor/bamarni/composer-bin-plugin/src/BamarniBinPlugin.php
@@ -24,6 +24,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
+
use function count;
use function in_array;
use function sprintf;
diff --git a/vendor/bamarni/composer-bin-plugin/src/Command/BinCommand.php b/vendor/bamarni/composer-bin-plugin/src/Command/BinCommand.php
index 9edb4c3e..eaf6ff0a 100644
--- a/vendor/bamarni/composer-bin-plugin/src/Command/BinCommand.php
+++ b/vendor/bamarni/composer-bin-plugin/src/Command/BinCommand.php
@@ -19,6 +19,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
+
use function chdir;
use function count;
use function file_exists;
@@ -30,6 +31,7 @@
use function mkdir;
use function putenv;
use function sprintf;
+
use const GLOB_ONLYDIR;
/**
diff --git a/vendor/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php b/vendor/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php
index 33145078..8985a7cd 100644
--- a/vendor/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php
+++ b/vendor/bamarni/composer-bin-plugin/src/Command/CouldNotCreateNamespaceDir.php
@@ -5,6 +5,7 @@
namespace Bamarni\Composer\Bin\Command;
use RuntimeException;
+
use function sprintf;
final class CouldNotCreateNamespaceDir extends RuntimeException
diff --git a/vendor/bamarni/composer-bin-plugin/src/Config/Config.php b/vendor/bamarni/composer-bin-plugin/src/Config/Config.php
index fa62b3a1..629ab868 100644
--- a/vendor/bamarni/composer-bin-plugin/src/Config/Config.php
+++ b/vendor/bamarni/composer-bin-plugin/src/Config/Config.php
@@ -5,6 +5,7 @@
namespace Bamarni\Composer\Bin\Config;
use Composer\Composer;
+
use function array_key_exists;
use function array_merge;
use function function_exists;
diff --git a/vendor/bamarni/composer-bin-plugin/src/Input/BinInputFactory.php b/vendor/bamarni/composer-bin-plugin/src/Input/BinInputFactory.php
index dab96f68..0b0a1816 100644
--- a/vendor/bamarni/composer-bin-plugin/src/Input/BinInputFactory.php
+++ b/vendor/bamarni/composer-bin-plugin/src/Input/BinInputFactory.php
@@ -6,6 +6,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\StringInput;
+
use function array_filter;
use function array_map;
use function implode;
@@ -61,7 +62,7 @@ public static function createInput(
public static function createNamespaceInput(InputInterface $previousInput): InputInterface
{
$matchResult = preg_match(
- '/^(.+?\s?)(--(?: .+)?)?$/',
+ '/^([^\s]+)(.*?\s?)(--(?: .+)?)?$/',
$previousInput->__toString(),
$matches
);
@@ -77,6 +78,7 @@ public static function createNamespaceInput(InputInterface $previousInput): Inpu
$matches[1],
'--working-dir=.',
$matches[2] ?? '',
+ $matches[3] ?? '',
]
)
);
diff --git a/vendor/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php b/vendor/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php
index 2418d9c8..7f44ff5e 100644
--- a/vendor/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php
+++ b/vendor/bamarni/composer-bin-plugin/src/Input/InvalidBinInput.php
@@ -6,6 +6,7 @@
use RuntimeException;
use Symfony\Component\Console\Input\InputInterface;
+
use function sprintf;
final class InvalidBinInput extends RuntimeException
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index 2052022f..51e734a7 100644
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -26,23 +26,12 @@
*/
class InstalledVersions
{
- /**
- * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
- * @internal
- */
- private static $selfDir = null;
-
/**
* @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
- */
- private static $installedIsLocalDir;
-
/**
* @var bool|null
*/
@@ -320,24 +309,6 @@ public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
-
- // when using reload, we disable the duplicate protection to ensure that self::$installed data is
- // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
- // so we have to assume it does not, and that may result in duplicate data being returned when listing
- // all installed packages for example
- self::$installedIsLocalDir = false;
- }
-
- /**
- * @return string
- */
- private static function getSelfDir()
- {
- if (self::$selfDir === null) {
- self::$selfDir = strtr(__DIR__, '\\', '/');
- }
-
- return self::$selfDir;
}
/**
@@ -351,27 +322,19 @@ private static function getInstalled()
}
$installed = array();
- $copiedLocalDir = false;
if (self::$canGetVendors) {
- $selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
- $vendorDir = strtr($vendorDir, '\\', '/');
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';
- self::$installedByVendor[$vendorDir] = $required;
- $installed[] = $required;
- if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
- self::$installed = $required;
- self::$installedIsLocalDir = true;
+ $installed[] = self::$installedByVendor[$vendorDir] = $required;
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
}
}
- if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
- $copiedLocalDir = true;
- }
}
}
@@ -387,7 +350,7 @@ private static function getInstalled()
}
}
- if (self::$installed !== array() && !$copiedLocalDir) {
+ if (self::$installed !== array()) {
$installed[] = self::$installed;
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 55853f22..9203b5b7 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -2,17 +2,17 @@
"packages": [
{
"name": "bamarni/composer-bin-plugin",
- "version": "1.8.2",
- "version_normalized": "1.8.2.0",
+ "version": "1.8.3",
+ "version_normalized": "1.8.3.0",
"source": {
"type": "git",
"url": "https://github.com/bamarni/composer-bin-plugin.git",
- "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880"
+ "reference": "e7ef9e012667327516c24e5fad9903a3bc91389d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
- "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
+ "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/e7ef9e012667327516c24e5fad9903a3bc91389d",
+ "reference": "e7ef9e012667327516c24e5fad9903a3bc91389d",
"shasum": ""
},
"require": {
@@ -25,12 +25,12 @@
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
- "phpunit/phpunit": "^8.5 || ^9.5",
+ "phpunit/phpunit": "^8.5 || ^9.6 || ^10.0",
"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",
+ "time": "2025-11-24T19:20:55+00:00",
"type": "composer-plugin",
"extra": {
"class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin"
@@ -56,7 +56,7 @@
],
"support": {
"issues": "https://github.com/bamarni/composer-bin-plugin/issues",
- "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2"
+ "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.3"
},
"install-path": "../bamarni/composer-bin-plugin"
},
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index a121f657..2d8212c2 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '0deb35c1f4fd23fea55c03db40f07c72603adc43',
+ 'reference' => 'ac592788bd280f6d2f3dcb636c4cff0257f68c14',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -13,16 +13,16 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '0deb35c1f4fd23fea55c03db40f07c72603adc43',
+ 'reference' => 'ac592788bd280f6d2f3dcb636c4cff0257f68c14',
'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',
+ 'pretty_version' => '1.8.3',
+ 'version' => '1.8.3.0',
+ 'reference' => 'e7ef9e012667327516c24e5fad9903a3bc91389d',
'type' => 'composer-plugin',
'install_path' => __DIR__ . '/../bamarni/composer-bin-plugin',
'aliases' => array(),