diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index 1c314c49..0b0e3acd 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -27,6 +27,7 @@ $routes->post('user/Deleteuserdepartment', 'User::Deleteuserdepartment');
// $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'resetPasswordConfirmUser/(:any)/(:any)', 'Login::resetPasswordConfirmUser/$1/$2');
// $routes->match(['GET', 'POST', 'PUT', 'DELETE'],'createPasswordUser', 'Login::createPasswordUser');
$routes->get('dashboard', 'User::index');
+$routes->get('sales_invoice', 'User::sales_invoice');
$routes->get('reports', 'Report::index');
// User Routes
@@ -352,3 +353,11 @@ $routes->get('qualityreportlistinward', 'Quality::reportListInward');
$routes->get('shortagematerialListing', 'Rawmaterialdetails::shortagematerialListing');
$routes->get('inprocess', 'Inprocess::index');
+
+
+// Sales Invoice routes
+$routes->get('invoicedetails/ViewInvoice', 'User::ViewInvoice');
+$routes->get('getInvoiceAttachment', 'User::getInvoiceAttachment');
+$routes->get('deleteAttachment', 'User::deleteAttachment');
+$routes->post('saveAttachment', 'User::saveAttachment');
+
diff --git a/app/Controllers/User.php b/app/Controllers/User.php
index f47e477f..06ca3a62 100644
--- a/app/Controllers/User.php
+++ b/app/Controllers/User.php
@@ -10,6 +10,8 @@ use App\Models\Costcenter_model;
use App\Models\Dashboard_model;
use App\Models\Employeedetails_model;
use App\Models\User_model;
+use App\Models\Ipinvoice_model;
+use App\Models\Ipattachment_model;
use App\Models\Zohobooks_api_model;
require_once 'vendor/autoload.php';
@@ -27,6 +29,8 @@ class User extends BaseController
protected $dahsboard_Model;
protected $employeedetails_model;
protected $user_model;
+ protected $ipinvoice_model;
+ protected $ipattachment_model;
protected $session;
/**
@@ -40,6 +44,8 @@ class User extends BaseController
$this->costcenter_model = new Costcenter_model();
$this->employeedetails_model = new employeedetails_model();
$this->user_model = new User_model();
+ $this->ipinvoice_model = new Ipinvoice_model();
+ $this->ipattachment_model = new Ipattachment_model();
$this->session = session();
helper('form'); //$this->load->library('form_validation');
$this->isLoggedIn();
@@ -1625,4 +1631,100 @@ class User extends BaseController
}
}
// END zoho API
-}
\ No newline at end of file
+
+ // Sales Invoice List
+
+ function sales_invoice(){
+ $this->global['pageTitle'] = 'Sales Invoice';
+ $data['sales_invoice'] = $this->ipinvoice_model->saleInvoiceListing();
+ // echo "
";
+ // print_r($data);die;
+ $this->loadViews("sales_invoice", $this->global, $data, NULL);
+ }
+ // Sales Invoice List
+
+ // Sales Invoice
+ function ViewInvoice($InvoiceNO = ''){
+ if ($InvoiceNO == '') {
+ $InvoiceID = $_GET['InvoiceID'];
+ } else {
+ $InvoiceID = $InvoiceNO;
+ }
+
+ $data['invoiceDetails'] = $this->ipinvoice_model->getInvoice($InvoiceID);
+
+ $data['invoiceAttachment'] = $this->ipinvoice_model->getinvoiceAttachment($InvoiceID);
+
+ // echo "";
+ // print_r($data);die;
+ $this->global['pageTitle'] = 'View Invoice';
+
+ $this->loadViews("editInvoice", $this->global, $data, NULL);
+ }
+ // Sales Invoice
+
+
+ // Sales Invoice
+ function getInvoiceAttachment(){
+ $data['invoiceAttachment'] = $this->ipinvoice_model->getinvoiceAttachment($this->request->getGet('invoice_number'));
+
+ return json_encode($data);
+ }
+ // Sales Invoice
+
+
+ // User Controller
+ function deleteAttachment() {
+ $invoice_attachment_id = $this->request->getGet('invoice_attachment_id'); // Get the attachment ID from the request
+ // Ensure ID is not empty
+ if ($invoice_attachment_id) {
+ // Load the model
+
+ // Call the model method to delete the attachment
+ $result = $this->ipinvoice_model->deleteAttachment($invoice_attachment_id);
+
+ if ($result) {
+ echo json_encode(['status' => 'success', 'message' => 'Attachment deleted successfully.']);
+ } else {
+ echo json_encode(['status' => 'error', 'message' => 'Failed to delete attachment.']);
+ }
+ } else {
+ echo json_encode(['status' => 'error', 'message' => 'Invalid attachment ID.']);
+ }
+ }
+
+
+ function saveAttachment() {
+ $invoiceId = $this->request->getPost('invoice_id');
+ $fileNames = $this->request->getPost('file_name[]');
+ $files = $this->request->getFiles();
+ if ($files && isset($files['emp_file']) && is_array($files['emp_file'])) {
+ foreach ($files['emp_file'] as $key => $file) {
+ if ($file->isValid() && !$file->hasMoved()) {
+ // Generate a unique name for the file
+ $newFileName = $file->getRandomName();
+
+ // Move the file to the target directory
+ $file->move('./public/uploads/images/invoice_files/', $newFileName);
+
+ // Insert the file info into the database
+ $data = [
+ 'invoice_id' => $invoiceId,
+ 'file_name' => $newFileName,
+ 'attachment_name' => $fileNames[$key]
+ ];
+
+ $this->ipattachment_model->addNewAttachment($data);
+ }
+ }
+ } else {
+ return $this->response->setJSON(['success' => false, 'message' => 'No files uploaded or incorrect input name.']);
+ }
+
+ return $this->response->setJSON(['success' => true]);
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/app/Helpers/zohobook_helper.php b/app/Helpers/zohobook_helper.php
index c292d4e9..bfce0ba3 100755
--- a/app/Helpers/zohobook_helper.php
+++ b/app/Helpers/zohobook_helper.php
@@ -77,7 +77,6 @@ if (! function_exists('getheringInvoiceDetails')) {
// Store headers and data
$data['headers_new'] = $headers;
$data['data'] = curl_exec($ch);
-
// Return data
return $data;
}
diff --git a/app/Models/Ipattachment_model.php b/app/Models/Ipattachment_model.php
new file mode 100644
index 00000000..76708b57
--- /dev/null
+++ b/app/Models/Ipattachment_model.php
@@ -0,0 +1,78 @@
+db->transStart();
+ $builder = $this->db->table('ip_invoice_attachment');
+ $builder->insert($attachments);
+
+ $insert_id = $this->db->affectedRows();
+
+ $this->db->transComplete();
+
+ return $insert_id;
+ }
+
+
+
+
+
+
+ // Ipinvoice_model
+ public function deleteAttachment($invoice_attachment_id) {
+ // Get the attachment details to get the file path
+ $builder = $this->db->table('ip_invoice_attachment');
+ $builder->where('invoice_attachment_id', $invoice_attachment_id);
+ $query = $builder->get();
+ $attachment = $query->getRowArray(); // Get single row as an associative array
+
+ if ($attachment) {
+ // Construct the file path
+ $fileName = $attachment['attachment_name']; // Make sure this is the correct field name
+ $filePath = './public/uploads/images/invoice_files/' . $fileName;
+
+ // Debug: Log the file path
+ log_message('error', 'Attempting to delete file: ' . $filePath);
+
+ // Check if the path is actually a file
+ if (file_exists($filePath) && !is_dir($filePath)) {
+ unlink($filePath); // Delete the file
+ } else {
+ log_message('error', 'File does not exist or is a directory: ' . $filePath);
+ }
+
+ // Delete the record from the database
+ $builder->where('invoice_attachment_id', $invoice_attachment_id);
+ $builder->delete();
+
+ return $this->db->affectedRows() > 0;
+ }
+
+ return false;
+ }
+
+
+
+
+
+
+}
\ No newline at end of file
diff --git a/app/Models/Ipinvoice_model.php b/app/Models/Ipinvoice_model.php
new file mode 100644
index 00000000..0c62ad37
--- /dev/null
+++ b/app/Models/Ipinvoice_model.php
@@ -0,0 +1,184 @@
+db->table('ip_invoices ')
+ ->select('ip_invoices.invoice_id, ip_invoices.user_id, ip_invoices.client_id,
+ ip_invoices.invoice_group_id, ip_invoices.invoice_status_id, ip_invoices.invoice_date_due, ip_invoices.invoice_date_created,
+ ip_invoices.invoice_number, ip_invoices.invoice_terms, ip_clients.client_name,
+ ip_payment_methods.payment_method_name, ip_users.user_name, ip_products.product_name,
+ ip_invoice_amounts.invoice_total')
+ ->join('ip_payment_methods', 'ip_invoices.payment_method = ip_payment_methods.payment_method_id', 'left')
+ ->join('ip_clients', 'ip_invoices.client_id = ip_clients.client_id', 'left')
+ ->join('ip_users', 'ip_invoices.user_id = ip_users.user_id', 'left')
+ ->join('ip_invoice_items', 'ip_invoices.invoice_id = ip_invoice_items.invoice_id', 'left')
+ ->join('ip_products', 'ip_invoice_items.item_product_id = ip_products.product_id', 'left')
+ ->join('ip_invoice_amounts', 'ip_invoices.invoice_id = ip_invoice_amounts.invoice_id', 'left')
+ ->orderBy('ip_invoices.invoice_number', 'DESC');
+
+ $query = $builder->get();
+ $result = $query->getResult();
+ return $result;
+ }
+
+
+
+
+
+ /**
+ * This function is used to add new user to system
+ * @return number $insert_id : This is last inserted id
+ */
+ function addNewUser($userInfo)
+ {
+
+ $this->db->transStart();
+ $builder = $this->db->table('tbl_users');
+ $builder->insert($userInfo);
+
+ $insert_id = $this->db->affectedRows();
+
+ $this->db->transComplete();
+
+ return $insert_id;
+ }
+
+ /**
+ * This function used to get user information by id
+ * @param number $userId : This is user id
+ * @return array $result : This is user information
+ */
+ function getInvoice($invoiceId)
+ {
+ $builder = $this->db->table('ip_invoices')
+ // ->select('')
+ ->where('invoice_id', $invoiceId);
+ $query = $builder->get();
+
+ return $query->getResult();
+ }
+
+
+ /**
+ * This function used to get user information by id
+ * @param number $userId : This is user id
+ * @return array $result : This is user information
+ */
+ function getinvoiceAttachment($invoiceId)
+ {
+ $builder = $this->db->table('ip_invoice_attachment')
+ // ->select('')
+ ->where('invoice_id', $invoiceId);
+ $query = $builder->get();
+
+ return $query->getResult();
+ }
+
+
+ // Ipinvoice_model
+ public function deleteAttachment($invoice_attachment_id) {
+ // Get the attachment details to get the file path
+ $builder = $this->db->table('ip_invoice_attachment');
+ $builder->where('invoice_attachment_id', $invoice_attachment_id);
+ $query = $builder->get();
+ $attachment = $query->getRowArray(); // Get single row as an associative array
+
+ if ($attachment) {
+ // Construct the file path
+ $fileName = $attachment['attachment_name']; // Make sure this is the correct field name
+ $filePath = './public/uploads/images/invoice_files/' . $fileName;
+
+ // Debug: Log the file path
+ log_message('error', 'Attempting to delete file: ' . $filePath);
+
+ // Check if the path is actually a file
+ if (file_exists($filePath) && !is_dir($filePath)) {
+ unlink($filePath); // Delete the file
+ } else {
+ log_message('error', 'File does not exist or is a directory: ' . $filePath);
+ }
+
+ // Delete the record from the database
+ $builder->where('invoice_attachment_id', $invoice_attachment_id);
+ $builder->delete();
+
+ return $this->db->affectedRows() > 0;
+ }
+
+ return false;
+ }
+
+
+
+
+
+
+ /**
+ * This function is used to update the user information
+ * @param array $userInfo : This is users updated information
+ * @param number $userId : This is user id
+ */
+ function editUser($userInfo, $userId)
+ {
+ $this->db->table('tbl_users')
+ ->where('EmpID', $userId)
+ ->update($userInfo);
+
+ return TRUE;
+ }
+
+
+
+ /**
+ * This function is used to delete the user information
+ * @param number $userId : This is user id
+ * @return boolean $result : TRUE / FALSE
+ */
+ function deleteUser($userId, $userInfo)
+ {
+ $this->db->table('tbl_users')
+ ->where('userId', $userId)
+ ->update($userInfo);
+
+ return $this->db->affectedRows();
+ }
+
+
+
+
+ /**
+ * This function is used to get the All employees
+ * @return array $result : This is result of the query
+ */
+ function getAllEmployees()
+ {
+ /*->select('EmpID,FirstName,LastName');
+ $builder = $this->db->table('t_employee_details');
+ $query = $builder->get();
+
+ return $query->getResult(); */
+ $builder = $this->db->table('t_employee_details EMP')
+ ->select('EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName')
+ ->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode')
+ ->where('EMP.IsActive ', 1);
+ $query = $builder->get();
+ return $query->getResult();
+ }
+
+
+}
\ No newline at end of file
diff --git a/app/Views/includes/header.php b/app/Views/includes/header.php
index f1925087..1f99c35c 100644
--- a/app/Views/includes/header.php
+++ b/app/Views/includes/header.php
@@ -347,7 +347,11 @@
-
+
+
+ Sales Invoice
+
+
diff --git a/app/Views/sales_invoice.php b/app/Views/sales_invoice.php
new file mode 100644
index 00000000..b0fa86b2
--- /dev/null
+++ b/app/Views/sales_invoice.php
@@ -0,0 +1,305 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $value) { ?>
+
+
+
+ File Name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/public/assets/images/emp_files/.gitkeep b/public/assets/images/emp_files/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/public/assets/images/invoice_files/.gitkeep b/public/assets/images/invoice_files/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/vendor/bin/php-cs-fixer b/vendor/bin/php-cs-fixer
index ffb11433..d40411aa 100755
--- a/vendor/bin/php-cs-fixer
+++ b/vendor/bin/php-cs-fixer
@@ -112,9 +112,8 @@ if (PHP_VERSION_ID < 80000) {
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
- include("phpvfscomposer://" . __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer');
- exit(0);
+ return include("phpvfscomposer://" . __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer');
}
}
-include __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer';
+return include __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer';
diff --git a/vendor/codeigniter/coding-standard/CHANGELOG.md b/vendor/codeigniter/coding-standard/CHANGELOG.md
index 1468e422..f7b2dfe4 100755
--- a/vendor/codeigniter/coding-standard/CHANGELOG.md
+++ b/vendor/codeigniter/coding-standard/CHANGELOG.md
@@ -4,6 +4,12 @@ All notable changes to this library will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [v1.8.1](https://github.com/CodeIgniter/coding-standard/compare/v1.8.0...v1.8.1) - 2024-08-05
+
+- Add `keep_annotations` option for `php_unit_attributes`
+- Add `php_unit_assert_new_names` fixer
+- Bump dependencies
+
## [v1.8.0](https://github.com/CodeIgniter/coding-standard/compare/v1.7.16...v1.8.0) - 2024-06-16
- Enable rules for PHP 8.1 (#20)
diff --git a/vendor/codeigniter/coding-standard/composer.json b/vendor/codeigniter/coding-standard/composer.json
index dcdd3f62..a6c482a4 100755
--- a/vendor/codeigniter/coding-standard/composer.json
+++ b/vendor/codeigniter/coding-standard/composer.json
@@ -21,13 +21,13 @@
"require": {
"php": "^8.1",
"ext-tokenizer": "*",
- "friendsofphp/php-cs-fixer": "^3.50",
- "nexusphp/cs-config": "^3.19.0"
+ "friendsofphp/php-cs-fixer": "^3.61.1",
+ "nexusphp/cs-config": "^3.24"
},
"require-dev": {
- "nexusphp/tachycardia": "^2.1",
- "phpstan/phpstan": "^1.0",
- "phpunit/phpunit": "^10.5"
+ "nexusphp/tachycardia": "^2.3",
+ "phpstan/phpstan": "^1.11",
+ "phpunit/phpunit": "^10.5 || ^11.2"
},
"minimum-stability": "dev",
"prefer-stable": true,
diff --git a/vendor/codeigniter/coding-standard/src/CodeIgniter4.php b/vendor/codeigniter/coding-standard/src/CodeIgniter4.php
index 08841171..0fb6b81c 100755
--- a/vendor/codeigniter/coding-standard/src/CodeIgniter4.php
+++ b/vendor/codeigniter/coding-standard/src/CodeIgniter4.php
@@ -373,8 +373,11 @@ final class CodeIgniter4 extends AbstractRuleset
'sort_algorithm' => 'alpha',
'case_sensitive' => false,
],
- 'php_unit_attributes' => true,
- 'php_unit_construct' => [
+ 'php_unit_assert_new_names' => true,
+ 'php_unit_attributes' => [
+ 'keep_annotations' => false,
+ ],
+ 'php_unit_construct' => [
'assertions' => [
'assertSame',
'assertEquals',
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index fd56bd7d..7824d8f7 100755
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -45,35 +45,34 @@ class ClassLoader
/** @var \Closure(string):void */
private static $includeFile;
- /** @var ?string */
+ /** @var string|null */
private $vendorDir;
// PSR-4
/**
- * @var array[]
- * @psalm-var array>
+ * @var array>
*/
private $prefixLengthsPsr4 = array();
/**
- * @var array[]
- * @psalm-var array>
+ * @var array>
*/
private $prefixDirsPsr4 = array();
/**
- * @var array[]
- * @psalm-var array
+ * @var list
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
- * @var array[]
- * @psalm-var array>
+ * 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 array[]
- * @psalm-var array
+ * @var list
*/
private $fallbackDirsPsr0 = array();
@@ -81,8 +80,7 @@ class ClassLoader
private $useIncludePath = false;
/**
- * @var string[]
- * @psalm-var array
+ * @var array
*/
private $classMap = array();
@@ -90,21 +88,20 @@ class ClassLoader
private $classMapAuthoritative = false;
/**
- * @var bool[]
- * @psalm-var array
+ * @var array
*/
private $missingClasses = array();
- /** @var ?string */
+ /** @var string|null */
private $apcuPrefix;
/**
- * @var self[]
+ * @var array
*/
private static $registeredLoaders = array();
/**
- * @param ?string $vendorDir
+ * @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
@@ -113,7 +110,7 @@ class ClassLoader
}
/**
- * @return string[]
+ * @return array>
*/
public function getPrefixes()
{
@@ -125,8 +122,7 @@ class ClassLoader
}
/**
- * @return array[]
- * @psalm-return array>
+ * @return array>
*/
public function getPrefixesPsr4()
{
@@ -134,8 +130,7 @@ class ClassLoader
}
/**
- * @return array[]
- * @psalm-return array
+ * @return list
*/
public function getFallbackDirs()
{
@@ -143,8 +138,7 @@ class ClassLoader
}
/**
- * @return array[]
- * @psalm-return array
+ * @return list
*/
public function getFallbackDirsPsr4()
{
@@ -152,8 +146,7 @@ class ClassLoader
}
/**
- * @return string[] Array of classname => path
- * @psalm-return array
+ * @return array Array of classname => path
*/
public function getClassMap()
{
@@ -161,8 +154,7 @@ class ClassLoader
}
/**
- * @param string[] $classMap Class to filename map
- * @psalm-param array $classMap
+ * @param array $classMap Class to filename map
*
* @return void
*/
@@ -179,24 +171,25 @@ class ClassLoader
* 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 string[]|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
+ * @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(
- (array) $paths,
+ $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
- (array) $paths
+ $paths
);
}
@@ -205,19 +198,19 @@ class ClassLoader
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+ $this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
- (array) $paths,
+ $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
- (array) $paths
+ $paths
);
}
}
@@ -226,9 +219,9 @@ class ClassLoader
* 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 string[]|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
+ * @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
*
@@ -236,17 +229,18 @@ class ClassLoader
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
+ $paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
- (array) $paths,
+ $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
- (array) $paths
+ $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -256,18 +250,18 @@ class ClassLoader
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;
+ $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
- (array) $paths,
+ $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
- (array) $paths
+ $paths
);
}
}
@@ -276,8 +270,8 @@ class ClassLoader
* 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 string[]|string $paths The PSR-0 base directories
+ * @param string $prefix The prefix
+ * @param list|string $paths The PSR-0 base directories
*
* @return void
*/
@@ -294,8 +288,8 @@ class ClassLoader
* 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 string[]|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
@@ -429,7 +423,8 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- (self::$includeFile)($file);
+ $includeFile = self::$includeFile;
+ $includeFile($file);
return true;
}
@@ -480,9 +475,9 @@ class ClassLoader
}
/**
- * Returns the currently registered loaders indexed by their corresponding vendor directories.
+ * Returns the currently registered loaders keyed by their corresponding vendor directories.
*
- * @return self[]
+ * @return array
*/
public static function getRegisteredLoaders()
{
@@ -560,7 +555,10 @@ class ClassLoader
return false;
}
- private static function initializeIncludeClosure(): void
+ /**
+ * @return void
+ */
+ private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
@@ -574,8 +572,8 @@ class ClassLoader
* @param string $file
* @return void
*/
- self::$includeFile = static function($file) {
+ self::$includeFile = \Closure::bind(static function($file) {
include $file;
- };
+ }, null, null);
}
}
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index c6b54af7..51e734a7 100755
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -98,7 +98,7 @@ class InstalledVersions
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
- return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
+ return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
@@ -119,7 +119,7 @@ class InstalledVersions
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
- $constraint = $parser->parseConstraints($constraint);
+ $constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
@@ -328,7 +328,9 @@ class InstalledVersions
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
- $installed[] = self::$installedByVendor[$vendorDir] = require $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];
}
@@ -340,12 +342,17 @@ class InstalledVersions
// 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 = require __DIR__ . '/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 __DIR__ . '/installed.php';
+ self::$installed = $required;
} else {
self::$installed = array();
}
}
- $installed[] = self::$installed;
+
+ if (self::$installed !== array()) {
+ $installed[] = self::$installed;
+ }
return $installed;
}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index f9e662d4..04a5a969 100755
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -417,6 +417,11 @@ return array(
'Composer\\Pcre\\MatchResult' => $vendorDir . '/composer/pcre/src/MatchResult.php',
'Composer\\Pcre\\MatchStrictGroupsResult' => $vendorDir . '/composer/pcre/src/MatchStrictGroupsResult.php',
'Composer\\Pcre\\MatchWithOffsetsResult' => $vendorDir . '/composer/pcre/src/MatchWithOffsetsResult.php',
+ 'Composer\\Pcre\\PHPStan\\InvalidRegexPatternRule' => $vendorDir . '/composer/pcre/src/PHPStan/InvalidRegexPatternRule.php',
+ 'Composer\\Pcre\\PHPStan\\PregMatchFlags' => $vendorDir . '/composer/pcre/src/PHPStan/PregMatchFlags.php',
+ 'Composer\\Pcre\\PHPStan\\PregMatchParameterOutTypeExtension' => $vendorDir . '/composer/pcre/src/PHPStan/PregMatchParameterOutTypeExtension.php',
+ 'Composer\\Pcre\\PHPStan\\PregMatchTypeSpecifyingExtension' => $vendorDir . '/composer/pcre/src/PHPStan/PregMatchTypeSpecifyingExtension.php',
+ 'Composer\\Pcre\\PHPStan\\UnsafeStrictGroupsCallRule' => $vendorDir . '/composer/pcre/src/PHPStan/UnsafeStrictGroupsCallRule.php',
'Composer\\Pcre\\PcreException' => $vendorDir . '/composer/pcre/src/PcreException.php',
'Composer\\Pcre\\Preg' => $vendorDir . '/composer/pcre/src/Preg.php',
'Composer\\Pcre\\Regex' => $vendorDir . '/composer/pcre/src/Regex.php',
@@ -2620,6 +2625,7 @@ return array(
'PhpCsFixer\\Fixer\\PhpTag\\FullOpeningTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php',
'PhpCsFixer\\Fixer\\PhpTag\\LinebreakAfterOpeningTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php',
'PhpCsFixer\\Fixer\\PhpTag\\NoClosingTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitAssertNewNamesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAssertNewNamesFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitAttributesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAttributesFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitConstructFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderNameFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php',
@@ -2784,6 +2790,7 @@ return array(
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit60MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit75MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit84MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit91MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit91MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR12RiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR12Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR1Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php',
@@ -4648,6 +4655,7 @@ return array(
'Symfony\\Component\\Process\\Exception\\LogicException' => $vendorDir . '/symfony/process/Exception/LogicException.php',
'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => $vendorDir . '/symfony/process/Exception/ProcessFailedException.php',
'Symfony\\Component\\Process\\Exception\\ProcessSignaledException' => $vendorDir . '/symfony/process/Exception/ProcessSignaledException.php',
+ 'Symfony\\Component\\Process\\Exception\\ProcessStartFailedException' => $vendorDir . '/symfony/process/Exception/ProcessStartFailedException.php',
'Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => $vendorDir . '/symfony/process/Exception/ProcessTimedOutException.php',
'Symfony\\Component\\Process\\Exception\\RunProcessFailedException' => $vendorDir . '/symfony/process/Exception/RunProcessFailedException.php',
'Symfony\\Component\\Process\\Exception\\RuntimeException' => $vendorDir . '/symfony/process/Exception/RuntimeException.php',
@@ -4688,9 +4696,7 @@ return array(
'Symfony\\Contracts\\Service\\Attribute\\Required' => $vendorDir . '/symfony/service-contracts/Attribute/Required.php',
'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => $vendorDir . '/symfony/service-contracts/Attribute/SubscribedService.php',
'Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php',
- 'Symfony\\Contracts\\Service\\ServiceCollectionInterface' => $vendorDir . '/symfony/service-contracts/ServiceCollectionInterface.php',
'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php',
- 'Symfony\\Contracts\\Service\\ServiceMethodsSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceMethodsSubscriberTrait.php',
'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php',
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index 7058c426..8c5d5eb0 100755
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -7,8 +7,8 @@ $baseDir = dirname($vendorDir);
return array(
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
- '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
+ '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index de463441..a3f9170c 100755
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -34,15 +34,15 @@ class ComposerAutoloaderInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2::$files;
- $requireFile = static function ($fileIdentifier, $file) {
+ $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
- };
+ }, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
- ($requireFile)($fileIdentifier, $file);
+ $requireFile($fileIdentifier, $file);
}
return $loader;
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 4a6b1b54..30f7c39a 100755
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -8,8 +8,8 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
- '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
+ '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
@@ -755,6 +755,11 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'Composer\\Pcre\\MatchResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchResult.php',
'Composer\\Pcre\\MatchStrictGroupsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchStrictGroupsResult.php',
'Composer\\Pcre\\MatchWithOffsetsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchWithOffsetsResult.php',
+ 'Composer\\Pcre\\PHPStan\\InvalidRegexPatternRule' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/InvalidRegexPatternRule.php',
+ 'Composer\\Pcre\\PHPStan\\PregMatchFlags' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/PregMatchFlags.php',
+ 'Composer\\Pcre\\PHPStan\\PregMatchParameterOutTypeExtension' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/PregMatchParameterOutTypeExtension.php',
+ 'Composer\\Pcre\\PHPStan\\PregMatchTypeSpecifyingExtension' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/PregMatchTypeSpecifyingExtension.php',
+ 'Composer\\Pcre\\PHPStan\\UnsafeStrictGroupsCallRule' => __DIR__ . '/..' . '/composer/pcre/src/PHPStan/UnsafeStrictGroupsCallRule.php',
'Composer\\Pcre\\PcreException' => __DIR__ . '/..' . '/composer/pcre/src/PcreException.php',
'Composer\\Pcre\\Preg' => __DIR__ . '/..' . '/composer/pcre/src/Preg.php',
'Composer\\Pcre\\Regex' => __DIR__ . '/..' . '/composer/pcre/src/Regex.php',
@@ -2958,6 +2963,7 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'PhpCsFixer\\Fixer\\PhpTag\\FullOpeningTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php',
'PhpCsFixer\\Fixer\\PhpTag\\LinebreakAfterOpeningTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php',
'PhpCsFixer\\Fixer\\PhpTag\\NoClosingTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitAssertNewNamesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAssertNewNamesFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitAttributesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAttributesFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitConstructFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php',
'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDataProviderNameFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php',
@@ -3122,6 +3128,7 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit60MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit75MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PHPUnit84MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit91MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit91MigrationRiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR12RiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR12Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php',
'PhpCsFixer\\RuleSet\\Sets\\PSR1Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php',
@@ -4986,6 +4993,7 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'Symfony\\Component\\Process\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/process/Exception/LogicException.php',
'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessFailedException.php',
'Symfony\\Component\\Process\\Exception\\ProcessSignaledException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessSignaledException.php',
+ 'Symfony\\Component\\Process\\Exception\\ProcessStartFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessStartFailedException.php',
'Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessTimedOutException.php',
'Symfony\\Component\\Process\\Exception\\RunProcessFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/RunProcessFailedException.php',
'Symfony\\Component\\Process\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/process/Exception/RuntimeException.php',
@@ -5026,9 +5034,7 @@ class ComposerStaticInitc8496d4dbcc79fa0e3d8c5678a3ba3c2
'Symfony\\Contracts\\Service\\Attribute\\Required' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/Required.php',
'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/SubscribedService.php',
'Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php',
- 'Symfony\\Contracts\\Service\\ServiceCollectionInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceCollectionInterface.php',
'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php',
- 'Symfony\\Contracts\\Service\\ServiceMethodsSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceMethodsSubscriberTrait.php',
'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php',
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 9539bd0a..4332c14c 100755
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -69,31 +69,31 @@
},
{
"name": "codeigniter/coding-standard",
- "version": "v1.8.0",
- "version_normalized": "1.8.0.0",
+ "version": "v1.8.1",
+ "version_normalized": "1.8.1.0",
"source": {
"type": "git",
"url": "https://github.com/CodeIgniter/coding-standard.git",
- "reference": "a523fd030be6360123a88655f39f0eb1650ee4bf"
+ "reference": "2c16682b4a3754bc6694fef1056f686f32298ee3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/CodeIgniter/coding-standard/zipball/a523fd030be6360123a88655f39f0eb1650ee4bf",
- "reference": "a523fd030be6360123a88655f39f0eb1650ee4bf",
+ "url": "https://api.github.com/repos/CodeIgniter/coding-standard/zipball/2c16682b4a3754bc6694fef1056f686f32298ee3",
+ "reference": "2c16682b4a3754bc6694fef1056f686f32298ee3",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "friendsofphp/php-cs-fixer": "^3.50",
- "nexusphp/cs-config": "^3.19.0",
+ "friendsofphp/php-cs-fixer": "^3.61.1",
+ "nexusphp/cs-config": "^3.24",
"php": "^8.1"
},
"require-dev": {
- "nexusphp/tachycardia": "^2.1",
- "phpstan/phpstan": "^1.0",
- "phpunit/phpunit": "^10.5"
+ "nexusphp/tachycardia": "^2.3",
+ "phpstan/phpstan": "^1.11",
+ "phpunit/phpunit": "^10.5 || ^11.2"
},
- "time": "2024-06-16T15:51:42+00:00",
+ "time": "2024-08-05T11:17:44+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -126,32 +126,40 @@
},
{
"name": "composer/pcre",
- "version": "3.1.4",
- "version_normalized": "3.1.4.0",
+ "version": "3.2.0",
+ "version_normalized": "3.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
- "reference": "04229f163664973f68f38f6f73d917799168ef24"
+ "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24",
- "reference": "04229f163664973f68f38f6f73d917799168ef24",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/ea4ab6f9580a4fd221e0418f2c357cdd39102a90",
+ "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
- "require-dev": {
- "phpstan/phpstan": "^1.3",
- "phpstan/phpstan-strict-rules": "^1.1",
- "symfony/phpunit-bridge": "^5"
+ "conflict": {
+ "phpstan/phpstan": "<1.11.8"
},
- "time": "2024-05-27T13:40:54+00:00",
+ "require-dev": {
+ "phpstan/phpstan": "^1.11.8",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "phpunit/phpunit": "^8 || ^9"
+ },
+ "time": "2024-07-25T09:36:02+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
+ },
+ "phpstan": {
+ "includes": [
+ "extension.neon"
+ ]
}
},
"installation-source": "dist",
@@ -180,7 +188,7 @@
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
- "source": "https://github.com/composer/pcre/tree/3.1.4"
+ "source": "https://github.com/composer/pcre/tree/3.2.0"
},
"funding": [
{
@@ -533,17 +541,17 @@
},
{
"name": "friendsofphp/php-cs-fixer",
- "version": "v3.59.3",
- "version_normalized": "3.59.3.0",
+ "version": "v3.62.0",
+ "version_normalized": "3.62.0.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
- "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29"
+ "reference": "627692f794d35c43483f34b01d94740df2a73507"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/30ba9ecc2b0e5205e578fe29973c15653d9bfd29",
- "reference": "30ba9ecc2b0e5205e578fe29973c15653d9bfd29",
+ "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/627692f794d35c43483f34b01d94740df2a73507",
+ "reference": "627692f794d35c43483f34b01d94740df2a73507",
"shasum": ""
},
"require": {
@@ -590,7 +598,7 @@
"ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters."
},
- "time": "2024-06-16T14:17:03+00:00",
+ "time": "2024-08-07T17:03:09+00:00",
"bin": [
"php-cs-fixer"
],
@@ -627,7 +635,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
- "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.59.3"
+ "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.62.0"
},
"funding": [
{
@@ -1268,22 +1276,22 @@
},
{
"name": "nexusphp/cs-config",
- "version": "v3.23.1",
- "version_normalized": "3.23.1.0",
+ "version": "v3.24.0",
+ "version_normalized": "3.24.0.0",
"source": {
"type": "git",
"url": "https://github.com/NexusPHP/cs-config.git",
- "reference": "323c8ca9c86a85d8cf9990e95079a7734bfbf4e6"
+ "reference": "fd0fdb458cbf42ba636a2ed218530b335421f33f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/NexusPHP/cs-config/zipball/323c8ca9c86a85d8cf9990e95079a7734bfbf4e6",
- "reference": "323c8ca9c86a85d8cf9990e95079a7734bfbf4e6",
+ "url": "https://api.github.com/repos/NexusPHP/cs-config/zipball/fd0fdb458cbf42ba636a2ed218530b335421f33f",
+ "reference": "fd0fdb458cbf42ba636a2ed218530b335421f33f",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "friendsofphp/php-cs-fixer": "^3.57.1",
+ "friendsofphp/php-cs-fixer": "^3.60",
"php": "^8.1"
},
"conflict": {
@@ -1297,13 +1305,8 @@
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "^10.5 || ^11.0"
},
- "time": "2024-06-16T15:46:10+00:00",
+ "time": "2024-07-28T15:59:18+00:00",
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-develop": "3.x-dev"
- }
- },
"installation-source": "dist",
"autoload": {
"psr-4": {
@@ -1568,17 +1571,17 @@
},
{
"name": "phpoffice/phpspreadsheet",
- "version": "2.2.0",
- "version_normalized": "2.2.0.0",
+ "version": "2.2.2",
+ "version_normalized": "2.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
- "reference": "b0993b7e4d9c860133365d115b176bc6e0f57022"
+ "reference": "ffbcee68069b073bff07a71eb321dcd9f2763513"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/b0993b7e4d9c860133365d115b176bc6e0f57022",
- "reference": "b0993b7e4d9c860133365d115b176bc6e0f57022",
+ "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/ffbcee68069b073bff07a71eb321dcd9f2763513",
+ "reference": "ffbcee68069b073bff07a71eb321dcd9f2763513",
"shasum": ""
},
"require": {
@@ -1623,7 +1626,7 @@
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
},
- "time": "2024-07-24T13:21:18+00:00",
+ "time": "2024-08-08T02:31:26+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -1669,7 +1672,7 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
- "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.2.0"
+ "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.2.2"
},
"install-path": "../phpoffice/phpspreadsheet"
},
@@ -2011,17 +2014,17 @@
},
{
"name": "phpunit/phpunit",
- "version": "10.5.28",
- "version_normalized": "10.5.28.0",
+ "version": "10.5.29",
+ "version_normalized": "10.5.29.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "ff7fb85cdf88131b83e721fb2a327b664dbed275"
+ "reference": "8e9e80872b4e8064401788ee8a32d40b4455318f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ff7fb85cdf88131b83e721fb2a327b664dbed275",
- "reference": "ff7fb85cdf88131b83e721fb2a327b664dbed275",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e9e80872b4e8064401788ee8a32d40b4455318f",
+ "reference": "8e9e80872b4e8064401788ee8a32d40b4455318f",
"shasum": ""
},
"require": {
@@ -2055,7 +2058,7 @@
"suggest": {
"ext-soap": "To be able to generate mocks based on WSDL files"
},
- "time": "2024-07-18T14:54:16+00:00",
+ "time": "2024-07-30T11:08:00+00:00",
"bin": [
"phpunit"
],
@@ -2095,7 +2098,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.28"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.29"
},
"funding": [
{
@@ -2951,34 +2954,34 @@
},
{
"name": "react/socket",
- "version": "v1.15.0",
- "version_normalized": "1.15.0.0",
+ "version": "v1.16.0",
+ "version_normalized": "1.16.0.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/socket.git",
- "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038"
+ "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038",
- "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038",
+ "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1",
+ "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1",
"shasum": ""
},
"require": {
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"php": ">=5.3.0",
- "react/dns": "^1.11",
+ "react/dns": "^1.13",
"react/event-loop": "^1.2",
- "react/promise": "^3 || ^2.6 || ^1.2.1",
- "react/stream": "^1.2"
+ "react/promise": "^3.2 || ^2.6 || ^1.2.1",
+ "react/stream": "^1.4"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
- "react/async": "^4 || ^3 || ^2",
+ "react/async": "^4.3 || ^3.3 || ^2",
"react/promise-stream": "^1.4",
- "react/promise-timer": "^1.10"
+ "react/promise-timer": "^1.11"
},
- "time": "2023-12-15T11:02:10+00:00",
+ "time": "2024-07-26T10:38:09+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -3022,7 +3025,7 @@
],
"support": {
"issues": "https://github.com/reactphp/socket/issues",
- "source": "https://github.com/reactphp/socket/tree/v1.15.0"
+ "source": "https://github.com/reactphp/socket/tree/v1.16.0"
},
"funding": [
{
@@ -3292,17 +3295,17 @@
},
{
"name": "sebastian/comparator",
- "version": "5.0.1",
- "version_normalized": "5.0.1.0",
+ "version": "5.0.2",
+ "version_normalized": "5.0.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "2db5010a484d53ebf536087a70b4a5423c102372"
+ "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372",
- "reference": "2db5010a484d53ebf536087a70b4a5423c102372",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
+ "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53",
"shasum": ""
},
"require": {
@@ -3313,9 +3316,9 @@
"sebastian/exporter": "^5.0"
},
"require-dev": {
- "phpunit/phpunit": "^10.3"
+ "phpunit/phpunit": "^10.4"
},
- "time": "2023-08-14T13:18:12+00:00",
+ "time": "2024-08-12T06:03:08+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -3360,7 +3363,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"security": "https://github.com/sebastianbergmann/comparator/security/policy",
- "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1"
+ "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2"
},
"funding": [
{
@@ -4151,50 +4154,49 @@
},
{
"name": "symfony/console",
- "version": "v6.4.9",
- "version_normalized": "6.4.9.0",
+ "version": "v7.1.3",
+ "version_normalized": "7.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9"
+ "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9",
- "reference": "6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9",
+ "url": "https://api.github.com/repos/symfony/console/zipball/cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9",
+ "reference": "cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9",
"shasum": ""
},
"require": {
- "php": ">=8.1",
- "symfony/deprecation-contracts": "^2.5|^3",
+ "php": ">=8.2",
"symfony/polyfill-mbstring": "~1.0",
"symfony/service-contracts": "^2.5|^3",
- "symfony/string": "^5.4|^6.0|^7.0"
+ "symfony/string": "^6.4|^7.0"
},
"conflict": {
- "symfony/dependency-injection": "<5.4",
- "symfony/dotenv": "<5.4",
- "symfony/event-dispatcher": "<5.4",
- "symfony/lock": "<5.4",
- "symfony/process": "<5.4"
+ "symfony/dependency-injection": "<6.4",
+ "symfony/dotenv": "<6.4",
+ "symfony/event-dispatcher": "<6.4",
+ "symfony/lock": "<6.4",
+ "symfony/process": "<6.4"
},
"provide": {
"psr/log-implementation": "1.0|2.0|3.0"
},
"require-dev": {
"psr/log": "^1|^2|^3",
- "symfony/config": "^5.4|^6.0|^7.0",
- "symfony/dependency-injection": "^5.4|^6.0|^7.0",
- "symfony/event-dispatcher": "^5.4|^6.0|^7.0",
+ "symfony/config": "^6.4|^7.0",
+ "symfony/dependency-injection": "^6.4|^7.0",
+ "symfony/event-dispatcher": "^6.4|^7.0",
"symfony/http-foundation": "^6.4|^7.0",
"symfony/http-kernel": "^6.4|^7.0",
- "symfony/lock": "^5.4|^6.0|^7.0",
- "symfony/messenger": "^5.4|^6.0|^7.0",
- "symfony/process": "^5.4|^6.0|^7.0",
- "symfony/stopwatch": "^5.4|^6.0|^7.0",
- "symfony/var-dumper": "^5.4|^6.0|^7.0"
+ "symfony/lock": "^6.4|^7.0",
+ "symfony/messenger": "^6.4|^7.0",
+ "symfony/process": "^6.4|^7.0",
+ "symfony/stopwatch": "^6.4|^7.0",
+ "symfony/var-dumper": "^6.4|^7.0"
},
- "time": "2024-06-28T09:49:33+00:00",
+ "time": "2024-07-26T12:41:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4228,7 +4230,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v6.4.9"
+ "source": "https://github.com/symfony/console/tree/v7.1.3"
},
"funding": [
{
@@ -4318,25 +4320,25 @@
},
{
"name": "symfony/event-dispatcher",
- "version": "v6.4.8",
- "version_normalized": "6.4.8.0",
+ "version": "v7.1.1",
+ "version_normalized": "7.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b"
+ "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8d7507f02b06e06815e56bb39aa0128e3806208b",
- "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7",
+ "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/event-dispatcher-contracts": "^2.5|^3"
},
"conflict": {
- "symfony/dependency-injection": "<5.4",
+ "symfony/dependency-injection": "<6.4",
"symfony/service-contracts": "<2.5"
},
"provide": {
@@ -4345,15 +4347,15 @@
},
"require-dev": {
"psr/log": "^1|^2|^3",
- "symfony/config": "^5.4|^6.0|^7.0",
- "symfony/dependency-injection": "^5.4|^6.0|^7.0",
- "symfony/error-handler": "^5.4|^6.0|^7.0",
- "symfony/expression-language": "^5.4|^6.0|^7.0",
- "symfony/http-foundation": "^5.4|^6.0|^7.0",
+ "symfony/config": "^6.4|^7.0",
+ "symfony/dependency-injection": "^6.4|^7.0",
+ "symfony/error-handler": "^6.4|^7.0",
+ "symfony/expression-language": "^6.4|^7.0",
+ "symfony/http-foundation": "^6.4|^7.0",
"symfony/service-contracts": "^2.5|^3",
- "symfony/stopwatch": "^5.4|^6.0|^7.0"
+ "symfony/stopwatch": "^6.4|^7.0"
},
- "time": "2024-05-31T14:49:08+00:00",
+ "time": "2024-05-31T14:57:53+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4381,7 +4383,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.8"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1"
},
"funding": [
{
@@ -4480,28 +4482,28 @@
},
{
"name": "symfony/filesystem",
- "version": "v6.4.9",
- "version_normalized": "6.4.9.0",
+ "version": "v7.1.2",
+ "version_normalized": "7.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "b51ef8059159330b74a4d52f68e671033c0fe463"
+ "reference": "92a91985250c251de9b947a14bb2c9390b1a562c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/b51ef8059159330b74a4d52f68e671033c0fe463",
- "reference": "b51ef8059159330b74a4d52f68e671033c0fe463",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/92a91985250c251de9b947a14bb2c9390b1a562c",
+ "reference": "92a91985250c251de9b947a14bb2c9390b1a562c",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.8"
},
"require-dev": {
- "symfony/process": "^5.4|^6.4|^7.0"
+ "symfony/process": "^6.4|^7.0"
},
- "time": "2024-06-28T09:49:33+00:00",
+ "time": "2024-06-28T10:03:55+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4529,7 +4531,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v6.4.9"
+ "source": "https://github.com/symfony/filesystem/tree/v7.1.2"
},
"funding": [
{
@@ -4549,26 +4551,26 @@
},
{
"name": "symfony/finder",
- "version": "v6.4.8",
- "version_normalized": "6.4.8.0",
+ "version": "v7.1.3",
+ "version_normalized": "7.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "3ef977a43883215d560a2cecb82ec8e62131471c"
+ "reference": "717c6329886f32dc65e27461f80f2a465412fdca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/3ef977a43883215d560a2cecb82ec8e62131471c",
- "reference": "3ef977a43883215d560a2cecb82ec8e62131471c",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/717c6329886f32dc65e27461f80f2a465412fdca",
+ "reference": "717c6329886f32dc65e27461f80f2a465412fdca",
"shasum": ""
},
"require": {
- "php": ">=8.1"
+ "php": ">=8.2"
},
"require-dev": {
- "symfony/filesystem": "^6.0|^7.0"
+ "symfony/filesystem": "^6.4|^7.0"
},
- "time": "2024-05-31T14:49:08+00:00",
+ "time": "2024-07-24T07:08:44+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4596,7 +4598,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v6.4.8"
+ "source": "https://github.com/symfony/finder/tree/v7.1.3"
},
"funding": [
{
@@ -4616,24 +4618,24 @@
},
{
"name": "symfony/options-resolver",
- "version": "v6.4.8",
- "version_normalized": "6.4.8.0",
+ "version": "v7.1.1",
+ "version_normalized": "7.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
- "reference": "22ab9e9101ab18de37839074f8a1197f55590c1b"
+ "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/22ab9e9101ab18de37839074f8a1197f55590c1b",
- "reference": "22ab9e9101ab18de37839074f8a1197f55590c1b",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55",
+ "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3"
},
- "time": "2024-05-31T14:49:08+00:00",
+ "time": "2024-05-31T14:57:53+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4666,7 +4668,7 @@
"options"
],
"support": {
- "source": "https://github.com/symfony/options-resolver/tree/v6.4.8"
+ "source": "https://github.com/symfony/options-resolver/tree/v7.1.1"
},
"funding": [
{
@@ -5178,23 +5180,23 @@
},
{
"name": "symfony/process",
- "version": "v6.4.8",
- "version_normalized": "6.4.8.0",
+ "version": "v7.1.3",
+ "version_normalized": "7.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5"
+ "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/8d92dd79149f29e89ee0f480254db595f6a6a2c5",
- "reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5",
+ "url": "https://api.github.com/repos/symfony/process/zipball/7f2f542c668ad6c313dc4a5e9c3321f733197eca",
+ "reference": "7f2f542c668ad6c313dc4a5e9c3321f733197eca",
"shasum": ""
},
"require": {
- "php": ">=8.1"
+ "php": ">=8.2"
},
- "time": "2024-05-31T14:49:08+00:00",
+ "time": "2024-07-26T12:44:47+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5222,7 +5224,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v6.4.8"
+ "source": "https://github.com/symfony/process/tree/v7.1.3"
},
"funding": [
{
@@ -5328,24 +5330,24 @@
},
{
"name": "symfony/stopwatch",
- "version": "v6.4.8",
- "version_normalized": "6.4.8.0",
+ "version": "v7.1.1",
+ "version_normalized": "7.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "63e069eb616049632cde9674c46957819454b8aa"
+ "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/63e069eb616049632cde9674c46957819454b8aa",
- "reference": "63e069eb616049632cde9674c46957819454b8aa",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d",
+ "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/service-contracts": "^2.5|^3"
},
- "time": "2024-05-31T14:49:08+00:00",
+ "time": "2024-05-31T14:57:53+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5373,7 +5375,7 @@
"description": "Provides a way to profile code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/stopwatch/tree/v6.4.8"
+ "source": "https://github.com/symfony/stopwatch/tree/v7.1.1"
},
"funding": [
{
@@ -5393,21 +5395,21 @@
},
{
"name": "symfony/string",
- "version": "v6.4.9",
- "version_normalized": "6.4.9.0",
+ "version": "v7.1.3",
+ "version_normalized": "7.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "76792dbd99690a5ebef8050d9206c60c59e681d7"
+ "reference": "ea272a882be7f20cad58d5d78c215001617b7f07"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/76792dbd99690a5ebef8050d9206c60c59e681d7",
- "reference": "76792dbd99690a5ebef8050d9206c60c59e681d7",
+ "url": "https://api.github.com/repos/symfony/string/zipball/ea272a882be7f20cad58d5d78c215001617b7f07",
+ "reference": "ea272a882be7f20cad58d5d78c215001617b7f07",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0",
@@ -5417,13 +5419,14 @@
"symfony/translation-contracts": "<2.5"
},
"require-dev": {
- "symfony/error-handler": "^5.4|^6.0|^7.0",
- "symfony/http-client": "^5.4|^6.0|^7.0",
- "symfony/intl": "^6.2|^7.0",
+ "symfony/emoji": "^7.1",
+ "symfony/error-handler": "^6.4|^7.0",
+ "symfony/http-client": "^6.4|^7.0",
+ "symfony/intl": "^6.4|^7.0",
"symfony/translation-contracts": "^2.5|^3.0",
- "symfony/var-exporter": "^5.4|^6.0|^7.0"
+ "symfony/var-exporter": "^6.4|^7.0"
},
- "time": "2024-06-28T09:25:38+00:00",
+ "time": "2024-07-22T10:25:37+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -5462,7 +5465,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v6.4.9"
+ "source": "https://github.com/symfony/string/tree/v7.1.3"
},
"funding": [
{
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 07c953c7..47567732 100755
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'codeigniter4/framework',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'bbb89d27e6e055d07faa359bddec81032352d85e',
+ 'reference' => 'c3e7e73142fef1433a98d1a53c3a9650bd01e896',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -20,9 +20,9 @@
'dev_requirement' => true,
),
'codeigniter/coding-standard' => array(
- 'pretty_version' => 'v1.8.0',
- 'version' => '1.8.0.0',
- 'reference' => 'a523fd030be6360123a88655f39f0eb1650ee4bf',
+ 'pretty_version' => 'v1.8.1',
+ 'version' => '1.8.1.0',
+ 'reference' => '2c16682b4a3754bc6694fef1056f686f32298ee3',
'type' => 'library',
'install_path' => __DIR__ . '/../codeigniter/coding-standard',
'aliases' => array(),
@@ -31,16 +31,16 @@
'codeigniter4/framework' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'bbb89d27e6e055d07faa359bddec81032352d85e',
+ 'reference' => 'c3e7e73142fef1433a98d1a53c3a9650bd01e896',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'composer/pcre' => array(
- 'pretty_version' => '3.1.4',
- 'version' => '3.1.4.0',
- 'reference' => '04229f163664973f68f38f6f73d917799168ef24',
+ 'pretty_version' => '3.2.0',
+ 'version' => '3.2.0.0',
+ 'reference' => 'ea4ab6f9580a4fd221e0418f2c357cdd39102a90',
'type' => 'library',
'install_path' => __DIR__ . '/./pcre',
'aliases' => array(),
@@ -92,9 +92,9 @@
'dev_requirement' => true,
),
'friendsofphp/php-cs-fixer' => array(
- 'pretty_version' => 'v3.59.3',
- 'version' => '3.59.3.0',
- 'reference' => '30ba9ecc2b0e5205e578fe29973c15653d9bfd29',
+ 'pretty_version' => 'v3.62.0',
+ 'version' => '3.62.0.0',
+ 'reference' => '627692f794d35c43483f34b01d94740df2a73507',
'type' => 'application',
'install_path' => __DIR__ . '/../friendsofphp/php-cs-fixer',
'aliases' => array(),
@@ -191,9 +191,9 @@
'dev_requirement' => false,
),
'nexusphp/cs-config' => array(
- 'pretty_version' => 'v3.23.1',
- 'version' => '3.23.1.0',
- 'reference' => '323c8ca9c86a85d8cf9990e95079a7734bfbf4e6',
+ 'pretty_version' => 'v3.24.0',
+ 'version' => '3.24.0.0',
+ 'reference' => 'fd0fdb458cbf42ba636a2ed218530b335421f33f',
'type' => 'library',
'install_path' => __DIR__ . '/../nexusphp/cs-config',
'aliases' => array(),
@@ -236,9 +236,9 @@
'dev_requirement' => true,
),
'phpoffice/phpspreadsheet' => array(
- 'pretty_version' => '2.2.0',
- 'version' => '2.2.0.0',
- 'reference' => 'b0993b7e4d9c860133365d115b176bc6e0f57022',
+ 'pretty_version' => '2.2.2',
+ 'version' => '2.2.2.0',
+ 'reference' => 'ffbcee68069b073bff07a71eb321dcd9f2763513',
'type' => 'library',
'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet',
'aliases' => array(),
@@ -290,9 +290,9 @@
'dev_requirement' => true,
),
'phpunit/phpunit' => array(
- 'pretty_version' => '10.5.28',
- 'version' => '10.5.28.0',
- 'reference' => 'ff7fb85cdf88131b83e721fb2a327b664dbed275',
+ 'pretty_version' => '10.5.29',
+ 'version' => '10.5.29.0',
+ 'reference' => '8e9e80872b4e8064401788ee8a32d40b4455318f',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(),
@@ -428,9 +428,9 @@
'dev_requirement' => true,
),
'react/socket' => array(
- 'pretty_version' => 'v1.15.0',
- 'version' => '1.15.0.0',
- 'reference' => '216d3aec0b87f04a40ca04f481e6af01bdd1d038',
+ 'pretty_version' => 'v1.16.0',
+ 'version' => '1.16.0.0',
+ 'reference' => '23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1',
'type' => 'library',
'install_path' => __DIR__ . '/../react/socket',
'aliases' => array(),
@@ -473,9 +473,9 @@
'dev_requirement' => true,
),
'sebastian/comparator' => array(
- 'pretty_version' => '5.0.1',
- 'version' => '5.0.1.0',
- 'reference' => '2db5010a484d53ebf536087a70b4a5423c102372',
+ 'pretty_version' => '5.0.2',
+ 'version' => '5.0.2.0',
+ 'reference' => '2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/comparator',
'aliases' => array(),
@@ -590,9 +590,9 @@
'dev_requirement' => false,
),
'symfony/console' => array(
- 'pretty_version' => 'v6.4.9',
- 'version' => '6.4.9.0',
- 'reference' => '6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9',
+ 'pretty_version' => 'v7.1.3',
+ 'version' => '7.1.3.0',
+ 'reference' => 'cb1dcb30ebc7005c29864ee78adb47b5fb7c3cd9',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/console',
'aliases' => array(),
@@ -608,9 +608,9 @@
'dev_requirement' => true,
),
'symfony/event-dispatcher' => array(
- 'pretty_version' => 'v6.4.8',
- 'version' => '6.4.8.0',
- 'reference' => '8d7507f02b06e06815e56bb39aa0128e3806208b',
+ 'pretty_version' => 'v7.1.1',
+ 'version' => '7.1.1.0',
+ 'reference' => '9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/event-dispatcher',
'aliases' => array(),
@@ -632,27 +632,27 @@
),
),
'symfony/filesystem' => array(
- 'pretty_version' => 'v6.4.9',
- 'version' => '6.4.9.0',
- 'reference' => 'b51ef8059159330b74a4d52f68e671033c0fe463',
+ 'pretty_version' => 'v7.1.2',
+ 'version' => '7.1.2.0',
+ 'reference' => '92a91985250c251de9b947a14bb2c9390b1a562c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/filesystem',
'aliases' => array(),
'dev_requirement' => true,
),
'symfony/finder' => array(
- 'pretty_version' => 'v6.4.8',
- 'version' => '6.4.8.0',
- 'reference' => '3ef977a43883215d560a2cecb82ec8e62131471c',
+ 'pretty_version' => 'v7.1.3',
+ 'version' => '7.1.3.0',
+ 'reference' => '717c6329886f32dc65e27461f80f2a465412fdca',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/finder',
'aliases' => array(),
'dev_requirement' => true,
),
'symfony/options-resolver' => array(
- 'pretty_version' => 'v6.4.8',
- 'version' => '6.4.8.0',
- 'reference' => '22ab9e9101ab18de37839074f8a1197f55590c1b',
+ 'pretty_version' => 'v7.1.1',
+ 'version' => '7.1.1.0',
+ 'reference' => '47aa818121ed3950acd2b58d1d37d08a94f9bf55',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/options-resolver',
'aliases' => array(),
@@ -713,9 +713,9 @@
'dev_requirement' => true,
),
'symfony/process' => array(
- 'pretty_version' => 'v6.4.8',
- 'version' => '6.4.8.0',
- 'reference' => '8d92dd79149f29e89ee0f480254db595f6a6a2c5',
+ 'pretty_version' => 'v7.1.3',
+ 'version' => '7.1.3.0',
+ 'reference' => '7f2f542c668ad6c313dc4a5e9c3321f733197eca',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/process',
'aliases' => array(),
@@ -731,18 +731,18 @@
'dev_requirement' => true,
),
'symfony/stopwatch' => array(
- 'pretty_version' => 'v6.4.8',
- 'version' => '6.4.8.0',
- 'reference' => '63e069eb616049632cde9674c46957819454b8aa',
+ 'pretty_version' => 'v7.1.1',
+ 'version' => '7.1.1.0',
+ 'reference' => '5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/stopwatch',
'aliases' => array(),
'dev_requirement' => true,
),
'symfony/string' => array(
- 'pretty_version' => 'v6.4.9',
- 'version' => '6.4.9.0',
- 'reference' => '76792dbd99690a5ebef8050d9206c60c59e681d7',
+ 'pretty_version' => 'v7.1.3',
+ 'version' => '7.1.3.0',
+ 'reference' => 'ea272a882be7f20cad58d5d78c215001617b7f07',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/string',
'aliases' => array(),
diff --git a/vendor/composer/pcre/README.md b/vendor/composer/pcre/README.md
index 973b17d8..49065149 100755
--- a/vendor/composer/pcre/README.md
+++ b/vendor/composer/pcre/README.md
@@ -12,7 +12,8 @@ to understand the implications.
It thus makes it easier to work with static analysis tools like PHPStan or Psalm as it
simplifies and reduces the possible return values from all the `preg_*` functions which
-are quite packed with edge cases.
+are quite packed with edge cases. As of v2.2.0 / v3.2.0 the library also comes with a
+[PHPStan extension](#phpstan-extension) for parsing regular expressions and giving you even better output types.
This library is a thin wrapper around `preg_*` functions with [some limitations](#restrictions--limitations).
If you are looking for a richer API to handle regular expressions have a look at
@@ -175,6 +176,13 @@ preg_match('/(a)(b)*(c)(d)*/', 'ac', $matches, $flags);
| group 2 (any unmatched group preceding one that matched) is set to `''`. You cannot tell if it matched an empty string or did not match at all | group 2 is `null` when unmatched and a string if it matched, easy to check for |
| group 4 (any optional group without a matching one following) is missing altogether. So you have to check with `isset()`, but really you want `isset($m[4]) && $m[4] !== ''` for safety unless you are very careful to check that a non-optional group follows it | group 4 is always set, and null in this case as there was no match, easy to check for with `$m[4] !== null` |
+PHPStan Extension
+-----------------
+
+To use the PHPStan extension if you do not use `phpstan/extension-installer` you can include `vendor/composer/pcre/extension.neon` in your PHPStan config.
+
+The extension provides much better type information for $matches as well as regex validation where possible.
+
License
-------
diff --git a/vendor/composer/pcre/composer.json b/vendor/composer/pcre/composer.json
index 40477ff4..9e827a9e 100755
--- a/vendor/composer/pcre/composer.json
+++ b/vendor/composer/pcre/composer.json
@@ -20,10 +20,13 @@
"php": "^7.4 || ^8.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "^5",
- "phpstan/phpstan": "^1.3",
+ "phpunit/phpunit": "^8 || ^9",
+ "phpstan/phpstan": "^1.11.8",
"phpstan/phpstan-strict-rules": "^1.1"
},
+ "conflict": {
+ "phpstan/phpstan": "<1.11.8"
+ },
"autoload": {
"psr-4": {
"Composer\\Pcre\\": "src"
@@ -37,10 +40,15 @@
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
+ },
+ "phpstan": {
+ "includes": [
+ "extension.neon"
+ ]
}
},
"scripts": {
- "test": "vendor/bin/simple-phpunit",
- "phpstan": "phpstan analyse"
+ "test": "@php vendor/bin/phpunit",
+ "phpstan": "@php phpstan analyse"
}
}
diff --git a/vendor/composer/pcre/src/Regex.php b/vendor/composer/pcre/src/Regex.php
index 21564a47..038cf069 100755
--- a/vendor/composer/pcre/src/Regex.php
+++ b/vendor/composer/pcre/src/Regex.php
@@ -43,6 +43,7 @@ class Regex
*/
public static function matchStrictGroups(string $pattern, string $subject, int $flags = 0, int $offset = 0): MatchStrictGroupsResult
{
+ // @phpstan-ignore composerPcre.maybeUnsafeStrictGroups
$count = Preg::matchStrictGroups($pattern, $subject, $matches, $flags, $offset);
return new MatchStrictGroupsResult($count, $matches);
@@ -87,6 +88,7 @@ class Regex
self::checkOffsetCapture($flags, 'matchAllWithOffsets');
self::checkSetOrder($flags);
+ // @phpstan-ignore composerPcre.maybeUnsafeStrictGroups
$count = Preg::matchAllStrictGroups($pattern, $subject, $matches, $flags, $offset);
return new MatchAllStrictGroupsResult($count, $matches);
diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php
index 4c3a5d68..f71b2f89 100755
--- a/vendor/composer/platform_check.php
+++ b/vendor/composer/platform_check.php
@@ -8,6 +8,10 @@ if (!(PHP_VERSION_ID >= 80100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}
+if (PHP_INT_SIZE !== 8) {
+ $issues[] = 'Your Composer dependencies require a 64-bit build of PHP.';
+}
+
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
diff --git a/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md b/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md
index d3de6e45..19555be2 100755
--- a/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md
+++ b/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md
@@ -3,6 +3,56 @@ CHANGELOG for PHP CS Fixer
This file contains changelogs for stable releases only.
+Changelog for v3.62.0
+---------------------
+
+* feat: set new_with_parentheses for anonymous_class to false in PER-CS2.0 (#8140)
+* chore: NewWithParenthesesFixer - create TODO to change the default configuration to match PER-CS2 (#8148)
+
+Changelog for v3.61.1
+---------------------
+
+* fix: `NoSuperfluousPhpdocTagsFixer` - fix "Undefined array key 0" error (#8150)
+
+Changelog for v3.61.0
+---------------------
+
+* feat: no_superfluous_phpdoc_tags - also cover ?type (#8125)
+* feat: support PHPUnit v9.1 naming for some asserts (#7997)
+* fix: Do not mangle non-whitespace token in `PhpdocIndentFixer` (#8147)
+* DX: add more typehints for `class-string` (#8139)
+* DX: refactor `ProjectCodeTest::provideDataProviderMethodCases` (#8138)
+
+Changelog for v3.60.0
+---------------------
+
+* feat: Add sprintf in the list of compiler optimized functions (#8092)
+* feat: `PhpUnitAttributesFixer` - add option to keep annotations (#8090)
+* chore: cleanup tests that had `@requires PHP 7.4` ages ago (#8122)
+* chore: cleanup `TokensAnalyzerTest` (#8123)
+* chore: fix example issue reported by reportPossiblyNonexistentGeneralArrayOffset from PHPStan (#8089)
+* chore: NoSuperfluousPhpdocTagsFixer - no need to call heavy toComparableNames method to add null type (#8132)
+* chore: PHPStan 11 array rules (#8011)
+* chore: PhpUnitSizeClassFixerTest - solve PHP 8.4 issues (#8105)
+* chore: reduce PHPStan errors in PhpUnitAttributesFixer (#8091)
+* chore: reuse test methods (#8119)
+* CI: check autoload (#8121)
+* CI: Update PHPStan to 1.11.8 (#8133)
+* deps: upgrade dev-tools (#8102)
+* DX: check for duplicated test data (#8131)
+* DX: check for duplicated test methods (#8124)
+* DX: check for duplicated test methods (as AutoReview test) (#8134)
+* DX: do not exclude duplicates that are clearly mistakes (#8135)
+* DX: Dump `offsetAccess.notFound` errors to baseline (#8107)
+* fix: Better way of walking types in `TypeExpression` (#8076)
+* fix: CI for PHP 8.4 (#8114)
+* fix: update `TokensTest` to shrink PHPStan's baseline (#8112)
+* fix: `no_useless_concat_operator` - do not break variable (2) (#7927)
+* fix: `NullableTypeDeclarationFixer` - don't convert standalone `null` into nullable union type (#8098)
+* fix: `NullableTypeDeclarationFixer` - don't convert standalone `NULL` into nullable union type (#8111)
+* fix: `NullableTypeDeclarationFixer` - insert correct token (#8118)
+* fix: `PhpUnitAttributesFixer` - handle multiple annotations of the same name (#8075)
+
Changelog for v3.59.3
---------------------
diff --git a/vendor/friendsofphp/php-cs-fixer/composer.json b/vendor/friendsofphp/php-cs-fixer/composer.json
index f291eb3a..f1060586 100755
--- a/vendor/friendsofphp/php-cs-fixer/composer.json
+++ b/vendor/friendsofphp/php-cs-fixer/composer.json
@@ -74,7 +74,10 @@
"autoload-dev": {
"psr-4": {
"PhpCsFixer\\Tests\\": "tests/"
- }
+ },
+ "exclude-from-classmap": [
+ "tests/Fixtures/"
+ ]
},
"bin": [
"php-cs-fixer"
@@ -124,6 +127,7 @@
"self-check": [
"./dev-tools/check_file_permissions.sh",
"./dev-tools/check_trailing_spaces.sh",
+ "@composer dump-autoload --dry-run --optimize --strict-psr",
"@normalize",
"@unused-deps",
"@require-checker",
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/Cache.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/Cache.php
index 1f53fd2b..29976749 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Cache/Cache.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/Cache.php
@@ -76,7 +76,7 @@ final class Cache implements CacheInterface
]);
if (JSON_ERROR_NONE !== json_last_error() || false === $json) {
- throw new \UnexpectedValueException(sprintf(
+ throw new \UnexpectedValueException(\sprintf(
'Cannot encode cache signature to JSON, error: "%s". If you have non-UTF8 chars in your signature, like in license for `header_comment`, consider enabling `ext-mbstring` or install `symfony/polyfill-mbstring`.',
json_last_error_msg()
));
@@ -93,7 +93,7 @@ final class Cache implements CacheInterface
$data = json_decode($json, true);
if (null === $data && JSON_ERROR_NONE !== json_last_error()) {
- throw new \InvalidArgumentException(sprintf(
+ throw new \InvalidArgumentException(\sprintf(
'Value needs to be a valid JSON string, got "%s", error: "%s".',
$json,
json_last_error_msg()
@@ -112,7 +112,7 @@ final class Cache implements CacheInterface
$missingKeys = array_diff_key(array_flip($requiredKeys), $data);
if (\count($missingKeys) > 0) {
- throw new \InvalidArgumentException(sprintf(
+ throw new \InvalidArgumentException(\sprintf(
'JSON data is missing keys %s',
Utils::naturalLanguageJoin(array_keys($missingKeys))
));
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php
index 51b4ca58..a1b83ed7 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php
@@ -140,7 +140,7 @@ final class FileHandler implements FileHandlerInterface
if ($this->fileInfo->isDir()) {
throw new IOException(
- sprintf('Cannot write cache file "%s" as the location exists as directory.', $this->fileInfo->getRealPath()),
+ \sprintf('Cannot write cache file "%s" as the location exists as directory.', $this->fileInfo->getRealPath()),
0,
null,
$this->fileInfo->getPathname()
@@ -149,7 +149,7 @@ final class FileHandler implements FileHandlerInterface
if ($this->fileInfo->isFile() && !$this->fileInfo->isWritable()) {
throw new IOException(
- sprintf('Cannot write to file "%s" as it is not writable.', $this->fileInfo->getRealPath()),
+ \sprintf('Cannot write to file "%s" as it is not writable.', $this->fileInfo->getRealPath()),
0,
null,
$this->fileInfo->getPathname()
@@ -171,7 +171,7 @@ final class FileHandler implements FileHandlerInterface
if (!@is_dir($dir)) {
throw new IOException(
- sprintf('Directory of cache file "%s" does not exists and couldn\'t be created.', $file),
+ \sprintf('Directory of cache file "%s" does not exists and couldn\'t be created.', $file),
0,
null,
$file
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php
index 140385c3..8607bbfa 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php
@@ -30,7 +30,7 @@ class InvalidFixerConfigurationException extends InvalidConfigurationException
public function __construct(string $fixerName, string $message, ?\Throwable $previous = null)
{
parent::__construct(
- sprintf('[%s] %s', $fixerName, $message),
+ \sprintf('[%s] %s', $fixerName, $message),
FixCommandExitStatusCalculator::EXIT_STATUS_FLAG_HAS_INVALID_FIXER_CONFIG,
$previous
);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php
index c84cff9f..8cb752ba 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php
@@ -44,7 +44,7 @@ use Symfony\Component\Console\Output\OutputInterface;
final class Application extends BaseApplication
{
public const NAME = 'PHP CS Fixer';
- public const VERSION = '3.59.3';
+ public const VERSION = '3.62.0';
public const VERSION_CODENAME = '7th Gear';
private ToolInfo $toolInfo;
@@ -89,7 +89,7 @@ final class Application extends BaseApplication
if (\count($warnings) > 0) {
foreach ($warnings as $warning) {
- $stdErr->writeln(sprintf($stdErr->isDecorated() ? '%s>' : '%s', $warning));
+ $stdErr->writeln(\sprintf($stdErr->isDecorated() ? '%s>' : '%s', $warning));
}
$stdErr->writeln('');
}
@@ -107,7 +107,7 @@ final class Application extends BaseApplication
$stdErr->writeln('');
$stdErr->writeln($stdErr->isDecorated() ? 'Detected deprecations in use:>' : 'Detected deprecations in use:');
foreach ($triggeredDeprecations as $deprecation) {
- $stdErr->writeln(sprintf('- %s', $deprecation));
+ $stdErr->writeln(\sprintf('- %s', $deprecation));
}
}
}
@@ -120,7 +120,7 @@ final class Application extends BaseApplication
*/
public static function getAbout(bool $decorated = false): string
{
- $longVersion = sprintf('%s %s', self::NAME, self::VERSION);
+ $longVersion = \sprintf('%s %s', self::NAME, self::VERSION);
$commit = '@git-commit@';
$versionCommit = '';
@@ -131,8 +131,8 @@ final class Application extends BaseApplication
$about = implode('', [
$longVersion,
- $versionCommit ? sprintf(' (%s)', $versionCommit) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
- self::VERSION_CODENAME ? sprintf(' %s', self::VERSION_CODENAME) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
+ $versionCommit ? \sprintf(' (%s)', $versionCommit) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
+ self::VERSION_CODENAME ? \sprintf(' %s', self::VERSION_CODENAME) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
' by Fabien Potencier, Dariusz Ruminski and contributors.',
]);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php
index 03ec9209..4153c886 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php
@@ -131,7 +131,7 @@ final class DescribeCommand extends Command
$this->describeList($output, $e->getType());
- throw new \InvalidArgumentException(sprintf(
+ throw new \InvalidArgumentException(\sprintf(
'%s "%s" not found.%s',
ucfirst($e->getType()),
$name,
@@ -155,24 +155,24 @@ final class DescribeCommand extends Command
$definition = $fixer->getDefinition();
- $output->writeln(sprintf('Description of the `%s` rule.>', $name));
+ $output->writeln(\sprintf('Description of the `%s` rule.>', $name));
$output->writeln('');
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
- $output->writeln(sprintf('Fixer class: %s.', \get_class($fixer)));
+ $output->writeln(\sprintf('Fixer class: %s.', \get_class($fixer)));
$output->writeln('');
}
if ($fixer instanceof DeprecatedFixerInterface) {
$successors = $fixer->getSuccessorsNames();
$message = [] === $successors
- ? sprintf('it will be removed in version %d.0', Application::getMajorVersion() + 1)
- : sprintf('use %s instead', Utils::naturalLanguageJoinWithBackticks($successors));
+ ? \sprintf('it will be removed in version %d.0', Application::getMajorVersion() + 1)
+ : \sprintf('use %s instead', Utils::naturalLanguageJoinWithBackticks($successors));
$endMessage = '. '.ucfirst($message);
Utils::triggerDeprecation(new \RuntimeException(str_replace('`', '"', "Rule \"{$name}\" is deprecated{$endMessage}.")));
$message = Preg::replace('/(`[^`]+`)/', '$1', $message);
- $output->writeln(sprintf('DEPRECATED: %s.', $message));
+ $output->writeln(\sprintf('DEPRECATED: %s.', $message));
$output->writeln('');
}
@@ -216,7 +216,7 @@ final class DescribeCommand extends Command
$configurationDefinition = $fixer->getConfigurationDefinition();
$options = $configurationDefinition->getOptions();
- $output->writeln(sprintf('Fixer is configurable using following option%s:', 1 === \count($options) ? '' : 's'));
+ $output->writeln(\sprintf('Fixer is configurable using following option%s:', 1 === \count($options) ? '' : 's'));
foreach ($options as $option) {
$line = '* '.OutputFormatter::escape($option->getName()).'';
@@ -239,7 +239,7 @@ final class DescribeCommand extends Command
$line .= ': '.lcfirst(Preg::replace('/\.$/', '', $description)).'; ';
if ($option->hasDefault()) {
- $line .= sprintf(
+ $line .= \sprintf(
'defaults to %s',
Utils::toString($option->getDefault())
);
@@ -290,7 +290,7 @@ final class DescribeCommand extends Command
$differ = new FullDiffer();
$diffFormatter = new DiffConsoleFormatter(
$output->isDecorated(),
- sprintf(
+ \sprintf(
' ---------- begin diff ----------%s%%s%s ----------- end diff -----------',
PHP_EOL,
PHP_EOL
@@ -317,12 +317,12 @@ final class DescribeCommand extends Command
if ($fixer instanceof ConfigurableFixerInterface) {
if (null === $configuration) {
- $output->writeln(sprintf(' * Example #%d. Fixing with the default configuration.', $index + 1));
+ $output->writeln(\sprintf(' * Example #%d. Fixing with the default configuration.', $index + 1));
} else {
- $output->writeln(sprintf(' * Example #%d. Fixing with configuration: %s.', $index + 1, Utils::toString($codeSample->getConfiguration())));
+ $output->writeln(\sprintf(' * Example #%d. Fixing with configuration: %s.', $index + 1, Utils::toString($codeSample->getConfiguration())));
}
} else {
- $output->writeln(sprintf(' * Example #%d.', $index + 1));
+ $output->writeln(\sprintf(' * Example #%d.', $index + 1));
}
$output->writeln([$diffFormatter->format($diff, ' %s'), '']);
@@ -338,9 +338,9 @@ final class DescribeCommand extends Command
foreach ($ruleSetConfigs as $set => $config) {
if (null !== $config) {
- $output->writeln(sprintf('* %s with config: %s', $set, Utils::toString($config)));
+ $output->writeln(\sprintf('* %s with config: %s', $set, Utils::toString($config)));
} else {
- $output->writeln(sprintf('* %s with default config', $set));
+ $output->writeln(\sprintf('* %s with default config', $set));
}
}
@@ -357,7 +357,7 @@ final class DescribeCommand extends Command
$ruleSetDefinitions = RuleSets::getSetDefinitions();
$fixers = $this->getFixers();
- $output->writeln(sprintf('Description of the `%s` set.>', $ruleSetDefinitions[$name]->getName()));
+ $output->writeln(\sprintf('Description of the `%s` set.>', $ruleSetDefinitions[$name]->getName()));
$output->writeln('');
$output->writeln($this->replaceRstLinks($ruleSetDefinitions[$name]->getDescription()));
@@ -373,7 +373,7 @@ final class DescribeCommand extends Command
foreach ($ruleSetDefinitions[$name]->getRules() as $rule => $config) {
if (str_starts_with($rule, '@')) {
$set = $ruleSetDefinitions[$rule];
- $help .= sprintf(
+ $help .= \sprintf(
" * %s%s\n | %s\n\n",
$rule,
$set->isRisky() ? ' risky' : '',
@@ -387,12 +387,12 @@ final class DescribeCommand extends Command
$fixer = $fixers[$rule];
$definition = $fixer->getDefinition();
- $help .= sprintf(
+ $help .= \sprintf(
" * %s%s\n | %s\n%s\n",
$rule,
$fixer->isRisky() ? ' risky' : '',
$definition->getSummary(),
- true !== $config ? sprintf(" | Configuration: %s\n", Utils::toString($config)) : ''
+ true !== $config ? \sprintf(" | Configuration: %s\n", Utils::toString($config)) : ''
);
}
@@ -448,7 +448,7 @@ final class DescribeCommand extends Command
$items = $this->getSetNames();
foreach ($items as $item) {
- $output->writeln(sprintf('* %s', $item));
+ $output->writeln(\sprintf('* %s', $item));
}
}
@@ -457,7 +457,7 @@ final class DescribeCommand extends Command
$items = array_keys($this->getFixers());
foreach ($items as $item) {
- $output->writeln(sprintf('* %s', $item));
+ $output->writeln(\sprintf('* %s', $item));
}
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php
index f05fc123..45c4163c 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php
@@ -263,10 +263,10 @@ use Symfony\Component\Stopwatch\Stopwatch;
$stdErr->writeln(Application::getAboutWithRuntime(true));
$isParallel = $resolver->getParallelConfig()->getMaxProcesses() > 1;
- $stdErr->writeln(sprintf(
+ $stdErr->writeln(\sprintf(
'Running analysis on %d core%s.',
$resolver->getParallelConfig()->getMaxProcesses(),
- $isParallel ? sprintf(
+ $isParallel ? \sprintf(
's with %d file%s per process',
$resolver->getParallelConfig()->getFilesPerProcess(),
$resolver->getParallelConfig()->getFilesPerProcess() > 1 ? 's' : ''
@@ -275,26 +275,26 @@ use Symfony\Component\Stopwatch\Stopwatch;
/** @TODO v4 remove warnings related to parallel runner */
$usageDocs = 'https://cs.symfony.com/doc/usage.html';
- $stdErr->writeln(sprintf(
+ $stdErr->writeln(\sprintf(
$stdErr->isDecorated() ? '%s>' : '%s',
$isParallel
? 'Parallel runner is an experimental feature and may be unstable, use it at your own risk. Feedback highly appreciated!'
- : sprintf(
+ : \sprintf(
'You can enable parallel runner and speed up the analysis! Please see %s for more information.',
$stdErr->isDecorated()
- ? sprintf('usage docs>', OutputFormatter::escape($usageDocs))
+ ? \sprintf('usage docs>', OutputFormatter::escape($usageDocs))
: $usageDocs
)
));
$configFile = $resolver->getConfigFile();
- $stdErr->writeln(sprintf('Loaded config %s%s.', $resolver->getConfig()->getName(), null === $configFile ? '' : ' from "'.$configFile.'"'));
+ $stdErr->writeln(\sprintf('Loaded config %s%s.', $resolver->getConfig()->getName(), null === $configFile ? '' : ' from "'.$configFile.'"'));
if ($resolver->getUsingCache()) {
$cacheFile = $resolver->getCacheFile();
if (is_file($cacheFile)) {
- $stdErr->writeln(sprintf('Using cache file "%s".', $cacheFile));
+ $stdErr->writeln(\sprintf('Using cache file "%s".', $cacheFile));
}
}
}
@@ -303,7 +303,7 @@ use Symfony\Component\Stopwatch\Stopwatch;
if (null !== $stdErr && $resolver->configFinderIsOverridden()) {
$stdErr->writeln(
- sprintf($stdErr->isDecorated() ? '%s>' : '%s', 'Paths from configuration file have been overridden by paths provided as command arguments.')
+ \sprintf($stdErr->isDecorated() ? '%s>' : '%s', 'Paths from configuration file have been overridden by paths provided as command arguments.')
);
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php
index c1fe5f79..1f7e83fb 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php
@@ -80,7 +80,7 @@ final class ListSetsCommand extends Command
$formats = $factory->getFormats();
sort($formats);
- throw new InvalidConfigurationException(sprintf('The format "%s" is not defined, supported are %s.', $format, Utils::naturalLanguageJoin($formats)));
+ throw new InvalidConfigurationException(\sprintf('The format "%s" is not defined, supported are %s.', $format, Utils::naturalLanguageJoin($formats)));
}
return $reporter;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php
index 2be3adbc..229e1c8d 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php
@@ -102,7 +102,7 @@ final class SelfUpdateCommand extends Command
$latestVersion = $this->versionChecker->getLatestVersion();
$latestVersionOfCurrentMajor = $this->versionChecker->getLatestVersionOfMajor($currentMajor);
} catch (\Exception $exception) {
- $output->writeln(sprintf(
+ $output->writeln(\sprintf(
'Unable to determine newest version: %s',
$exception->getMessage()
));
@@ -122,8 +122,8 @@ final class SelfUpdateCommand extends Command
0 !== $this->versionChecker->compareVersions($latestVersionOfCurrentMajor, $latestVersion)
&& true !== $input->getOption('force')
) {
- $output->writeln(sprintf('A new major version of PHP CS Fixer is available (%s)', $latestVersion));
- $output->writeln(sprintf('Before upgrading please read https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/%s/UPGRADE-v%s.md', $latestVersion, $currentMajor + 1));
+ $output->writeln(\sprintf('A new major version of PHP CS Fixer is available (%s)', $latestVersion));
+ $output->writeln(\sprintf('Before upgrading please read https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/%s/UPGRADE-v%s.md', $latestVersion, $currentMajor + 1));
$output->writeln('If you are ready to upgrade run this command with -f');
$output->writeln('Checking for new minor/patch version...');
@@ -143,7 +143,7 @@ final class SelfUpdateCommand extends Command
}
if (!is_writable($localFilename)) {
- $output->writeln(sprintf('No permission to update "%s" file.', $localFilename));
+ $output->writeln(\sprintf('No permission to update "%s" file.', $localFilename));
return 1;
}
@@ -152,7 +152,7 @@ final class SelfUpdateCommand extends Command
$remoteFilename = $this->toolInfo->getPharDownloadUri($remoteTag);
if (false === @copy($remoteFilename, $tempFilename)) {
- $output->writeln(sprintf('Unable to download new version %s from the server.', $remoteTag));
+ $output->writeln(\sprintf('Unable to download new version %s from the server.', $remoteTag));
return 1;
}
@@ -162,7 +162,7 @@ final class SelfUpdateCommand extends Command
$pharInvalidityReason = $this->pharChecker->checkFileValidity($tempFilename);
if (null !== $pharInvalidityReason) {
unlink($tempFilename);
- $output->writeln(sprintf('The download of %s is corrupt (%s).', $remoteTag, $pharInvalidityReason));
+ $output->writeln(\sprintf('The download of %s is corrupt (%s).', $remoteTag, $pharInvalidityReason));
$output->writeln('Please re-run the "self-update" command to try again.');
return 1;
@@ -170,7 +170,7 @@ final class SelfUpdateCommand extends Command
rename($tempFilename, $localFilename);
- $output->writeln(sprintf('PHP CS Fixer updated (%s -> %s)', $currentVersion, $remoteTag));
+ $output->writeln(\sprintf('PHP CS Fixer updated (%s -> %s)', $currentVersion, $remoteTag));
return 0;
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php b/vendor/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php
index 7e11e8af..1b594bed 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php
@@ -348,7 +348,7 @@ final class ConfigurationResolver
);
if (\count($riskyFixers) > 0) {
- throw new InvalidConfigurationException(sprintf('The rules contain risky fixers (%s), but they are not allowed to run. Perhaps you forget to use --allow-risky=yes option?', Utils::naturalLanguageJoin($riskyFixers)));
+ throw new InvalidConfigurationException(\sprintf('The rules contain risky fixers (%s), but they are not allowed to run. Perhaps you forget to use --allow-risky=yes option?', Utils::naturalLanguageJoin($riskyFixers)));
}
}
}
@@ -392,7 +392,7 @@ final class ConfigurationResolver
: $cwd.\DIRECTORY_SEPARATOR.$path;
if (!file_exists($absolutePath)) {
- throw new InvalidConfigurationException(sprintf(
+ throw new InvalidConfigurationException(\sprintf(
'The path "%s" is not readable.',
$path
));
@@ -422,7 +422,7 @@ final class ConfigurationResolver
? ProgressOutputType::NONE
: ProgressOutputType::BAR;
} elseif (!\in_array($progressType, ProgressOutputType::all(), true)) {
- throw new InvalidConfigurationException(sprintf(
+ throw new InvalidConfigurationException(\sprintf(
'The progress type "%s" is not defined, supported are %s.',
$progressType,
Utils::naturalLanguageJoin(ProgressOutputType::all())
@@ -452,7 +452,7 @@ final class ConfigurationResolver
$formats = $reporterFactory->getFormats();
sort($formats);
- throw new InvalidConfigurationException(sprintf('The format "%s" is not defined, supported are %s.', $format, Utils::naturalLanguageJoin($formats)));
+ throw new InvalidConfigurationException(\sprintf('The format "%s" is not defined, supported are %s.', $format, Utils::naturalLanguageJoin($formats)));
}
}
@@ -551,7 +551,7 @@ final class ConfigurationResolver
if (null !== $configFile) {
if (false === file_exists($configFile) || false === is_readable($configFile)) {
- throw new InvalidConfigurationException(sprintf('Cannot read config file "%s".', $configFile));
+ throw new InvalidConfigurationException(\sprintf('Cannot read config file "%s".', $configFile));
}
return [$configFile];
@@ -660,7 +660,7 @@ final class ConfigurationResolver
$rules = json_decode($rules, true);
if (JSON_ERROR_NONE !== json_last_error()) {
- throw new InvalidConfigurationException(sprintf('Invalid JSON rules input: "%s".', json_last_error_msg()));
+ throw new InvalidConfigurationException(\sprintf('Invalid JSON rules input: "%s".', json_last_error_msg()));
}
return $rules;
@@ -701,7 +701,7 @@ final class ConfigurationResolver
foreach ($rules as $key => $value) {
if (\is_int($key)) {
- throw new InvalidConfigurationException(sprintf('Missing value for "%s" rule/set.', $value));
+ throw new InvalidConfigurationException(\sprintf('Missing value for "%s" rule/set.', $value));
}
$ruleSet[$key] = true;
@@ -777,7 +777,7 @@ final class ConfigurationResolver
foreach ($unknownFixers as $unknownFixer) {
if (isset($renamedRules[$unknownFixer])) { // Check if present as old renamed rule
$hasOldRule = true;
- $message .= sprintf(
+ $message .= \sprintf(
'"%s" is renamed (did you mean "%s"?%s), ',
$unknownFixer,
$renamedRules[$unknownFixer]['new_name'],
@@ -786,7 +786,7 @@ final class ConfigurationResolver
} else { // Go to normal matcher if it is not a renamed rule
$matcher = new WordMatcher($availableFixers);
$alternative = $matcher->match($unknownFixer);
- $message .= sprintf(
+ $message .= \sprintf(
'"%s"%s, ',
$unknownFixer,
null === $alternative ? '' : ' (did you mean "'.$alternative.'"?)'
@@ -808,8 +808,8 @@ final class ConfigurationResolver
if (isset($rules[$fixerName]) && $fixer instanceof DeprecatedFixerInterface) {
$successors = $fixer->getSuccessorsNames();
$messageEnd = [] === $successors
- ? sprintf(' and will be removed in version %d.0.', Application::getMajorVersion() + 1)
- : sprintf('. Use %s instead.', str_replace('`', '"', Utils::naturalLanguageJoinWithBackticks($successors)));
+ ? \sprintf(' and will be removed in version %d.0.', Application::getMajorVersion() + 1)
+ : \sprintf('. Use %s instead.', str_replace('`', '"', Utils::naturalLanguageJoinWithBackticks($successors)));
Utils::triggerDeprecation(new \RuntimeException("Rule \"{$fixerName}\" is deprecated{$messageEnd}"));
}
@@ -836,7 +836,7 @@ final class ConfigurationResolver
$modes,
true
)) {
- throw new InvalidConfigurationException(sprintf(
+ throw new InvalidConfigurationException(\sprintf(
'The path-mode "%s" is not defined, supported are %s.',
$this->options['path-mode'],
Utils::naturalLanguageJoin($modes)
@@ -926,7 +926,7 @@ final class ConfigurationResolver
private function setOption(string $name, $value): void
{
if (!\array_key_exists($name, $this->options)) {
- throw new InvalidConfigurationException(sprintf('Unknown option name: "%s".', $name));
+ throw new InvalidConfigurationException(\sprintf('Unknown option name: "%s".', $name));
}
$this->options[$name] = $value;
@@ -937,7 +937,7 @@ final class ConfigurationResolver
$value = $this->options[$optionName];
if (!\is_string($value)) {
- throw new InvalidConfigurationException(sprintf('Expected boolean or string value for option "%s".', $optionName));
+ throw new InvalidConfigurationException(\sprintf('Expected boolean or string value for option "%s".', $optionName));
}
if ('yes' === $value) {
@@ -948,7 +948,7 @@ final class ConfigurationResolver
return false;
}
- throw new InvalidConfigurationException(sprintf('Expected "yes" or "no" for option "%s", got "%s".', $optionName, $value));
+ throw new InvalidConfigurationException(\sprintf('Expected "yes" or "no" for option "%s", got "%s".', $optionName, $value));
}
private static function separatedContextLessInclude(string $path): ConfigInterface
@@ -957,7 +957,7 @@ final class ConfigurationResolver
// verify that the config has an instance of Config
if (!$config instanceof ConfigInterface) {
- throw new InvalidConfigurationException(sprintf('The config file: "%s" does not return a "PhpCsFixer\ConfigInterface" instance. Got: "%s".', $path, \is_object($config) ? \get_class($config) : \gettype($config)));
+ throw new InvalidConfigurationException(\sprintf('The config file: "%s" does not return a "PhpCsFixer\ConfigInterface" instance. Got: "%s".', $path, \is_object($config) ? \get_class($config) : \gettype($config)));
}
return $config;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php
index 79bb57b7..2c54e137 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php
@@ -44,7 +44,7 @@ final class ErrorOutput
*/
public function listErrors(string $process, array $errors): void
{
- $this->output->writeln(['', sprintf(
+ $this->output->writeln(['', \sprintf(
'Files that were not fixed due to errors reported during %s:',
$process
)]);
@@ -52,13 +52,13 @@ final class ErrorOutput
$showDetails = $this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE;
$showTrace = $this->output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG;
foreach ($errors as $i => $error) {
- $this->output->writeln(sprintf('%4d) %s', $i + 1, $error->getFilePath()));
+ $this->output->writeln(\sprintf('%4d) %s', $i + 1, $error->getFilePath()));
$e = $error->getSource();
if (!$showDetails || null === $e) {
continue;
}
- $class = sprintf('[%s]', \get_class($e));
+ $class = \sprintf('[%s]', \get_class($e));
$message = $e->getMessage();
$code = $e->getCode();
if (0 !== $code) {
@@ -80,7 +80,7 @@ final class ErrorOutput
$line .= str_repeat(' ', $length - \strlen($line));
}
- $this->output->writeln(sprintf(' %s ', $this->prepareOutput($line)));
+ $this->output->writeln(\sprintf(' %s ', $this->prepareOutput($line)));
}
if ($showTrace && !$e instanceof LintingException) { // stack trace of lint exception is of no interest
@@ -99,13 +99,13 @@ final class ErrorOutput
if (Error::TYPE_LINT === $error->getType() && 0 < \count($error->getAppliedFixers())) {
$this->output->writeln('');
- $this->output->writeln(sprintf(' Applied fixers: %s', implode(', ', $error->getAppliedFixers())));
+ $this->output->writeln(\sprintf(' Applied fixers: %s', implode(', ', $error->getAppliedFixers())));
$diff = $error->getDiff();
if (null !== $diff) {
$diffFormatter = new DiffConsoleFormatter(
$this->isDecorated,
- sprintf(
+ \sprintf(
' ---------- begin diff ----------%s%%s%s ----------- end diff -----------',
PHP_EOL,
PHP_EOL
@@ -132,18 +132,18 @@ final class ErrorOutput
private function outputTrace(array $trace): void
{
if (isset($trace['class'], $trace['type'], $trace['function'])) {
- $this->output->writeln(sprintf(
+ $this->output->writeln(\sprintf(
' %s%s%s()',
$this->prepareOutput($trace['class']),
$this->prepareOutput($trace['type']),
$this->prepareOutput($trace['function'])
));
} elseif (isset($trace['function'])) {
- $this->output->writeln(sprintf(' %s()', $this->prepareOutput($trace['function'])));
+ $this->output->writeln(\sprintf(' %s()', $this->prepareOutput($trace['function'])));
}
if (isset($trace['file'])) {
- $this->output->writeln(sprintf(' in %s at line %d', $this->prepareOutput($trace['file']), $trace['line']));
+ $this->output->writeln(\sprintf(' in %s at line %d', $this->prepareOutput($trace['file']), $trace['line']));
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/Progress/DotsOutput.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/Progress/DotsOutput.php
index 0e47ae5f..afe8322b 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/Progress/DotsOutput.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/Progress/DotsOutput.php
@@ -82,7 +82,7 @@ final class DotsOutput implements ProgressOutputInterface
public function onFixerFileProcessed(FixerFileProcessedEvent $event): void
{
$status = self::$eventStatusMap[$event->getStatus()];
- $this->getOutput()->write($this->getOutput()->isDecorated() ? sprintf($status['format'], $status['symbol']) : $status['symbol']);
+ $this->getOutput()->write($this->getOutput()->isDecorated() ? \sprintf($status['format'], $status['symbol']) : $status['symbol']);
++$this->processedFiles;
@@ -90,7 +90,7 @@ final class DotsOutput implements ProgressOutputInterface
$isLast = $this->processedFiles === $this->context->getFilesCount();
if (0 === $symbolsOnCurrentLine || $isLast) {
- $this->getOutput()->write(sprintf(
+ $this->getOutput()->write(\sprintf(
'%s %'.\strlen((string) $this->context->getFilesCount()).'d / %d (%3d%%)',
$isLast && 0 !== $symbolsOnCurrentLine ? str_repeat(' ', $this->symbolsPerLine - $symbolsOnCurrentLine) : '',
$this->processedFiles,
@@ -114,10 +114,10 @@ final class DotsOutput implements ProgressOutputInterface
continue;
}
- $symbols[$symbol] = sprintf('%s-%s', $this->getOutput()->isDecorated() ? sprintf($status['format'], $symbol) : $symbol, $status['description']);
+ $symbols[$symbol] = \sprintf('%s-%s', $this->getOutput()->isDecorated() ? \sprintf($status['format'], $symbol) : $symbol, $status['description']);
}
- $this->getOutput()->write(sprintf("\nLegend: %s\n", implode(', ', $symbols)));
+ $this->getOutput()->write(\sprintf("\nLegend: %s\n", implode(', ', $symbols)));
}
private function getOutput(): OutputInterface
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputFactory.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputFactory.php
index b1102e8f..71027d83 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputFactory.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/Progress/ProgressOutputFactory.php
@@ -38,7 +38,7 @@ final class ProgressOutputFactory
if (!$this->isBuiltInType($outputType)) {
throw new \InvalidArgumentException(
- sprintf(
+ \sprintf(
'Something went wrong, "%s" output type is not supported',
$outputType
)
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php
index 0334bee6..ca2817fd 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php
@@ -59,7 +59,7 @@ final class JunitReporter implements ReporterInterface
if ($reportSummary->getTime() > 0) {
$testsuite->setAttribute(
'time',
- sprintf(
+ \sprintf(
'%.3f',
$reportSummary->getTime() / 1_000
)
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php
index 86855df2..1b2d8122 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php
@@ -36,7 +36,7 @@ final class ReporterFactory
foreach (SymfonyFinder::create()->files()->name('*Reporter.php')->in(__DIR__) as $file) {
$relativeNamespace = $file->getRelativePath();
- $builtInReporters[] = sprintf(
+ $builtInReporters[] = \sprintf(
'%s\%s%s',
__NAMESPACE__,
'' !== $relativeNamespace ? $relativeNamespace.'\\' : '',
@@ -60,7 +60,7 @@ final class ReporterFactory
$format = $reporter->getFormat();
if (isset($this->reporters[$format])) {
- throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is already registered.', $format));
+ throw new \UnexpectedValueException(\sprintf('Reporter for format "%s" is already registered.', $format));
}
$this->reporters[$format] = $reporter;
@@ -82,7 +82,7 @@ final class ReporterFactory
public function getReporter(string $format): ReporterInterface
{
if (!isset($this->reporters[$format])) {
- throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is not registered.', $format));
+ throw new \UnexpectedValueException(\sprintf('Reporter for format "%s" is not registered.', $format));
}
return $this->reporters[$format];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php
index 9da679d6..79a548e9 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php
@@ -35,7 +35,7 @@ final class TextReporter implements ReporterInterface
$identifiedFiles = 0;
foreach ($reportSummary->getChanged() as $file => $fixResult) {
++$identifiedFiles;
- $output .= sprintf('%4d) %s', $identifiedFiles, $file);
+ $output .= \sprintf('%4d) %s', $identifiedFiles, $file);
if ($reportSummary->shouldAddAppliedFixers()) {
$output .= $this->getAppliedFixers(
@@ -62,7 +62,7 @@ final class TextReporter implements ReporterInterface
*/
private function getAppliedFixers(bool $isDecoratedOutput, array $appliedFixers): string
{
- return sprintf(
+ return \sprintf(
$isDecoratedOutput ? ' (%s)' : ' (%s)',
implode(', ', $appliedFixers)
);
@@ -74,7 +74,7 @@ final class TextReporter implements ReporterInterface
return '';
}
- $diffFormatter = new DiffConsoleFormatter($isDecoratedOutput, sprintf(
+ $diffFormatter = new DiffConsoleFormatter($isDecoratedOutput, \sprintf(
' ---------- begin diff ----------%s%%s%s ----------- end diff -----------',
PHP_EOL,
PHP_EOL
@@ -89,7 +89,7 @@ final class TextReporter implements ReporterInterface
return '';
}
- return PHP_EOL.sprintf(
+ return PHP_EOL.\sprintf(
'%s %d of %d %s in %.3f seconds, %.2f MB memory used'.PHP_EOL,
$isDryRun ? 'Found' : 'Fixed',
$identifiedFiles,
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php
index 0d0ae6da..ad963f6d 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php
@@ -38,7 +38,7 @@ final class ReporterFactory
foreach (SymfonyFinder::create()->files()->name('*Reporter.php')->in(__DIR__) as $file) {
$relativeNamespace = $file->getRelativePath();
- $builtInReporters[] = sprintf(
+ $builtInReporters[] = \sprintf(
'%s\%s%s',
__NAMESPACE__,
'' !== $relativeNamespace ? $relativeNamespace.'\\' : '',
@@ -59,7 +59,7 @@ final class ReporterFactory
$format = $reporter->getFormat();
if (isset($this->reporters[$format])) {
- throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is already registered.', $format));
+ throw new \UnexpectedValueException(\sprintf('Reporter for format "%s" is already registered.', $format));
}
$this->reporters[$format] = $reporter;
@@ -81,7 +81,7 @@ final class ReporterFactory
public function getReporter(string $format): ReporterInterface
{
if (!isset($this->reporters[$format])) {
- throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is not registered.', $format));
+ throw new \UnexpectedValueException(\sprintf('Reporter for format "%s" is not registered.', $format));
}
return $this->reporters[$format];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php
index 9c851ef3..65c4156e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php
@@ -37,7 +37,7 @@ final class TextReporter implements ReporterInterface
$output = '';
foreach ($sets as $i => $set) {
- $output .= sprintf('%2d) %s', $i + 1, $set->getName()).PHP_EOL.' '.$set->getDescription().PHP_EOL;
+ $output .= \sprintf('%2d) %s', $i + 1, $set->getName()).PHP_EOL.' '.$set->getDescription().PHP_EOL;
if ($set->isRisky()) {
$output .= ' Set contains risky rules.'.PHP_EOL;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php
index 10995cfb..b3211304 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php
@@ -34,7 +34,7 @@ final class GithubClient implements GithubClientInterface
);
if (false === $result) {
- throw new \RuntimeException(sprintf('Failed to load tags at "%s".', $this->url));
+ throw new \RuntimeException(\sprintf('Failed to load tags at "%s".', $this->url));
}
/**
@@ -47,7 +47,7 @@ final class GithubClient implements GithubClientInterface
*/
$result = json_decode($result, true);
if (JSON_ERROR_NONE !== json_last_error()) {
- throw new \RuntimeException(sprintf(
+ throw new \RuntimeException(\sprintf(
'Failed to read response from "%s" as JSON: %s.',
$this->url,
json_last_error_msg()
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php b/vendor/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php
index a58a0bed..7465c2a4 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php
@@ -50,7 +50,7 @@ final class WarningsDetector
if ($this->toolInfo->isInstalledByComposer()) {
$details = $this->toolInfo->getComposerInstallationDetails();
if (ToolInfo::COMPOSER_LEGACY_PACKAGE_NAME === $details['name']) {
- $this->warnings[] = sprintf(
+ $this->warnings[] = \sprintf(
'You are running PHP CS Fixer installed with old vendor `%s`. Please update to `%s`.',
ToolInfo::COMPOSER_LEGACY_PACKAGE_NAME,
ToolInfo::COMPOSER_PACKAGE_NAME
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php b/vendor/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php
index f2896253..97e8f747 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php
@@ -42,7 +42,7 @@ final class DiffConsoleFormatter
? $this->template
: Preg::replace('/<[^<>]+>/', '', $this->template);
- return sprintf(
+ return \sprintf(
$template,
implode(
PHP_EOL,
@@ -61,7 +61,7 @@ final class DiffConsoleFormatter
$colour = 'cyan';
}
- return sprintf('%s', $colour, OutputFormatter::escape($matches[0]), $colour);
+ return \sprintf('%s', $colour, OutputFormatter::escape($matches[0]), $colour);
},
$line,
1,
@@ -73,7 +73,7 @@ final class DiffConsoleFormatter
}
}
- return sprintf($lineTemplate, $line);
+ return \sprintf($lineTemplate, $line);
},
Preg::split('#\R#u', $diff)
)
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php
index 9fb304d9..d3f09830 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php
@@ -176,7 +176,7 @@ final class Annotation
public function getVariableName(): ?string
{
$type = preg_quote($this->getTypesContent() ?? '', '/');
- $regex = sprintf(
+ $regex = \sprintf(
'/@%s\s+(%s\s*)?(&\s*)?(\.{3}\s*)?(?\$%s)(?:.*|$)/',
$this->tag->getName(),
$type,
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php
index 4bb74464..4836fbca 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php
@@ -271,23 +271,37 @@ final class TypeExpression
*/
public function walkTypes(\Closure $callback): void
{
- foreach (array_reverse($this->innerTypeExpressions) as [
- 'start_index' => $startIndex,
+ $innerValueOrig = $this->value;
+
+ $startIndexOffset = 0;
+
+ foreach ($this->innerTypeExpressions as [
+ 'start_index' => $startIndexOrig,
'expression' => $inner,
]) {
- $initialValueLength = \strlen($inner->toString());
+ $innerLengthOrig = \strlen($inner->toString());
$inner->walkTypes($callback);
$this->value = substr_replace(
$this->value,
$inner->toString(),
- $startIndex,
- $initialValueLength
+ $startIndexOrig + $startIndexOffset,
+ $innerLengthOrig
);
+
+ $startIndexOffset += \strlen($inner->toString()) - $innerLengthOrig;
}
$callback($this);
+
+ if ($this->value !== $innerValueOrig) {
+ $this->isUnionType = false;
+ $this->typesGlue = '|';
+ $this->innerTypeExpressions = [];
+
+ $this->parse();
+ }
}
/**
@@ -393,7 +407,9 @@ final class TypeExpression
$consumedValueLength = \strlen($matches[0][0]);
$index += $consumedValueLength;
- if (\strlen($this->value) === $index) {
+ if (\strlen($this->value) <= $index) {
+ \assert(\strlen($this->value) === $index);
+
return;
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/DocLexer.php b/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/DocLexer.php
index ef1878ea..2335efb0 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/DocLexer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/DocLexer.php
@@ -151,7 +151,7 @@ final class DocLexer
private function scan(string $input): void
{
if (!isset($this->regex)) {
- $this->regex = sprintf(
+ $this->regex = \sprintf(
'/(%s)|%s/%s',
implode(')|(', $this->getCatchablePatterns()),
implode('|', $this->getNonCatchablePatterns()),
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php b/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php
index 96f61e3e..b73d14a4 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php
@@ -256,7 +256,7 @@ final class Tokens extends \SplFixedArray
$type = \get_class($token);
}
- throw new \InvalidArgumentException(sprintf('Token must be an instance of PhpCsFixer\Doctrine\Annotation\Token, "%s" given.', $type));
+ throw new \InvalidArgumentException(\sprintf('Token must be an instance of PhpCsFixer\Doctrine\Annotation\Token, "%s" given.', $type));
}
parent::offsetSet($index, $token);
@@ -270,7 +270,7 @@ final class Tokens extends \SplFixedArray
public function offsetUnset($index): void
{
if (!isset($this[$index])) {
- throw new \OutOfBoundsException(sprintf('Index "%s" is invalid or does not exist.', $index));
+ throw new \OutOfBoundsException(\sprintf('Index "%s" is invalid or does not exist.', $index));
}
$max = \count($this) - 1;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php b/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php
index 9d707b31..19ef36a9 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php
@@ -83,7 +83,7 @@ final class FixerDocumentGenerator
$alternatives = $fixer->getSuccessorsNames();
if (0 !== \count($alternatives)) {
- $deprecationDescription .= RstUtils::toRst(sprintf(
+ $deprecationDescription .= RstUtils::toRst(\sprintf(
"\n\nYou should use %s instead.",
Utils::naturalLanguageJoinWithBackticks($alternatives)
), 0);
@@ -202,7 +202,7 @@ final class FixerDocumentGenerator
RST;
foreach ($samples as $index => $sample) {
- $title = sprintf('Example #%d', $index + 1);
+ $title = \sprintf('Example #%d', $index + 1);
$titleLine = str_repeat('~', \strlen($title));
$doc .= "\n\n{$title}\n{$titleLine}";
@@ -210,7 +210,7 @@ final class FixerDocumentGenerator
if (null === $sample->getConfiguration()) {
$doc .= "\n\n*Default* configuration.";
} else {
- $doc .= sprintf(
+ $doc .= \sprintf(
"\n\nWith configuration: ``%s``.",
Utils::toString($sample->getConfiguration())
);
@@ -380,7 +380,7 @@ final class FixerDocumentGenerator
the sample is not suitable for current version of PHP (%s).
RST;
- return sprintf($error, PHP_VERSION);
+ return \sprintf($error, PHP_VERSION);
}
$old = $sample->getCode();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php b/vendor/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php
index c87808c8..bb9f81a4 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php
@@ -58,7 +58,7 @@ final class RuleSetDocumentationGenerator
if (0 !== \count($alternatives)) {
$deprecationDescription .= RstUtils::toRst(
- sprintf(
+ \sprintf(
"\n\nYou should use %s instead.",
Utils::naturalLanguageJoinWithBackticks($alternatives)
),
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FileReader.php b/vendor/friendsofphp/php-cs-fixer/src/FileReader.php
index d4fb752c..ec36e3a6 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/FileReader.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/FileReader.php
@@ -61,7 +61,7 @@ final class FileReader
if (false === $content) {
$error = error_get_last();
- throw new \RuntimeException(sprintf(
+ throw new \RuntimeException(\sprintf(
'Failed to read content from "%s".%s',
$realPath,
null !== $error ? ' '.$error['message'] : ''
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php
index 0b4c4b2f..b6a8660c 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php
@@ -19,6 +19,7 @@ use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\DocBlock\Line;
use PhpCsFixer\Indicator\PhpUnitTestCaseIndicator;
use PhpCsFixer\Tokenizer\Analyzer\AttributeAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
use PhpCsFixer\Tokenizer\CT;
@@ -98,6 +99,52 @@ abstract class AbstractPhpUnitFixer extends AbstractFixer
return $tokens[$index]->isGivenKind(T_DOC_COMMENT);
}
+ /**
+ * @return iterable
+ */
+ protected function getPreviousAssertCall(Tokens $tokens, int $startIndex, int $endIndex): iterable
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ for ($index = $endIndex; $index > $startIndex; --$index) {
+ $index = $tokens->getPrevTokenOfKind($index, [[T_STRING]]);
+
+ if (null === $index) {
+ return;
+ }
+
+ // test if "assert" something call
+ $loweredContent = strtolower($tokens[$index]->getContent());
+
+ if (!str_starts_with($loweredContent, 'assert')) {
+ continue;
+ }
+
+ // test candidate for simple calls like: ([\]+'some fixable call'(...))
+ $openBraceIndex = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$openBraceIndex]->equals('(')) {
+ continue;
+ }
+
+ if (!$functionsAnalyzer->isTheSameClassCall($tokens, $index)) {
+ continue;
+ }
+
+ yield [
+ 'index' => $index,
+ 'loweredName' => $loweredContent,
+ 'openBraceIndex' => $openBraceIndex,
+ 'closeBraceIndex' => $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openBraceIndex),
+ ];
+ }
+ }
+
private function createDocBlock(Tokens $tokens, int $docBlockIndex, string $annotation): void
{
$lineEnd = $this->whitespacesConfig->getLineEnding();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractShortOperatorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractShortOperatorFixer.php
index 0653e195..1897e042 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractShortOperatorFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractShortOperatorFixer.php
@@ -241,7 +241,7 @@ abstract class AbstractShortOperatorFixer extends AbstractFixer
return false;
}
- throw new \InvalidArgumentException(sprintf('Not supported operator "%s".', $operatorToken->toJson()));
+ throw new \InvalidArgumentException(\sprintf('Not supported operator "%s".', $operatorToken->toJson()));
}
private function belongsToSwitchOrAlternativeSyntax(AlternativeSyntaxAnalyzer $alternativeSyntaxAnalyzer, Tokens $tokens, int $index): bool
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php
index eeed6433..efd042cf 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php
@@ -247,6 +247,10 @@ mbereg_search_getregs();
break;
}
+ if (!isset(self::SETS[$set])) {
+ throw new \LogicException(\sprintf('Set %s passed option validation, but not part of ::SETS.', $set));
+ }
+
$this->aliases = array_merge($this->aliases, self::SETS[$set]);
}
}
@@ -317,7 +321,7 @@ mbereg_search_getregs();
$list = "List of sets to fix. Defined sets are:\n\n";
foreach ($sets as $set => $description) {
- $list .= sprintf("* `%s` (%s);\n", $set, $description);
+ $list .= \sprintf("* `%s` (%s);\n", $set, $description);
}
$list = rtrim($list, ";\n").'.';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php
index 4c8c4613..9909eb7a 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php
@@ -131,7 +131,7 @@ final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer imple
->setAllowedValues([static function (array $value): bool {
foreach ($value as $functionName => $replacement) {
if (!\array_key_exists($functionName, self::$argumentCounts)) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Function "%s" is not handled by the fixer.',
$functionName
));
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php
index 2127e33d..daf0e265 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php
@@ -149,6 +149,7 @@ settype($bar, "null");
if ('null' === $type) {
$this->fixSettypeNullCall($tokens, $functionNameIndex, $argumentToken);
} else {
+ \assert(isset($map[$type]));
$this->fixSettypeCall($tokens, $functionNameIndex, $argumentToken, new Token($map[$type]));
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php
index f7e2b060..3d5f5616 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php
@@ -15,9 +15,10 @@ declare(strict_types=1);
namespace PhpCsFixer\Fixer\ArrayNotation;
use PhpCsFixer\AbstractFixer;
-use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
use PhpCsFixer\Tokenizer\CT;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
@@ -31,7 +32,10 @@ final class NormalizeIndexBraceFixer extends AbstractFixer
{
return new FixerDefinition(
'Array index should always be written by using square braces.',
- [new CodeSample("getBasename('.php')));
+ $tokens = Tokens::fromCode(\sprintf('getBasename('.php')));
if ($tokens[3]->isKeyword() || $tokens[3]->isMagicConstant()) {
// name cannot be a class name - detected by PHP 5.x
@@ -134,7 +134,7 @@ class InvalidName {}
$realpath = realpath($this->configuration['dir']);
if (false === $realpath) {
- throw new \InvalidArgumentException(sprintf('Failed to resolve configured directory "%s".', $this->configuration['dir']));
+ throw new \InvalidArgumentException(\sprintf('Failed to resolve configured directory "%s".', $this->configuration['dir']));
}
$this->configuration['dir'] = $realpath;
@@ -241,7 +241,7 @@ class InvalidName {}
$namespaceParts = array_reverse(explode('\\', $maxNamespace));
foreach ($namespaceParts as $namespacePart) {
- $nameCandidate = sprintf('%s_%s', $namespacePart, $name);
+ $nameCandidate = \sprintf('%s_%s', $namespacePart, $name);
if (strtolower($nameCandidate) !== strtolower(substr($currentName, -\strlen($nameCandidate)))) {
break;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
index b5b81a16..45e1de77 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
@@ -217,7 +217,7 @@ class Sample
if (!\in_array($type, $supportedTypes, true)) {
throw new InvalidOptionsException(
- sprintf(
+ \sprintf(
'Unexpected element type, expected any of %s, got "%s".',
Utils::naturalLanguageJoin($supportedTypes),
\gettype($type).'#'.$type
@@ -229,7 +229,7 @@ class Sample
if (!\in_array($spacing, $supportedSpacings, true)) {
throw new InvalidOptionsException(
- sprintf(
+ \sprintf(
'Unexpected spacing for element type "%s", expected any of %s, got "%s".',
$spacing,
Utils::naturalLanguageJoin($supportedSpacings),
@@ -363,7 +363,7 @@ class Sample
return $tokens[$aboveElementDocCandidateIndex]->isGivenKind([T_DOC_COMMENT, CT::T_ATTRIBUTE_CLOSE]) ? 2 : 1;
}
- throw new \RuntimeException(sprintf('Unknown spacing "%s".', $spacing));
+ throw new \RuntimeException(\sprintf('Unknown spacing "%s".', $spacing));
}
/**
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php
index 7ecb8d65..44278aa5 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php
@@ -351,7 +351,7 @@ final class FinalInternalClassFixer extends AbstractFixer implements Configurabl
$oldConfigIsSet = $this->configuration[$oldConfigKey] !== $defaults;
if ($newConfigIsSet && $oldConfigIsSet) {
- throw new InvalidFixerConfigurationException($this->getName(), sprintf('Configuration cannot contain deprecated option "%s" and new option "%s".', $oldConfigKey, $newConfigKey));
+ throw new InvalidFixerConfigurationException($this->getName(), \sprintf('Configuration cannot contain deprecated option "%s" and new option "%s".', $oldConfigKey, $newConfigKey));
}
if ($oldConfigIsSet) {
@@ -368,7 +368,7 @@ final class FinalInternalClassFixer extends AbstractFixer implements Configurabl
$intersect = array_intersect_assoc($this->configuration['include'], $this->configuration['exclude']);
if (\count($intersect) > 0) {
- throw new InvalidFixerConfigurationException($this->getName(), sprintf('Annotation cannot be used in both "include" and "exclude" list, got duplicates: %s.', Utils::naturalLanguageJoin(array_keys($intersect))));
+ throw new InvalidFixerConfigurationException($this->getName(), \sprintf('Annotation cannot be used in both "include" and "exclude" list, got duplicates: %s.', Utils::naturalLanguageJoin(array_keys($intersect))));
}
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentSpacingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentSpacingFixer.php
index ecf09eca..7b6931cc 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentSpacingFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentSpacingFixer.php
@@ -99,7 +99,7 @@ final class SingleLineCommentSpacingFixer extends AbstractFixer
// fix space between comment open and leading text
private function fixCommentLeadingSpace(string $content, string $prefix): string
{
- if (Preg::match(sprintf('@^%s\h+.*$@', preg_quote($prefix, '@')), $content)) {
+ if (Preg::match(\sprintf('@^%s\h+.*$@', preg_quote($prefix, '@')), $content)) {
return $content;
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php
index 97004379..7b53770b 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php
@@ -209,7 +209,7 @@ namespace {
$constantChecker = static function (array $value): bool {
foreach ($value as $constantName) {
if (trim($constantName) !== $constantName) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Each element must be a non-empty, trimmed string, got "%s" instead.',
get_debug_type($constantName)
));
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php
index e30f8c63..2f95dd18 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php
@@ -109,7 +109,7 @@ final class TrailingCommaInMultilineFixer extends AbstractFixer implements Confi
->setAllowedTypes(['bool'])
->setDefault(false)
->getOption(),
- (new FixerOptionBuilder('elements', sprintf('Where to fix multiline trailing comma (PHP >= 8.0 for `%s` and `%s`).', self::ELEMENTS_PARAMETERS, self::MATCH_EXPRESSIONS))) // @TODO: remove text when PHP 8.0+ is required
+ (new FixerOptionBuilder('elements', \sprintf('Where to fix multiline trailing comma (PHP >= 8.0 for `%s` and `%s`).', self::ELEMENTS_PARAMETERS, self::MATCH_EXPRESSIONS))) // @TODO: remove text when PHP 8.0+ is required
->setAllowedTypes(['string[]'])
->setAllowedValues([new AllowedValueSubset([self::ELEMENTS_ARRAYS, self::ELEMENTS_ARGUMENTS, self::ELEMENTS_PARAMETERS, self::MATCH_EXPRESSIONS])])
->setDefault([self::ELEMENTS_ARRAYS])
@@ -117,7 +117,7 @@ final class TrailingCommaInMultilineFixer extends AbstractFixer implements Confi
if (\PHP_VERSION_ID < 8_00_00) { // @TODO: drop condition when PHP 8.0+ is required
foreach ([self::ELEMENTS_PARAMETERS, self::MATCH_EXPRESSIONS] as $option) {
if (\in_array($option, $value, true)) {
- throw new InvalidOptionsForEnvException(sprintf('"%s" option can only be enabled with PHP 8.0+.', $option));
+ throw new InvalidOptionsForEnvException(\sprintf('"%s" option can only be enabled with PHP 8.0+.', $option));
}
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php
index c1a2b132..6046f8f1 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php
@@ -354,7 +354,7 @@ return $foo === count($bar);
private function fixTokensComparePart(Tokens $tokens, int $start, int $end): Tokens
{
$newTokens = $tokens->generatePartialCode($start, $end);
- $newTokens = $this->fixTokens(Tokens::fromCode(sprintf('fixTokens(Tokens::fromCode(\sprintf('clearAt(\count($newTokens) - 1);
$newTokens->clearAt(0);
$newTokens->clearEmptyTokens();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php
index f13cfd65..4feb68b8 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php
@@ -223,7 +223,7 @@ $c = get_class($d);
->setAllowedValues([static function (array $value): bool {
foreach ($value as $functionName) {
if ('' === trim($functionName) || trim($functionName) !== $functionName) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Each element must be a non-empty, trimmed string, got "%s" instead.',
get_debug_type($functionName)
));
@@ -239,7 +239,7 @@ $c = get_class($d);
->setAllowedValues([static function (array $value): bool {
foreach ($value as $functionName) {
if ('' === trim($functionName) || trim($functionName) !== $functionName) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Each element must be a non-empty, trimmed string, got "%s" instead.',
get_debug_type($functionName)
));
@@ -252,7 +252,7 @@ $c = get_class($d);
];
if (str_starts_with($functionName, '@') && !\in_array($functionName, $sets, true)) {
- throw new InvalidOptionsException(sprintf('Unknown set "%s", known sets are %s.', $functionName, Utils::naturalLanguageJoin($sets)));
+ throw new InvalidOptionsException(\sprintf('Unknown set "%s", known sets are %s.', $functionName, Utils::naturalLanguageJoin($sets)));
}
}
@@ -378,6 +378,7 @@ $c = get_class($d);
'is_string',
'ord',
'sizeof',
+ 'sprintf',
'strlen',
'strval',
// @see https://github.com/php/php-src/blob/php-7.2.6/ext/opcache/Optimizer/pass1_5.c
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
index 6d1b78bd..182e0783 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
@@ -187,7 +187,7 @@ function bar($foo) {}
continue;
}
- if (!$this->isValidSyntax(sprintf(self::TYPE_CHECK_TEMPLATE, $paramType))) {
+ if (!$this->isValidSyntax(\sprintf(self::TYPE_CHECK_TEMPLATE, $paramType))) {
continue;
}
@@ -201,7 +201,7 @@ function bar($foo) {}
protected function createTokensFromRawType(string $type): Tokens
{
- $typeTokens = Tokens::fromCode(sprintf(self::TYPE_CHECK_TEMPLATE, $type));
+ $typeTokens = Tokens::fromCode(\sprintf(self::TYPE_CHECK_TEMPLATE, $type));
$typeTokens->clearRange(0, 4);
$typeTokens->clearRange(\count($typeTokens) - 6, \count($typeTokens) - 1);
$typeTokens->clearEmptyTokens();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php
index 9a0a5ec2..8b434ac2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php
@@ -125,7 +125,7 @@ class Foo {
protected function createTokensFromRawType(string $type): Tokens
{
- $typeTokens = Tokens::fromCode(sprintf(self::TYPE_CHECK_TEMPLATE, $type));
+ $typeTokens = Tokens::fromCode(\sprintf(self::TYPE_CHECK_TEMPLATE, $type));
$typeTokens->clearRange(0, 8);
$typeTokens->clearRange(\count($typeTokens) - 5, \count($typeTokens) - 1);
$typeTokens->clearEmptyTokens();
@@ -176,7 +176,7 @@ class Foo {
continue;
}
- if (!$this->isValidSyntax(sprintf(self::TYPE_CHECK_TEMPLATE, $propertyType))) {
+ if (!$this->isValidSyntax(\sprintf(self::TYPE_CHECK_TEMPLATE, $propertyType))) {
continue;
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php
index 1acffc0e..960b3727 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php
@@ -205,7 +205,7 @@ final class Foo {
continue;
}
- if (!$this->isValidSyntax(sprintf(self::TYPE_CHECK_TEMPLATE, $returnType))) {
+ if (!$this->isValidSyntax(\sprintf(self::TYPE_CHECK_TEMPLATE, $returnType))) {
continue;
}
@@ -224,7 +224,7 @@ final class Foo {
protected function createTokensFromRawType(string $type): Tokens
{
- $typeTokens = Tokens::fromCode(sprintf(self::TYPE_CHECK_TEMPLATE, $type));
+ $typeTokens = Tokens::fromCode(\sprintf(self::TYPE_CHECK_TEMPLATE, $type));
$typeTokens->clearRange(0, 7);
$typeTokens->clearRange(\count($typeTokens) - 3, \count($typeTokens) - 1);
$typeTokens->clearEmptyTokens();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php
index 0999993a..df9af1f0 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php
@@ -98,7 +98,7 @@ final class GroupImportFixer extends AbstractFixer implements ConfigurableFixerI
foreach ($types as $type) {
if (!\in_array($type, $allowedTypes, true)) {
throw new InvalidOptionsException(
- sprintf(
+ \sprintf(
'Invalid group type: %s, allowed types: %s.',
$type,
Utils::naturalLanguageJoin($allowedTypes)
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php
index 0bf2560a..eea91b49 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php
@@ -271,7 +271,7 @@ use Bar;
if (null !== $value) {
$missing = array_diff($supportedSortTypes, $value);
if (\count($missing) > 0) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Missing sort %s %s.',
1 === \count($missing) ? 'type' : 'types',
Utils::naturalLanguageJoin($missing)
@@ -280,7 +280,7 @@ use Bar;
$unknown = array_diff($value, $supportedSortTypes);
if (\count($unknown) > 0) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Unknown sort %s %s.',
1 === \count($unknown) ? 'type' : 'types',
Utils::naturalLanguageJoin($unknown)
@@ -562,7 +562,7 @@ use Bar;
// Now insert the new tokens, starting from the end
foreach (array_reverse($usesOrder, true) as $index => $use) {
- $code = sprintf(
+ $code = \sprintf(
'isNullable()) {
+ $type = $typeAnalysis->getName();
+
+ if ('null' === strtolower($type) || !$typeAnalysis->isNullable()) {
return false;
}
- $type = $typeAnalysis->getName();
-
if (str_contains($type, '&')) {
return false; // skip DNF types
}
@@ -307,18 +307,18 @@ class ValueObject
private function createTypeDeclarationTokens(array $types, bool $isQuestionMarkSyntax): array
{
static $specialTypes = [
- '?' => [CT::T_NULLABLE_TYPE, '?'],
- 'array' => [CT::T_ARRAY_TYPEHINT, 'array'],
- 'callable' => [T_CALLABLE, 'callable'],
- 'static' => [T_STATIC, 'static'],
+ '?' => CT::T_NULLABLE_TYPE,
+ 'array' => CT::T_ARRAY_TYPEHINT,
+ 'callable' => T_CALLABLE,
+ 'static' => T_STATIC,
];
$count = \count($types);
$newTokens = [];
foreach ($types as $index => $type) {
- if (isset($specialTypes[$type])) {
- $newTokens[] = new Token($specialTypes[$type]);
+ if (isset($specialTypes[strtolower($type)])) {
+ $newTokens[] = new Token([$specialTypes[strtolower($type)], $type]);
} else {
foreach (explode('\\', $type) as $nsIndex => $value) {
if (0 === $nsIndex && '' === $value) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php
index b1b178b6..cf2f84f4 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php
@@ -376,7 +376,7 @@ $array = [
foreach ($option as $operator => $value) {
if (!\in_array($operator, self::SUPPORTED_OPERATORS, true)) {
throw new InvalidOptionsException(
- sprintf(
+ \sprintf(
'Unexpected "operators" key, expected any of %s, got "%s".',
Utils::naturalLanguageJoin(self::SUPPORTED_OPERATORS),
\gettype($operator).'#'.$operator
@@ -386,7 +386,7 @@ $array = [
if (!\in_array($value, self::$allowedValues, true)) {
throw new InvalidOptionsException(
- sprintf(
+ \sprintf(
'Unexpected value for operator "%s", expected any of %s, got "%s".',
$operator,
Utils::naturalLanguageJoin(array_map(
@@ -631,7 +631,7 @@ $array = [
&& ('=' !== $content || !$this->isEqualPartOfDeclareStatement($tokens, $index))
&& $newLineFoundSinceLastPlaceholder
) {
- $tokens[$index] = new Token(sprintf(self::ALIGN_PLACEHOLDER, $this->currentLevel).$content);
+ $tokens[$index] = new Token(\sprintf(self::ALIGN_PLACEHOLDER, $this->currentLevel).$content);
$newLineFoundSinceLastPlaceholder = false;
continue;
@@ -764,7 +764,7 @@ $array = [
++$this->deepestLevel;
++$this->currentLevel;
}
- $tokenContent = sprintf(self::ALIGN_PLACEHOLDER, $this->currentLevel).$token->getContent();
+ $tokenContent = \sprintf(self::ALIGN_PLACEHOLDER, $this->currentLevel).$token->getContent();
$nextToken = $tokens[$index + 1];
if (!$nextToken->isWhitespace()) {
@@ -871,7 +871,7 @@ $array = [
$tmpCode = $tokens->generateCode();
for ($j = 0; $j <= $this->deepestLevel; ++$j) {
- $placeholder = sprintf(self::ALIGN_PLACEHOLDER, $j);
+ $placeholder = \sprintf(self::ALIGN_PLACEHOLDER, $j);
if (!str_contains($tmpCode, $placeholder)) {
continue;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php
index ae89a8f4..c9d962c3 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php
@@ -133,7 +133,7 @@ final class ConcatSpaceFixer extends AbstractFixer implements ConfigurableFixerI
private function fixWhiteSpaceAroundConcatToken(Tokens $tokens, int $index, int $offset): void
{
if (-1 !== $offset && 1 !== $offset) {
- throw new \InvalidArgumentException(sprintf(
+ throw new \InvalidArgumentException(\sprintf(
'Expected `-1|1` for "$offset", got "%s"',
$offset
));
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php
index e1621fc8..f7f1af3e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithParenthesesFixer.php
@@ -89,7 +89,7 @@ final class NewWithParenthesesFixer extends AbstractFixer implements Configurabl
->getOption(),
(new FixerOptionBuilder('anonymous_class', 'Whether anonymous classes should be followed by parentheses.'))
->setAllowedTypes(['bool'])
- ->setDefault(true)
+ ->setDefault(true) // @TODO 4.0: set to `false`
->getOption(),
]);
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php
index a2cdd158..f42196d2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoUselessConcatOperatorFixer.php
@@ -356,7 +356,7 @@ final class NoUselessConcatOperatorFixer extends AbstractFixer implements Config
}
$allowedPatternsForSecondOperand = [
- '/^\s.*/', // e.g. " foo", ' bar', " $baz"
+ '/^ .*/', // e.g. " foo", ' bar', " $baz"
'/^-(?!\>)/', // e.g. "-foo", '-bar', "-$baz"
];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAttributesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAttributesFixer.php
index a6246afd..6186798c 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAttributesFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitAttributesFixer.php
@@ -18,6 +18,11 @@ use PhpCsFixer\DocBlock\Annotation;
use PhpCsFixer\DocBlock\DocBlock;
use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
use PhpCsFixer\Fixer\AttributeNotation\OrderedAttributesFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ConfigurableFixerTrait;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\FixerDefinition\VersionSpecification;
@@ -31,9 +36,21 @@ use PhpCsFixer\Tokenizer\Tokens;
/**
* @author Kuba Werłos
+ *
+ * @implements ConfigurableFixerInterface<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration>
+ *
+ * @phpstan-type _AutogeneratedInputConfiguration array{
+ * keep_annotations?: bool
+ * }
+ * @phpstan-type _AutogeneratedComputedConfiguration array{
+ * keep_annotations: bool
+ * }
*/
-final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
+final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
{
+ /** @use ConfigurableFixerTrait<_AutogeneratedInputConfiguration, _AutogeneratedComputedConfiguration> */
+ use ConfigurableFixerTrait;
+
/** @var array */
private array $fixingMap;
@@ -45,29 +62,29 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
public function getDefinition(): FixerDefinitionInterface
{
+ $codeSample = <<<'PHP'
+ true]),
],
);
}
@@ -87,6 +104,16 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
return 8;
}
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('keep_annotations', 'Whether to keep annotations or not. This may be helpful for projects that support PHP before version 8 or PHPUnit before version 10.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+
protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
{
$classIndex = $tokens->getPrevTokenOfKind($startIndex, [[T_CLASS]]);
@@ -109,6 +136,7 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
$docBlock = new DocBlock($tokens[$index]->getContent());
+ $presentAttributes = [];
foreach (array_reverse($docBlock->getAnnotations()) as $annotation) {
$annotationName = $annotation->getTag()->getName();
@@ -122,7 +150,11 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
/** @phpstan-ignore-next-line */
$tokensToInsert = self::{$this->fixingMap[$annotationName]}($tokens, $index, $annotation);
- if (self::isAttributeAlreadyPresent($tokens, $index, $tokensToInsert)) {
+ if (!isset($presentAttributes[$annotationName])) {
+ $presentAttributes[$annotationName] = self::isAttributeAlreadyPresent($tokens, $index, $tokensToInsert);
+ }
+
+ if ($presentAttributes[$annotationName]) {
continue;
}
@@ -131,7 +163,10 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
}
$tokens->insertSlices([$index + 1 => $tokensToInsert]);
- $annotation->remove();
+
+ if (!$this->configuration['keep_annotations']) {
+ $annotation->remove();
+ }
}
if ('' === $docBlock->getContent()) {
@@ -262,7 +297,7 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
private static function fixWithSingleStringValue(Tokens $tokens, int $index, Annotation $annotation): array
{
Preg::match(
- sprintf('/@%s\s+(.*\S)(?:\R|\s*\*+\/$)/', $annotation->getTag()->getName()),
+ \sprintf('/@%s\s+(.*\S)(?:\R|\s*\*+\/$)/', $annotation->getTag()->getName()),
$annotation->getContent(),
$matches,
);
@@ -302,6 +337,7 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
private static function fixCovers(Tokens $tokens, int $index, Annotation $annotation): array
{
$matches = self::getMatches($annotation);
+ \assert(isset($matches[1]));
if (str_starts_with($matches[1], '::')) {
return self::createAttributeTokens($tokens, $index, 'CoversFunction', self::createEscapedStringToken(substr($matches[1], 2)));
@@ -329,6 +365,7 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
}
if (str_contains($matches[1], '::')) {
+ // @phpstan-ignore offsetAccess.notFound
[$class, $method] = explode('::', $matches[1]);
return self::createAttributeTokens(
@@ -372,7 +409,9 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
$class = null;
$method = $depended;
if (str_contains($depended, '::')) {
+ // @phpstan-ignore offsetAccess.notFound
[$class, $method] = explode('::', $depended);
+
if ('class' === $method) {
$method = null;
$nameSuffix = '' === $nameSuffix ? 'OnClass' : ('OnClass'.$nameSuffix);
@@ -402,6 +441,7 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
private static function fixRequires(Tokens $tokens, int $index, Annotation $annotation): array
{
$matches = self::getMatches($annotation);
+ \assert(isset($matches[1]));
$map = [
'extension' => 'RequiresPhpExtension',
@@ -420,9 +460,12 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
$attributeName = $map[$matches[1]];
if ('RequiresFunction' === $attributeName && str_contains($matches[2], '::')) {
+ // @phpstan-ignore offsetAccess.notFound
[$class, $method] = explode('::', $matches[2]);
+
$attributeName = 'RequiresMethod';
- $attributeTokens = [...self::toClassConstant($class),
+ $attributeTokens = [
+ ...self::toClassConstant($class),
new Token(','),
new Token([T_WHITESPACE, ' ']),
self::createEscapedStringToken($method),
@@ -495,7 +538,7 @@ final class PhpUnitAttributesFixer extends AbstractPhpUnitFixer
private static function getMatches(Annotation $annotation): array
{
Preg::match(
- sprintf('/@%s\s+(\S+)(?:\s+(\S+))?(?:\s+(.+\S))?\s*(?:\R|\*+\/$)/', $annotation->getTag()->getName()),
+ \sprintf('/@%s\s+(\S+)(?:\s+(\S+))?(?:\s+(.+\S))?\s*(?:\R|\*+\/$)/', $annotation->getTag()->getName()),
$annotation->getContent(),
$matches,
);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php
index c96efca8..3da661d3 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDataProviderNameFixer.php
@@ -163,8 +163,8 @@ class FooTest extends TestCase {
$tokens[$dataProviderAnalysis->getNameIndex()] = new Token([T_STRING, $dataProviderNewName]);
$newCommentContent = Preg::replace(
- sprintf('/(@dataProvider\s+)%s/', $dataProviderAnalysis->getName()),
- sprintf('$1%s', $dataProviderNewName),
+ \sprintf('/(@dataProvider\s+)%s/', $dataProviderAnalysis->getName()),
+ \sprintf('$1%s', $dataProviderNewName),
$tokens[$usageIndex]->getContent(),
);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php
index 6f443725..07688253 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php
@@ -24,7 +24,6 @@ use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
-use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
use PhpCsFixer\Tokenizer\CT;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
@@ -171,7 +170,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
/**
* {@inheritdoc}
*
- * Must run before NoUnusedImportsFixer, PhpUnitDedicateAssertInternalTypeFixer.
+ * Must run before NoUnusedImportsFixer, PhpUnitAssertNewNamesFixer, PhpUnitDedicateAssertInternalTypeFixer.
* Must run after ModernizeStrposFixer, NoAliasFunctionsFixer, PhpUnitConstructFixer.
*/
public function getPriority(): int
@@ -241,21 +240,18 @@ final class MyTest extends \PHPUnit_Framework_TestCase
foreach ($this->getPreviousAssertCall($tokens, $startIndex, $endIndex) as $assertCall) {
// test and fix for assertTrue/False to dedicated asserts
- if ('asserttrue' === $assertCall['loweredName'] || 'assertfalse' === $assertCall['loweredName']) {
+ if (\in_array($assertCall['loweredName'], ['asserttrue', 'assertfalse'], true)) {
$this->fixAssertTrueFalse($tokens, $argumentsAnalyzer, $assertCall);
continue;
}
- if (
- 'assertsame' === $assertCall['loweredName']
- || 'assertnotsame' === $assertCall['loweredName']
- || 'assertequals' === $assertCall['loweredName']
- || 'assertnotequals' === $assertCall['loweredName']
- ) {
+ if (\in_array(
+ $assertCall['loweredName'],
+ ['assertsame', 'assertnotsame', 'assertequals', 'assertnotequals'],
+ true
+ )) {
$this->fixAssertSameEquals($tokens, $assertCall);
-
- continue;
}
}
}
@@ -495,7 +491,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
$lowerContent = strtolower($tokens[$countCallIndex]->getContent());
- if ('count' !== $lowerContent && 'sizeof' !== $lowerContent) {
+ if (!\in_array($lowerContent, ['count', 'sizeof'], true)) {
return; // not a call to "count" or "sizeOf"
}
@@ -527,52 +523,6 @@ final class MyTest extends \PHPUnit_Framework_TestCase
]);
}
- /**
- * @return iterable
- */
- private function getPreviousAssertCall(Tokens $tokens, int $startIndex, int $endIndex): iterable
- {
- $functionsAnalyzer = new FunctionsAnalyzer();
-
- for ($index = $endIndex; $index > $startIndex; --$index) {
- $index = $tokens->getPrevTokenOfKind($index, [[T_STRING]]);
-
- if (null === $index) {
- return;
- }
-
- // test if "assert" something call
- $loweredContent = strtolower($tokens[$index]->getContent());
-
- if (!str_starts_with($loweredContent, 'assert')) {
- continue;
- }
-
- // test candidate for simple calls like: ([\]+'some fixable call'(...))
- $openBraceIndex = $tokens->getNextMeaningfulToken($index);
-
- if (!$tokens[$openBraceIndex]->equals('(')) {
- continue;
- }
-
- if (!$functionsAnalyzer->isTheSameClassCall($tokens, $index)) {
- continue;
- }
-
- yield [
- 'index' => $index,
- 'loweredName' => $loweredContent,
- 'openBraceIndex' => $openBraceIndex,
- 'closeBraceIndex' => $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openBraceIndex),
- ];
- }
- }
-
private function removeFunctionCall(Tokens $tokens, ?int $callNSIndex, int $callIndex, int $openIndex, int $closeIndex): void
{
$tokens->clearTokenAndMergeSurroundingWhitespace($callIndex);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php
index 2429288a..24ef2b79 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php
@@ -230,6 +230,10 @@ final class MyTest extends \PHPUnit_Framework_TestCase
$argStart = array_keys($arguments)[$cnt];
$argBefore = $tokens->getPrevMeaningfulToken($argStart);
+ if (!isset($argumentsReplacements[$cnt])) {
+ throw new \LogicException(\sprintf('Unexpected index %d to find replacement method.', $cnt));
+ }
+
if ('expectExceptionMessage' === $argumentsReplacements[$cnt]) {
$paramIndicatorIndex = $tokens->getNextMeaningfulToken($argBefore);
$afterParamIndicatorIndex = $tokens->getNextMeaningfulToken($paramIndicatorIndex);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php
index 23868a4a..230535c8 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php
@@ -188,7 +188,7 @@ class MyTest extends \PhpUnit\FrameWork\TestCase
continue;
}
- $newLineContent = Preg::replaceCallback('/(@depends\s+)(.+)(\b)/', fn (array $matches): string => sprintf(
+ $newLineContent = Preg::replaceCallback('/(@depends\s+)(.+)(\b)/', fn (array $matches): string => \sprintf(
'%s%s%s',
$matches[1],
$this->updateMethodCasing($matches[2]),
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php
index 4bd1800a..8ecc1c2d 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php
@@ -37,6 +37,7 @@ final class PhpUnitTargetVersion
public const VERSION_6_0 = '6.0';
public const VERSION_7_5 = '7.5';
public const VERSION_8_4 = '8.4';
+ public const VERSION_9_1 = '9.1';
public const VERSION_NEWEST = 'newest';
private function __construct() {}
@@ -44,7 +45,7 @@ final class PhpUnitTargetVersion
public static function fulfills(string $candidate, string $target): bool
{
if (self::VERSION_NEWEST === $target) {
- throw new \LogicException(sprintf('Parameter `target` shall not be provided as "%s", determine proper target for tested PHPUnit feature instead.', self::VERSION_NEWEST));
+ throw new \LogicException(\sprintf('Parameter `target` shall not be provided as "%s", determine proper target for tested PHPUnit feature instead.', self::VERSION_NEWEST));
}
if (self::VERSION_NEWEST === $candidate) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php
index e6d34bc0..10b68b28 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php
@@ -393,7 +393,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
foreach ($option as $method => $value) {
if (!isset(self::STATIC_METHODS[$method])) {
throw new InvalidOptionsException(
- sprintf(
+ \sprintf(
'Unexpected "methods" key, expected any of %s, got "%s".',
Utils::naturalLanguageJoin(array_keys(self::STATIC_METHODS)),
\gettype($method).'#'.$method
@@ -403,7 +403,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
if (!isset(self::ALLOWED_VALUES[$value])) {
throw new InvalidOptionsException(
- sprintf(
+ \sprintf(
'Unexpected value for method "%s", expected any of %s, got "%s".',
$method,
Utils::naturalLanguageJoin(array_keys(self::ALLOWED_VALUES)),
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php
index 554b716e..4926a4b5 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php
@@ -121,7 +121,7 @@ final class GeneralPhpdocTagRenameFixer extends AbstractFixer implements Configu
}
if (!Preg::match('#^\S+$#', $to) || str_contains($to, '*/')) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Tag "%s" cannot be replaced by invalid tag "%s".',
$from,
$to
@@ -135,7 +135,7 @@ final class GeneralPhpdocTagRenameFixer extends AbstractFixer implements Configu
$lowercaseFrom = strtolower($from);
if (isset($normalizedValue[$lowercaseFrom]) && $normalizedValue[$lowercaseFrom] !== $to) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Tag "%s" cannot be configured to be replaced with several different tags when case sensitivity is off.',
$from
));
@@ -149,7 +149,7 @@ final class GeneralPhpdocTagRenameFixer extends AbstractFixer implements Configu
foreach ($normalizedValue as $from => $to) {
if (isset($normalizedValue[$to]) && $normalizedValue[$to] !== $to) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Cannot change tag "%1$s" to tag "%2$s", as the tag "%2$s" is configured to be replaced to "%3$s".',
$from,
$to,
@@ -185,7 +185,7 @@ final class GeneralPhpdocTagRenameFixer extends AbstractFixer implements Configu
$caseInsensitive = false === $this->configuration['case_sensitive'];
$replacements = $this->configuration['replacements'];
- $regex = sprintf($regex, implode('|', array_keys($replacements)));
+ $regex = \sprintf($regex, implode('|', array_keys($replacements)));
if ($caseInsensitive) {
$regex .= 'i';
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
index a6c16b6b..ab32d7ee 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
@@ -620,7 +620,10 @@ class Foo {
// retry comparison with annotation type unioned with null
// phpstan implies the null presence from the native type
- return $actualTypes === $this->toComparableNames(array_merge($annotationTypes, ['null']), null, null, []);
+ $annotationTypes = array_merge($annotationTypes, ['null']);
+ sort($annotationTypes);
+
+ return $actualTypes === $annotationTypes;
}
/**
@@ -637,6 +640,13 @@ class Foo {
*/
private function toComparableNames(array $types, ?string $namespace, ?string $currentSymbol, array $symbolShortNames): array
{
+ if (isset($types[0][0]) && '?' === $types[0][0]) {
+ $types = [
+ substr($types[0], 1),
+ 'null',
+ ];
+ }
+
$normalized = array_map(
function (string $type) use ($namespace, $currentSymbol, $symbolShortNames): string {
if (str_contains($type, '&')) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
index 62742d1e..20bf2118 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
@@ -199,7 +199,7 @@ function f9(string $foo, $bar, $baz) {}
$type = 'null|'.$type;
}
- $newLines[] = new Line(sprintf(
+ $newLines[] = new Line(\sprintf(
'%s* @param %s %s%s',
$indent,
$type,
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php
index fd48122e..756086b5 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php
@@ -106,7 +106,7 @@ function foo ($bar) {}
$startLine = $doc->getLine($annotation->getStart());
$optionalTypeRegEx = $annotation->supportTypes()
- ? sprintf('(?:%s\s+(?:\$\w+\s+)?)?', preg_quote(implode('|', $annotation->getTypes()), '/'))
+ ? \sprintf('(?:%s\s+(?:\$\w+\s+)?)?', preg_quote(implode('|', $annotation->getTypes()), '/'))
: '';
$content = Preg::replaceCallback(
'/^(\s*\*\s*@\w+\s+'.$optionalTypeRegEx.')(\p{Lu}?(?=\p{Ll}|\p{Zs}))(.*)$/',
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php
index 9690977a..818595d2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php
@@ -63,7 +63,9 @@ class DocBlocks
protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
{
- foreach ($tokens as $index => $token) {
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
if (!$token->isGivenKind(T_DOC_COMMENT)) {
continue;
}
@@ -95,7 +97,13 @@ class DocBlocks
$newPrevContent = $this->fixWhitespaceBeforeDocblock($prevToken->getContent(), $indent);
- if ('' !== $newPrevContent) {
+ $tokens[$index] = new Token([T_DOC_COMMENT, $this->fixDocBlock($token->getContent(), $indent)]);
+
+ if (!$prevToken->isWhitespace()) {
+ if ('' !== $indent) {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, $indent]));
+ }
+ } elseif ('' !== $newPrevContent) {
if ($prevToken->isArray()) {
$tokens[$prevIndex] = new Token([$prevToken->getId(), $newPrevContent]);
} else {
@@ -104,8 +112,6 @@ class DocBlocks
} else {
$tokens->clearAt($prevIndex);
}
-
- $tokens[$index] = new Token([T_DOC_COMMENT, $this->fixDocBlock($token->getContent(), $indent)]);
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php
index de278009..a37b9b83 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php
@@ -89,7 +89,7 @@ final class PhpdocInlineTagNormalizerFixer extends AbstractFixer implements Conf
// remove spaces between '{' and '@', remove white space between end
// of text and closing bracket and between the tag and inline comment.
$content = Preg::replaceCallback(
- sprintf(
+ \sprintf(
'#(?:@{+|{+\h*@)\h*(%s)\b([^}]*)(?:}+)#i',
implode('|', array_map(static fn (string $tag): string => preg_quote($tag, '/'), $this->configuration['tags']))
),
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
index 66510c51..74f0eb40 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
@@ -106,7 +106,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
for ($index = $tokens->count() - 1; $index > 0; --$index) {
foreach ($this->configuration['annotations'] as $type => $typeLowerCase) {
- $findPattern = sprintf(
+ $findPattern = \sprintf(
'/@%s\s.+@%s\s/s',
$type,
$type
@@ -125,7 +125,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
$annotationMap = [];
if (\in_array($type, ['property', 'property-read', 'property-write'], true)) {
- $replacePattern = sprintf(
+ $replacePattern = \sprintf(
'/(?s)\*\s*@%s\s+(?P.+\s+)?\$(?P\S+).*/',
$type
);
@@ -135,7 +135,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
$replacePattern = '/(?s)\*\s*@method\s+(?P.+\s+)?(?P.+)\(.*/';
$replacement = '\2';
} else {
- $replacePattern = sprintf(
+ $replacePattern = \sprintf(
'/\*\s*@%s\s+(?P.+)/',
$typeLowerCase
);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
index 4040702b..d0cd912d 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
@@ -159,7 +159,7 @@ class Sample
}
if (!isset($default[$from])) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Unknown key "%s", expected any of %s.',
\gettype($from).'#'.$from,
Utils::naturalLanguageJoin(array_keys($default))
@@ -167,7 +167,7 @@ class Sample
}
if (!\in_array($to, self::$toTypes, true)) {
- throw new InvalidOptionsException(sprintf(
+ throw new InvalidOptionsException(\sprintf(
'Unknown value "%s", expected any of %s.',
\is_object($to) ? \get_class($to) : \gettype($to).(\is_resource($to) ? '' : '#'.$to),
Utils::naturalLanguageJoin(self::$toTypes)
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php
index 626de718..d047b457 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php
@@ -44,10 +44,8 @@ final class PhpdocScalarFixer extends AbstractPhpdocTypesFixer implements Config
/**
* The types to fix.
- *
- * @var array
*/
- private static array $types = [
+ private const TYPES_MAP = [
'boolean' => 'bool',
'callback' => 'callable',
'double' => 'float',
@@ -114,7 +112,7 @@ function sample($a, $b, $c)
protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
{
- $types = array_keys(self::$types);
+ $types = array_keys(self::TYPES_MAP);
return new FixerConfigurationResolver([
(new FixerOptionBuilder('types', 'A list of types to fix.'))
@@ -133,7 +131,7 @@ function sample($a, $b, $c)
}
if (\in_array($type, $this->configuration['types'], true)) {
- $type = self::$types[$type];
+ $type = self::TYPES_MAP[$type];
}
return $type.$suffix;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php
index bf2e0102..150115c6 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php
@@ -92,7 +92,7 @@ final class PhpdocTagTypeFixer extends AbstractFixer implements ConfigurableFixe
return;
}
- $regularExpression = sprintf(
+ $regularExpression = \sprintf(
'/({?@(?:%s).*?(?:(?=\s\*\/)|(?=\n)}?))/i',
implode('|', array_map(
static fn (string $tag): string => preg_quote($tag, '/'),
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php
index 249a07be..4615b693 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php
@@ -64,10 +64,10 @@ final class FixerConfigurationResolver implements FixerConfigurationResolverInte
if (\array_key_exists($alias, $configuration)) {
if (\array_key_exists($name, $configuration)) {
- throw new InvalidOptionsException(sprintf('Aliased option "%s"/"%s" is passed multiple times.', $name, $alias));
+ throw new InvalidOptionsException(\sprintf('Aliased option "%s"/"%s" is passed multiple times.', $name, $alias));
}
- Utils::triggerDeprecation(new \RuntimeException(sprintf(
+ Utils::triggerDeprecation(new \RuntimeException(\sprintf(
'Option "%s" is deprecated, use "%s" instead.',
$alias,
$name
@@ -138,7 +138,7 @@ final class FixerConfigurationResolver implements FixerConfigurationResolverInte
$name = $option->getName();
if (\in_array($name, $this->registeredNames, true)) {
- throw new \LogicException(sprintf('The "%s" option is defined multiple times.', $name));
+ throw new \LogicException(\sprintf('The "%s" option is defined multiple times.', $name));
}
$this->options[] = $option;
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerFactory.php b/vendor/friendsofphp/php-cs-fixer/src/FixerFactory.php
index 7c63ddb6..8b422396 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/FixerFactory.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerFactory.php
@@ -132,11 +132,11 @@ final class FixerFactory
$name = $fixer->getName();
if (isset($this->fixersByName[$name])) {
- throw new \UnexpectedValueException(sprintf('Fixer named "%s" is already registered.', $name));
+ throw new \UnexpectedValueException(\sprintf('Fixer named "%s" is already registered.', $name));
}
if (!$this->nameValidator->isValid($name, $isCustom)) {
- throw new \UnexpectedValueException(sprintf('Fixer named "%s" has invalid name.', $name));
+ throw new \UnexpectedValueException(\sprintf('Fixer named "%s" has invalid name.', $name));
}
$this->fixers[] = $fixer;
@@ -159,7 +159,7 @@ final class FixerFactory
$fixerNames = array_keys($ruleSet->getRules());
foreach ($fixerNames as $name) {
if (!\array_key_exists($name, $this->fixersByName)) {
- throw new \UnexpectedValueException(sprintf('Rule "%s" does not exist.', $name));
+ throw new \UnexpectedValueException(\sprintf('Rule "%s" does not exist.', $name));
}
$fixer = $this->fixersByName[$name];
@@ -239,7 +239,7 @@ final class FixerFactory
);
if (\count($report[$fixer]) > 0) {
- $message .= sprintf("\n- \"%s\" with %s", $fixer, Utils::naturalLanguageJoin($report[$fixer]));
+ $message .= \sprintf("\n- \"%s\" with %s", $fixer, Utils::naturalLanguageJoin($report[$fixer]));
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php b/vendor/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php
index 44d05c27..ed82aaa2 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php
@@ -25,7 +25,7 @@ final class PhpUnitTestCaseIndicator
public function isPhpUnitClass(Tokens $tokens, int $index): bool
{
if (!$tokens[$index]->isGivenKind(T_CLASS)) {
- throw new \LogicException(sprintf('No "T_CLASS" at given index %d, got "%s".', $index, $tokens[$index]->getName()));
+ throw new \LogicException(\sprintf('No "T_CLASS" at given index %d, got "%s".', $index, $tokens[$index]->getName()));
}
$index = $tokens->getNextMeaningfulToken($index);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php
index 7dd42b78..67fbd939 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php
@@ -143,7 +143,7 @@ final class ProcessLinter implements LinterInterface
}
if (false === @file_put_contents($this->temporaryFile, $source)) {
- throw new IOException(sprintf('Failed to write file "%s".', $this->temporaryFile), 0, null, $this->temporaryFile);
+ throw new IOException(\sprintf('Failed to write file "%s".', $this->temporaryFile), 0, null, $this->temporaryFile);
}
return $this->createProcessForFile($this->temporaryFile);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php
index 7d282d16..bbdd78c9 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php
@@ -53,25 +53,25 @@ final class ProcessLintingResult implements LintingResultInterface
}
if (null !== $this->path) {
- $needle = sprintf('in %s ', $this->path);
+ $needle = \sprintf('in %s ', $this->path);
$pos = strrpos($output, $needle);
if (false !== $pos) {
- $output = sprintf('%s%s', substr($output, 0, $pos), substr($output, $pos + \strlen($needle)));
+ $output = \sprintf('%s%s', substr($output, 0, $pos), substr($output, $pos + \strlen($needle)));
}
}
$prefix = substr($output, 0, 18);
if ('PHP Parse error: ' === $prefix) {
- return sprintf('Parse error: %s.', substr($output, 18));
+ return \sprintf('Parse error: %s.', substr($output, 18));
}
if ('PHP Fatal error: ' === $prefix) {
- return sprintf('Fatal error: %s.', substr($output, 18));
+ return \sprintf('Fatal error: %s.', substr($output, 18));
}
- return sprintf('%s.', $output);
+ return \sprintf('%s.', $output);
}
private function isSuccessful(): bool
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php
index 4880d928..01fb04a5 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php
@@ -32,7 +32,7 @@ final class TokenizerLintingResult implements LintingResultInterface
{
if (null !== $this->error) {
throw new LintingException(
- sprintf('%s: %s on line %d.', $this->getMessagePrefix(), $this->error->getMessage(), $this->error->getLine()),
+ \sprintf('%s: %s on line %d.', $this->getMessagePrefix(), $this->error->getMessage(), $this->error->getLine()),
$this->error->getCode(),
$this->error
);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Preg.php b/vendor/friendsofphp/php-cs-fixer/src/Preg.php
index 48b7e830..a88db938 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Preg.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Preg.php
@@ -196,19 +196,19 @@ final class Preg
}
if (false !== $result) {
- return new PregException(sprintf('Unknown error occurred when calling %s: %s.', $method, $errorMsg), $error);
+ return new PregException(\sprintf('Unknown error occurred when calling %s: %s.', $method, $errorMsg), $error);
}
$code = preg_last_error();
- $message = sprintf(
+ $message = \sprintf(
'(code: %d) %s',
$code,
preg_replace('~preg_[a-z_]+[()]{2}: ~', '', $errorMessage)
);
return new PregException(
- sprintf('%s(): Invalid PCRE pattern "%s": %s (version: %s)', $method, $pattern, $message, PCRE_VERSION),
+ \sprintf('%s(): Invalid PCRE pattern "%s": %s (version: %s)', $method, $pattern, $message, PCRE_VERSION),
$code
);
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php
index 57e1911b..397c6873 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php
@@ -26,13 +26,13 @@ abstract class AbstractMigrationSetDescription extends AbstractRuleSetDescriptio
$name = $this->getName();
if (Preg::match('#^@PHPUnit(\d+)(\d)Migration.*$#', $name, $matches)) {
- return sprintf('Rules to improve tests code for PHPUnit %d.%d compatibility.', $matches[1], $matches[2]);
+ return \sprintf('Rules to improve tests code for PHPUnit %d.%d compatibility.', $matches[1], $matches[2]);
}
if (Preg::match('#^@PHP([\d]{2})Migration.*$#', $name, $matches)) {
- return sprintf('Rules to improve code for PHP %d.%d compatibility.', $matches[1][0], $matches[1][1]);
+ return \sprintf('Rules to improve code for PHP %d.%d compatibility.', $matches[1][0], $matches[1][1]);
}
- throw new \RuntimeException(sprintf('Cannot generate description for "%s" "%s".', static::class, $name));
+ throw new \RuntimeException(\sprintf('Cannot generate description for "%s" "%s".', static::class, $name));
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php
index c860d963..0894f254 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php
@@ -44,7 +44,7 @@ final class RuleSet implements RuleSetInterface
}
if (\is_int($name)) {
- throw new \InvalidArgumentException(sprintf('Missing value for "%s" rule/set.', $value));
+ throw new \InvalidArgumentException(\sprintf('Missing value for "%s" rule/set.', $value));
}
if (!\is_bool($value) && !\is_array($value)) {
@@ -69,7 +69,7 @@ final class RuleSet implements RuleSetInterface
public function getRuleConfiguration(string $rule): ?array
{
if (!$this->hasRule($rule)) {
- throw new \InvalidArgumentException(sprintf('Rule "%s" is not in the set.', $rule));
+ throw new \InvalidArgumentException(\sprintf('Rule "%s" is not in the set.', $rule));
}
if (true === $this->rules[$rule]) {
@@ -97,7 +97,7 @@ final class RuleSet implements RuleSetInterface
foreach ($rules as $name => $value) {
if (str_starts_with($name, '@')) {
if (!\is_bool($value)) {
- throw new \UnexpectedValueException(sprintf('Nested rule set "%s" configuration must be a boolean.', $name));
+ throw new \UnexpectedValueException(\sprintf('Nested rule set "%s" configuration must be a boolean.', $name));
}
$set = $this->resolveSubset($name, $value);
@@ -131,7 +131,7 @@ final class RuleSet implements RuleSetInterface
if ($ruleSet instanceof DeprecatedRuleSetDescriptionInterface) {
$messageEnd = [] === $ruleSet->getSuccessorsNames()
? 'No replacement available'
- : sprintf('Use %s instead', Utils::naturalLanguageJoin($ruleSet->getSuccessorsNames()));
+ : \sprintf('Use %s instead', Utils::naturalLanguageJoin($ruleSet->getSuccessorsNames()));
Utils::triggerDeprecation(new \RuntimeException("Rule set \"{$setName}\" is deprecated. {$messageEnd}."));
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php
index 54cf2769..855a816f 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php
@@ -62,7 +62,7 @@ final class RuleSets
$definitions = self::getSetDefinitions();
if (!isset($definitions[$name])) {
- throw new \InvalidArgumentException(sprintf('Set "%s" does not exist.', $name));
+ throw new \InvalidArgumentException(\sprintf('Set "%s" does not exist.', $name));
}
return $definitions[$name];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS2x0Set.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS2x0Set.php
index f336050f..add58753 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS2x0Set.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PERCS2x0Set.php
@@ -41,6 +41,9 @@ final class PERCS2x0Set extends AbstractRuleSetDescription
'closure_fn_spacing' => 'none',
],
'method_argument_space' => true,
+ 'new_with_parentheses' => [
+ 'anonymous_class' => false,
+ ],
'single_line_empty_body' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit100MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit100MigrationRiskySet.php
index 433fa7ac..f2092648 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit100MigrationRiskySet.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit100MigrationRiskySet.php
@@ -24,7 +24,7 @@ final class PHPUnit100MigrationRiskySet extends AbstractMigrationSetDescription
public function getRules(): array
{
return [
- '@PHPUnit84Migration:risky' => true,
+ '@PHPUnit91Migration:risky' => true,
'php_unit_data_provider_static' => ['force' => true],
];
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php b/vendor/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php
index c0f736fd..97527058 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php
@@ -61,7 +61,7 @@ final class FileFilterIterator extends \FilterIterator
$file = $this->current();
if (!$file instanceof \SplFileInfo) {
throw new \RuntimeException(
- sprintf(
+ \sprintf(
'Expected instance of "\SplFileInfo", got "%s".',
get_debug_type($file)
)
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php b/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php
index feb6a962..df414113 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php
@@ -178,7 +178,7 @@ final class Runner
$serverPort = parse_url($server->getAddress() ?? '', PHP_URL_PORT);
if (!is_numeric($serverPort)) {
- throw new ParallelisationException(sprintf(
+ throw new ParallelisationException(\sprintf(
'Unable to parse server port from "%s"',
$server->getAddress() ?? ''
));
@@ -347,7 +347,7 @@ final class Runner
}
$errorsReported = Preg::matchAll(
- sprintf('/^(?:%s)([^\n]+)+/m', WorkerCommand::ERROR_PREFIX),
+ \sprintf('/^(?:%s)([^\n]+)+/m', WorkerCommand::ERROR_PREFIX),
$output,
$matches
);
@@ -490,7 +490,7 @@ final class Runner
if (!file_exists($fileName)) {
throw new IOException(
- sprintf('Failed to write file "%s" (no longer) exists.', $file->getPathname()),
+ \sprintf('Failed to write file "%s" (no longer) exists.', $file->getPathname()),
0,
null,
$file->getPathname()
@@ -499,7 +499,7 @@ final class Runner
if (is_dir($fileName)) {
throw new IOException(
- sprintf('Cannot write file "%s" as the location exists as directory.', $fileName),
+ \sprintf('Cannot write file "%s" as the location exists as directory.', $fileName),
0,
null,
$fileName
@@ -508,7 +508,7 @@ final class Runner
if (!is_writable($fileName)) {
throw new IOException(
- sprintf('Cannot write to file "%s" as it is not writable.', $fileName),
+ \sprintf('Cannot write to file "%s" as it is not writable.', $fileName),
0,
null,
$fileName
@@ -519,7 +519,7 @@ final class Runner
$error = error_get_last();
throw new IOException(
- sprintf('Failed to write file "%s", "%s".', $fileName, null !== $error ? $error['message'] : 'no reason available'),
+ \sprintf('Failed to write file "%s", "%s".', $fileName, null !== $error ? $error['message'] : 'no reason available'),
0,
null,
$fileName
diff --git a/vendor/friendsofphp/php-cs-fixer/src/StdinFileInfo.php b/vendor/friendsofphp/php-cs-fixer/src/StdinFileInfo.php
index 2fba503e..86dee2e5 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/StdinFileInfo.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/StdinFileInfo.php
@@ -60,7 +60,7 @@ final class StdinFileInfo extends \SplFileInfo
public function getFileInfo($class = null): \SplFileInfo
{
- throw new \BadMethodCallException(sprintf('Method "%s" is not implemented.', __METHOD__));
+ throw new \BadMethodCallException(\sprintf('Method "%s" is not implemented.', __METHOD__));
}
public function getFilename(): string
@@ -107,7 +107,7 @@ final class StdinFileInfo extends \SplFileInfo
public function getPathInfo($class = null): \SplFileInfo
{
- throw new \BadMethodCallException(sprintf('Method "%s" is not implemented.', __METHOD__));
+ throw new \BadMethodCallException(\sprintf('Method "%s" is not implemented.', __METHOD__));
}
public function getPathname(): string
@@ -162,7 +162,7 @@ final class StdinFileInfo extends \SplFileInfo
public function openFile($openMode = 'r', $useIncludePath = false, $context = null): \SplFileObject
{
- throw new \BadMethodCallException(sprintf('Method "%s" is not implemented.', __METHOD__));
+ throw new \BadMethodCallException(\sprintf('Method "%s" is not implemented.', __METHOD__));
}
public function setFileClass($className = null): void {}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AlternativeSyntaxAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AlternativeSyntaxAnalyzer.php
index 723d4c95..242aedd7 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AlternativeSyntaxAnalyzer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AlternativeSyntaxAnalyzer.php
@@ -74,6 +74,11 @@ final class AlternativeSyntaxAnalyzer
}
$startTokenKind = $tokens[$index]->getId();
+
+ if (!isset(self::ALTERNATIVE_SYNTAX_BLOCK_EDGES[$startTokenKind])) {
+ throw new \LogicException(\sprintf('Unknown startTokenKind: %s', $tokens[$index]->toJson()));
+ }
+
$endTokenKinds = self::ALTERNATIVE_SYNTAX_BLOCK_EDGES[$startTokenKind];
$findKinds = [[$startTokenKind]];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DataProviderAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DataProviderAnalysis.php
index 8e3b15fe..48b3644d 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DataProviderAnalysis.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DataProviderAnalysis.php
@@ -32,7 +32,7 @@ final class DataProviderAnalysis
public function __construct(string $name, int $nameIndex, array $usageIndices)
{
if (!array_is_list($usageIndices)) {
- Utils::triggerDeprecation(new \InvalidArgumentException(sprintf(
+ Utils::triggerDeprecation(new \InvalidArgumentException(\sprintf(
'Parameter "usageIndices" should be a list. This will be enforced in version %d.0.',
Application::getMajorVersion() + 1
)));
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php
index 9522e4cd..0f2f7735 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php
@@ -27,11 +27,11 @@ final class BlocksAnalyzer
public function isBlock(Tokens $tokens, int $openIndex, int $closeIndex): bool
{
if (!$tokens->offsetExists($openIndex)) {
- throw new \InvalidArgumentException(sprintf('Tokex index %d for potential block opening does not exist.', $openIndex));
+ throw new \InvalidArgumentException(\sprintf('Tokex index %d for potential block opening does not exist.', $openIndex));
}
if (!$tokens->offsetExists($closeIndex)) {
- throw new \InvalidArgumentException(sprintf('Token index %d for potential block closure does not exist.', $closeIndex));
+ throw new \InvalidArgumentException(\sprintf('Token index %d for potential block closure does not exist.', $closeIndex));
}
$blockType = $this->getBlockType($tokens[$openIndex]);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php
index 5770d01c..31e0b051 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php
@@ -27,7 +27,7 @@ final class ClassyAnalyzer
$token = $tokens[$index];
if (!$token->isGivenKind(T_STRING)) {
- throw new \LogicException(sprintf('No T_STRING at given index %d, got "%s".', $index, $tokens[$index]->getName()));
+ throw new \LogicException(\sprintf('No T_STRING at given index %d, got "%s".', $index, $tokens[$index]->getName()));
}
if ((new Analysis\TypeAnalysis($token->getContent()))->isReservedType()) {
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php
index cb7cf9c4..6c9f2543 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php
@@ -39,7 +39,7 @@ final class ControlCaseStructuresAnalyzer
foreach ($types as $type) {
if (!\in_array($type, $typesWithCaseOrDefault, true)) {
- throw new \InvalidArgumentException(sprintf('Unexpected type "%d".', $type));
+ throw new \InvalidArgumentException(\sprintf('Unexpected type "%d".', $type));
}
}
@@ -235,7 +235,7 @@ final class ControlCaseStructuresAnalyzer
);
}
- throw new \InvalidArgumentException(sprintf('Unexpected type "%d".', $analysis['kind']));
+ throw new \InvalidArgumentException(\sprintf('Unexpected type "%d".', $analysis['kind']));
}
private static function findCaseOpen(Tokens $tokens, int $kind, int $index): int
@@ -273,7 +273,7 @@ final class ControlCaseStructuresAnalyzer
return $tokens->getNextTokenOfKind($index, ['=', ';']);
}
- throw new \InvalidArgumentException(sprintf('Unexpected case for type "%d".', $kind));
+ throw new \InvalidArgumentException(\sprintf('Unexpected case for type "%d".', $kind));
}
private static function findDefaultOpen(Tokens $tokens, int $kind, int $index): int
@@ -286,7 +286,7 @@ final class ControlCaseStructuresAnalyzer
return $tokens->getNextTokenOfKind($index, [[T_DOUBLE_ARROW]]);
}
- throw new \InvalidArgumentException(sprintf('Unexpected default for type "%d".', $kind));
+ throw new \InvalidArgumentException(\sprintf('Unexpected default for type "%d".', $kind));
}
/**
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php
index bcdbe15d..65d0e6ac 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php
@@ -184,7 +184,7 @@ final class FunctionsAnalyzer
public function isTheSameClassCall(Tokens $tokens, int $index): bool
{
if (!$tokens->offsetExists($index)) {
- throw new \InvalidArgumentException(sprintf('Token index %d does not exist.', $index));
+ throw new \InvalidArgumentException(\sprintf('Token index %d does not exist.', $index));
}
$operatorIndex = $tokens->getPrevMeaningfulToken($index);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php
index 10aa1a04..69d3b419 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php
@@ -81,7 +81,7 @@ final class NamespacesAnalyzer
public function getNamespaceAt(Tokens $tokens, int $index): NamespaceAnalysis
{
if (!$tokens->offsetExists($index)) {
- throw new \InvalidArgumentException(sprintf('Token index %d does not exist.', $index));
+ throw new \InvalidArgumentException(\sprintf('Token index %d does not exist.', $index));
}
foreach ($this->getDeclarations($tokens) as $namespace) {
@@ -90,6 +90,6 @@ final class NamespacesAnalyzer
}
}
- throw new \LogicException(sprintf('Unable to get the namespace at index %d.', $index));
+ throw new \LogicException(\sprintf('Unable to get the namespace at index %d.', $index));
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php
index 6eae7cca..0230f7c5 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php
@@ -69,7 +69,7 @@ final class CT
public static function getName(int $value): string
{
if (!self::has($value)) {
- throw new \InvalidArgumentException(sprintf('No custom token was found for "%s".', $value));
+ throw new \InvalidArgumentException(\sprintf('No custom token was found for "%s".', $value));
}
$tokens = self::getMapById();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php
index 353f88ff..a15a0c61 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php
@@ -51,14 +51,14 @@ final class Token
{
if (\is_array($token)) {
if (!\is_int($token[0])) {
- throw new \InvalidArgumentException(sprintf(
+ throw new \InvalidArgumentException(\sprintf(
'Id must be an int, got "%s".',
get_debug_type($token[0])
));
}
if (!\is_string($token[1])) {
- throw new \InvalidArgumentException(sprintf(
+ throw new \InvalidArgumentException(\sprintf(
'Content must be a string, got "%s".',
get_debug_type($token[1])
));
@@ -75,7 +75,7 @@ final class Token
$this->isArray = false;
$this->content = $token;
} else {
- throw new \InvalidArgumentException(sprintf('Cannot recognize input value as valid Token prototype, got "%s".', get_debug_type($token)));
+ throw new \InvalidArgumentException(\sprintf('Cannot recognize input value as valid Token prototype, got "%s".', get_debug_type($token)));
}
}
@@ -220,7 +220,7 @@ final class Token
*/
public static function isKeyCaseSensitive($caseSensitive, int $key): bool
{
- Utils::triggerDeprecation(new \InvalidArgumentException(sprintf(
+ Utils::triggerDeprecation(new \InvalidArgumentException(\sprintf(
'Method "%s" is deprecated and will be removed in the next major version.',
__METHOD__
)));
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php
index 555742bc..f72e64c9 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php
@@ -168,7 +168,7 @@ class Tokens extends \SplFixedArray
$tokens = new self(\count($array));
if (false !== $saveIndices && !array_is_list($array)) {
- Utils::triggerDeprecation(new \InvalidArgumentException(sprintf(
+ Utils::triggerDeprecation(new \InvalidArgumentException(\sprintf(
'Parameter "array" should be a list. This will be enforced in version %d.0.',
Application::getMajorVersion() + 1
)));
@@ -319,7 +319,7 @@ class Tokens extends \SplFixedArray
public function offsetUnset($index): void
{
if (\count($this) - 1 !== $index) {
- Utils::triggerDeprecation(new \InvalidArgumentException(sprintf(
+ Utils::triggerDeprecation(new \InvalidArgumentException(\sprintf(
'Tokens should be a list - only the last index can be unset. This will be enforced in version %d.0.',
Application::getMajorVersion() + 1
)));
@@ -353,7 +353,7 @@ class Tokens extends \SplFixedArray
public function offsetSet($index, $newval): void
{
if (0 > $index || \count($this) <= $index) {
- Utils::triggerDeprecation(new \InvalidArgumentException(sprintf(
+ Utils::triggerDeprecation(new \InvalidArgumentException(\sprintf(
'Tokens should be a list - index must be within the existing range. This will be enforced in version %d.0.',
Application::getMajorVersion() + 1
)));
@@ -811,11 +811,11 @@ class Tokens extends \SplFixedArray
}
if ($token->isGivenKind($nonMeaningFullKind)) {
- throw new \InvalidArgumentException(sprintf('Non-meaningful token at position: "%s".', $key));
+ throw new \InvalidArgumentException(\sprintf('Non-meaningful token at position: "%s".', $key));
}
if ('' === $token->getContent()) {
- throw new \InvalidArgumentException(sprintf('Non-meaningful (empty) token at position: "%s".', $key));
+ throw new \InvalidArgumentException(\sprintf('Non-meaningful (empty) token at position: "%s".', $key));
}
}
@@ -930,7 +930,7 @@ class Tokens extends \SplFixedArray
// We check only the farthest index, if it's within the size of collection, other indices will be valid too.
if (!\is_int($farthestSliceIndex) || $farthestSliceIndex > $oldSize) {
- throw new \OutOfBoundsException(sprintf('Cannot insert index "%s" outside of collection.', $farthestSliceIndex));
+ throw new \OutOfBoundsException(\sprintf('Cannot insert index "%s" outside of collection.', $farthestSliceIndex));
}
$previousSliceIndex = $oldSize;
@@ -939,7 +939,7 @@ class Tokens extends \SplFixedArray
// that way we get around additional overhead this class adds with overridden offset* methods.
foreach ($slices as $index => $slice) {
if (!\is_int($index) || $index < 0) {
- throw new \OutOfBoundsException(sprintf('Invalid index "%s".', $index));
+ throw new \OutOfBoundsException(\sprintf('Invalid index "%s".', $index));
}
$slice = \is_array($slice) || $slice instanceof self ? $slice : [$slice];
@@ -1292,7 +1292,7 @@ class Tokens extends \SplFixedArray
$blockEdgeDefinitions = self::getBlockEdgeDefinitions();
if (!isset($blockEdgeDefinitions[$type])) {
- throw new \InvalidArgumentException(sprintf('Invalid param type: "%s".', $type));
+ throw new \InvalidArgumentException(\sprintf('Invalid param type: "%s".', $type));
}
if ($findEnd && isset($this->blockStartCache[$searchIndex])) {
@@ -1316,7 +1316,7 @@ class Tokens extends \SplFixedArray
}
if (!$this[$startIndex]->equals($startEdge)) {
- throw new \InvalidArgumentException(sprintf('Invalid param $startIndex - not a proper block "%s".', $findEnd ? 'start' : 'end'));
+ throw new \InvalidArgumentException(\sprintf('Invalid param $startIndex - not a proper block "%s".', $findEnd ? 'start' : 'end'));
}
$blockLevel = 0;
@@ -1340,7 +1340,7 @@ class Tokens extends \SplFixedArray
}
if (!$this[$index]->equals($endEdge)) {
- throw new \UnexpectedValueException(sprintf('Missing block "%s".', $findEnd ? 'end' : 'start'));
+ throw new \UnexpectedValueException(\sprintf('Missing block "%s".', $findEnd ? 'end' : 'start'));
}
if ($startIndex < $index) {
@@ -1372,7 +1372,7 @@ class Tokens extends \SplFixedArray
private static function getCache(string $key): self
{
if (!self::hasCache($key)) {
- throw new \OutOfBoundsException(sprintf('Unknown cache key: "%s".', $key));
+ throw new \OutOfBoundsException(\sprintf('Unknown cache key: "%s".', $key));
}
return self::$cache[$key];
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php
index 933f3a08..50f97c1e 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php
@@ -76,7 +76,7 @@ final class TokensAnalyzer
public function getClassyModifiers(int $index): array
{
if (!$this->tokens[$index]->isClassy()) {
- throw new \InvalidArgumentException(sprintf('Not an "classy" at given index %d.', $index));
+ throw new \InvalidArgumentException(\sprintf('Not an "classy" at given index %d.', $index));
}
$readOnlyPossible = \defined('T_READONLY'); // @TODO: drop condition when PHP 8.2+ is required
@@ -159,7 +159,7 @@ final class TokensAnalyzer
public function isArrayMultiLine(int $index): bool
{
if (!$this->isArray($index)) {
- throw new \InvalidArgumentException(sprintf('Not an array at given index %d.', $index));
+ throw new \InvalidArgumentException(\sprintf('Not an array at given index %d.', $index));
}
$tokens = $this->tokens;
@@ -178,7 +178,7 @@ final class TokensAnalyzer
$blockType = Tokens::detectBlockType($tokens[$index]);
if (null === $blockType || !$blockType['isStart']) {
- throw new \InvalidArgumentException(sprintf('Not an block start at given index %d.', $index));
+ throw new \InvalidArgumentException(\sprintf('Not an block start at given index %d.', $index));
}
$endIndex = $tokens->findBlockEnd($blockType['type'], $index);
@@ -213,7 +213,7 @@ final class TokensAnalyzer
public function getMethodAttributes(int $index): array
{
if (!$this->tokens[$index]->isGivenKind(T_FUNCTION)) {
- throw new \LogicException(sprintf('No T_FUNCTION at given index %d, got "%s".', $index, $this->tokens[$index]->getName()));
+ throw new \LogicException(\sprintf('No T_FUNCTION at given index %d, got "%s".', $index, $this->tokens[$index]->getName()));
}
$attributes = [
@@ -279,7 +279,7 @@ final class TokensAnalyzer
public function isAnonymousClass(int $index): bool
{
if (!$this->tokens[$index]->isClassy()) {
- throw new \LogicException(sprintf('No classy token at given index %d.', $index));
+ throw new \LogicException(\sprintf('No classy token at given index %d.', $index));
}
if (!$this->tokens[$index]->isGivenKind(T_CLASS)) {
@@ -306,7 +306,7 @@ final class TokensAnalyzer
public function isLambda(int $index): bool
{
if (!$this->tokens[$index]->isGivenKind([T_FUNCTION, T_FN])) {
- throw new \LogicException(sprintf('No T_FUNCTION or T_FN at given index %d, got "%s".', $index, $this->tokens[$index]->getName()));
+ throw new \LogicException(\sprintf('No T_FUNCTION or T_FN at given index %d, got "%s".', $index, $this->tokens[$index]->getName()));
}
$startParenthesisIndex = $this->tokens->getNextMeaningfulToken($index);
@@ -324,7 +324,7 @@ final class TokensAnalyzer
public function getLastTokenIndexOfArrowFunction(int $index): int
{
if (!$this->tokens[$index]->isGivenKind(T_FN)) {
- throw new \InvalidArgumentException(sprintf('Not an "arrow function" at given index %d.', $index));
+ throw new \InvalidArgumentException(\sprintf('Not an "arrow function" at given index %d.', $index));
}
$stopTokens = [')', ']', ',', ';', [T_CLOSE_TAG]];
@@ -361,7 +361,7 @@ final class TokensAnalyzer
public function isConstantInvocation(int $index): bool
{
if (!$this->tokens[$index]->isGivenKind(T_STRING)) {
- throw new \LogicException(sprintf('No T_STRING at given index %d, got "%s".', $index, $this->tokens[$index]->getName()));
+ throw new \LogicException(\sprintf('No T_STRING at given index %d, got "%s".', $index, $this->tokens[$index]->getName()));
}
$nextIndex = $this->tokens->getNextMeaningfulToken($index);
@@ -657,7 +657,7 @@ final class TokensAnalyzer
$token = $tokens[$index];
if (!$token->isGivenKind(T_WHILE)) {
- throw new \LogicException(sprintf('No T_WHILE at given index %d, got "%s".', $index, $token->getName()));
+ throw new \LogicException(\sprintf('No T_WHILE at given index %d, got "%s".', $index, $token->getName()));
}
$endIndex = $tokens->getPrevMeaningfulToken($index);
@@ -680,7 +680,7 @@ final class TokensAnalyzer
$token = $tokens[$caseIndex];
if (!$token->isGivenKind(T_CASE)) {
- throw new \LogicException(sprintf(
+ throw new \LogicException(\sprintf(
'No T_CASE given at index %d, got %s instead.',
$caseIndex,
$token->getName() ?? $token->getContent()
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceTransformer.php
index e4f374ad..85bfb86b 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceTransformer.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceTransformer.php
@@ -250,11 +250,11 @@ final class BraceTransformer extends AbstractTransformer
private function naivelyFindCurlyBlockEnd(Tokens $tokens, int $startIndex): int
{
if (!$tokens->offsetExists($startIndex)) {
- throw new \OutOfBoundsException(sprintf('Unavailable index: "%s".', $startIndex));
+ throw new \OutOfBoundsException(\sprintf('Unavailable index: "%s".', $startIndex));
}
if ('{' !== $tokens[$startIndex]->getContent()) {
- throw new \InvalidArgumentException(sprintf('Wrong start index: "%s".', $startIndex));
+ throw new \InvalidArgumentException(\sprintf('Wrong start index: "%s".', $startIndex));
}
$blockLevel = 1;
@@ -273,7 +273,7 @@ final class BraceTransformer extends AbstractTransformer
if (0 === $blockLevel) {
if (!$token->equals('}')) {
- throw new \UnexpectedValueException(sprintf('Detected block end for index: "%s" was already transformed into other token type: "%s".', $startIndex, $token->getName()));
+ throw new \UnexpectedValueException(\sprintf('Detected block end for index: "%s" was already transformed into other token type: "%s".', $startIndex, $token->getName()));
}
return $index;
@@ -281,6 +281,6 @@ final class BraceTransformer extends AbstractTransformer
}
}
- throw new \UnexpectedValueException(sprintf('Missing block end for index: "%s".', $startIndex));
+ throw new \UnexpectedValueException(\sprintf('Missing block end for index: "%s".', $startIndex));
}
}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ToolInfo.php b/vendor/friendsofphp/php-cs-fixer/src/ToolInfo.php
index fe5bdcea..767c680f 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/ToolInfo.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/ToolInfo.php
@@ -109,7 +109,7 @@ final class ToolInfo implements ToolInfoInterface
public function getPharDownloadUri(string $version): string
{
- return sprintf(
+ return \sprintf(
'https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/%s/php-cs-fixer.phar',
$version
);
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Utils.php b/vendor/friendsofphp/php-cs-fixer/src/Utils.php
index 08b9fc1b..89f6c43f 100755
--- a/vendor/friendsofphp/php-cs-fixer/src/Utils.php
+++ b/vendor/friendsofphp/php-cs-fixer/src/Utils.php
@@ -54,7 +54,7 @@ final class Utils
public static function calculateTrailingWhitespaceIndent(Token $token): string
{
if (!$token->isWhitespace()) {
- throw new \InvalidArgumentException(sprintf('The given token must be whitespace, got "%s".', $token->getName()));
+ throw new \InvalidArgumentException(\sprintf('The given token must be whitespace, got "%s".', $token->getName()));
}
$str = strrchr(
@@ -137,7 +137,7 @@ final class Utils
throw new \InvalidArgumentException('Wrapper should be a single-char string or empty.');
}
- $names = array_map(static fn (string $name): string => sprintf('%2$s%1$s%2$s', $name, $wrapper), $names);
+ $names = array_map(static fn (string $name): string => \sprintf('%2$s%1$s%2$s', $name, $wrapper), $names);
$last = array_pop($names);
diff --git a/vendor/nexusphp/cs-config/CHANGELOG.md b/vendor/nexusphp/cs-config/CHANGELOG.md
index 34b85a59..df51f989 100755
--- a/vendor/nexusphp/cs-config/CHANGELOG.md
+++ b/vendor/nexusphp/cs-config/CHANGELOG.md
@@ -5,6 +5,14 @@ All notable changes to this library will be documented in this file:
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [v3.24.0](https://github.com/NexusPHP/cs-config/compare/v3.23.1...v3.24.0) - 2024-07-28
+
+- Fix phpstan error
+- Remove defunct branch alias
+- Add more files to .gitattributes
+- Apply changes from php-cs-fixer v3.60
+- Implement `FixerGenerator::mergeWith()`
+
## [v3.23.1](https://github.com/NexusPHP/cs-config/compare/v3.23.0...v3.23.1) - 2024-06-16
- Refactor AbstractCustomFixerTestCase
diff --git a/vendor/nexusphp/cs-config/composer.json b/vendor/nexusphp/cs-config/composer.json
index dcb8b85a..eecb9590 100755
--- a/vendor/nexusphp/cs-config/composer.json
+++ b/vendor/nexusphp/cs-config/composer.json
@@ -17,7 +17,7 @@
"require": {
"php": "^8.1",
"ext-tokenizer": "*",
- "friendsofphp/php-cs-fixer": "^3.57.1"
+ "friendsofphp/php-cs-fixer": "^3.60"
},
"require-dev": {
"nexusphp/tachycardia": "^2.1",
@@ -49,10 +49,5 @@
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
- },
- "extra": {
- "branch-alias": {
- "dev-develop": "3.x-dev"
- }
}
}
diff --git a/vendor/nexusphp/cs-config/src/Factory.php b/vendor/nexusphp/cs-config/src/Factory.php
index 63814df6..236d7b37 100755
--- a/vendor/nexusphp/cs-config/src/Factory.php
+++ b/vendor/nexusphp/cs-config/src/Factory.php
@@ -64,7 +64,7 @@ final class Factory
public static function create(RulesetInterface $ruleset, array $overrides = [], array $options = []): self
{
if (\PHP_VERSION_ID < $ruleset->getRequiredPHPVersion()) {
- throw new \RuntimeException(sprintf(
+ throw new \RuntimeException(\sprintf(
'The "%s" ruleset requires a minimum PHP_VERSION_ID of "%d" but current PHP_VERSION_ID is "%d".',
$ruleset->getName(),
$ruleset->getRequiredPHPVersion(),
@@ -115,7 +115,7 @@ final class Factory
$email = ' <'.$email.'>';
}
- $header = sprintf(
+ $header = \sprintf(
<<<'HEADER'
This file is part of %s.
diff --git a/vendor/nexusphp/cs-config/src/Fixer/Comment/SpaceAfterCommentStartFixer.php b/vendor/nexusphp/cs-config/src/Fixer/Comment/SpaceAfterCommentStartFixer.php
index 8895b53e..53008a11 100755
--- a/vendor/nexusphp/cs-config/src/Fixer/Comment/SpaceAfterCommentStartFixer.php
+++ b/vendor/nexusphp/cs-config/src/Fixer/Comment/SpaceAfterCommentStartFixer.php
@@ -79,7 +79,9 @@ final class SpaceAfterCommentStartFixer extends AbstractCustomFixer implements D
continue;
}
- preg_match('/^\/\/(\s*)(.+)/', $comment, $matches);
+ if (preg_match('/^\/\/(\s*)(.+)/', $comment, $matches) !== 1) {
+ continue;
+ }
if (' ' === $matches[1]) {
continue;
diff --git a/vendor/nexusphp/cs-config/src/FixerGenerator.php b/vendor/nexusphp/cs-config/src/FixerGenerator.php
index b6cf314a..20625bd0 100755
--- a/vendor/nexusphp/cs-config/src/FixerGenerator.php
+++ b/vendor/nexusphp/cs-config/src/FixerGenerator.php
@@ -24,7 +24,15 @@ use Symfony\Component\Finder\SplFileInfo;
*/
final class FixerGenerator implements \IteratorAggregate
{
- private function __construct(private string $path, private string $vendor) {}
+ /**
+ * @var list<\IteratorAggregate>
+ */
+ private array $fixerIterators = [];
+
+ private function __construct(
+ private string $path,
+ private string $vendor,
+ ) {}
/**
* @throws \RuntimeException
@@ -36,7 +44,7 @@ final class FixerGenerator implements \IteratorAggregate
}
if (! is_dir($path)) {
- throw new \RuntimeException(sprintf('Path "%s" is not a valid directory.', $path));
+ throw new \RuntimeException(\sprintf('Path "%s" is not a valid directory.', $path));
}
if ('' === $vendor) {
@@ -44,12 +52,24 @@ final class FixerGenerator implements \IteratorAggregate
}
if (preg_match('/^[A-Z][a-zA-Z0-9\\\\]+$/', $vendor) !== 1) {
- throw new \RuntimeException(sprintf('Vendor namespace "%s" is not valid.', $vendor));
+ throw new \RuntimeException(\sprintf('Vendor namespace "%s" is not valid.', $vendor));
}
return new self($path, $vendor);
}
+ /**
+ * Merge other iterators that yield `FixerInterface` custom fixers.
+ *
+ * @param \IteratorAggregate ...$fixerIterators
+ */
+ public function mergeWith(\IteratorAggregate ...$fixerIterators): self
+ {
+ $this->fixerIterators = array_values($fixerIterators);
+
+ return $this;
+ }
+
/**
* @return \Traversable
*/
@@ -63,9 +83,18 @@ final class FixerGenerator implements \IteratorAggregate
->sortByName()
;
- $fixers = array_filter(array_map(
+ $otherFixers = [];
+
+ foreach ($this->fixerIterators as $fixerIterator) {
+ $otherFixers = array_merge(
+ $otherFixers,
+ iterator_to_array($fixerIterator->getIterator(), false),
+ );
+ }
+
+ $fixers = array_values(array_filter(array_map(
function (SplFileInfo $file): object {
- $fixer = sprintf(
+ $fixer = \sprintf(
'%s\\%s%s%s',
trim($this->vendor, '\\'),
strtr($file->getRelativePath(), \DIRECTORY_SEPARATOR, '\\'),
@@ -76,8 +105,8 @@ final class FixerGenerator implements \IteratorAggregate
return new $fixer();
},
iterator_to_array($finder, false),
- ), static fn(object $fixer): bool => $fixer instanceof FixerInterface);
+ ), static fn(object $fixer): bool => $fixer instanceof FixerInterface));
- yield from $fixers;
+ yield from array_merge($fixers, $otherFixers);
}
}
diff --git a/vendor/nexusphp/cs-config/src/Ruleset/Nexus80.php b/vendor/nexusphp/cs-config/src/Ruleset/Nexus80.php
index 26c827e7..4f2d0483 100755
--- a/vendor/nexusphp/cs-config/src/Ruleset/Nexus80.php
+++ b/vendor/nexusphp/cs-config/src/Ruleset/Nexus80.php
@@ -386,7 +386,9 @@ final class Nexus80 extends AbstractRuleset
'null_adjustment' => 'always_first',
'case_sensitive' => false,
],
- 'php_unit_attributes' => true,
+ 'php_unit_attributes' => [
+ 'keep_annotations' => false,
+ ],
'php_unit_construct' => [
'assertions' => [
'assertEquals',
diff --git a/vendor/nexusphp/cs-config/src/Ruleset/Nexus81.php b/vendor/nexusphp/cs-config/src/Ruleset/Nexus81.php
index a82f1228..f5079d98 100755
--- a/vendor/nexusphp/cs-config/src/Ruleset/Nexus81.php
+++ b/vendor/nexusphp/cs-config/src/Ruleset/Nexus81.php
@@ -386,7 +386,9 @@ final class Nexus81 extends AbstractRuleset
'null_adjustment' => 'always_first',
'case_sensitive' => false,
],
- 'php_unit_attributes' => true,
+ 'php_unit_attributes' => [
+ 'keep_annotations' => false,
+ ],
'php_unit_construct' => [
'assertions' => [
'assertEquals',
diff --git a/vendor/nexusphp/cs-config/src/Ruleset/Nexus82.php b/vendor/nexusphp/cs-config/src/Ruleset/Nexus82.php
index 1fbe297e..b8a870f4 100755
--- a/vendor/nexusphp/cs-config/src/Ruleset/Nexus82.php
+++ b/vendor/nexusphp/cs-config/src/Ruleset/Nexus82.php
@@ -386,7 +386,9 @@ final class Nexus82 extends AbstractRuleset
'null_adjustment' => 'always_first',
'case_sensitive' => false,
],
- 'php_unit_attributes' => true,
+ 'php_unit_attributes' => [
+ 'keep_annotations' => false,
+ ],
'php_unit_construct' => [
'assertions' => [
'assertEquals',
diff --git a/vendor/nexusphp/cs-config/src/Test/AbstractCustomFixerTestCase.php b/vendor/nexusphp/cs-config/src/Test/AbstractCustomFixerTestCase.php
index 436bea71..b98eb420 100755
--- a/vendor/nexusphp/cs-config/src/Test/AbstractCustomFixerTestCase.php
+++ b/vendor/nexusphp/cs-config/src/Test/AbstractCustomFixerTestCase.php
@@ -60,7 +60,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertIsString($riskyDescription);
self::assertValidDescription($this->fixer->getName(), 'risky description', $riskyDescription);
} else {
- self::assertNull($riskyDescription, sprintf('[%s] Fixer is not risky so no description of it is expected.', $this->fixer->getName()));
+ self::assertNull($riskyDescription, \sprintf('[%s] Fixer is not risky so no description of it is expected.', $this->fixer->getName()));
}
$reflection = new \ReflectionMethod($this->fixer, 'isRisky');
@@ -68,7 +68,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertSame(
! $this->fixer->isRisky(),
$reflection->getDeclaringClass()->getName() === AbstractFixer::class,
- sprintf(
+ \sprintf(
'[%s] Fixer is %s so the method "AbstractFixer::isRisky()" must be %s.',
$this->fixer->getName(),
$this->fixer->isRisky() ? 'risky' : 'not risky',
@@ -84,7 +84,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertTrue(
$nameValidator->isValid($customFixerName, true),
- sprintf('Fixer name "%s" is not valid.', $customFixerName),
+ \sprintf('Fixer name "%s" is not valid.', $customFixerName),
);
}
@@ -92,7 +92,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
{
self::assertTrue(
(new \ReflectionClass($this->fixer))->isFinal(),
- sprintf('Fixer "%s" must be declared "final".', $this->fixer->getName()),
+ \sprintf('Fixer "%s" must be declared "final".', $this->fixer->getName()),
);
}
@@ -105,7 +105,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
);
$comment = (new \ReflectionClass($this->fixer))->getDocComment();
- self::assertIsString($comment, sprintf('[%s] Fixer is missing a class-level PHPDoc.', $this->fixer->getName()));
+ self::assertIsString($comment, \sprintf('[%s] Fixer is missing a class-level PHPDoc.', $this->fixer->getName()));
if ($this->fixer instanceof DeprecatedFixerInterface) {
self::assertStringContainsString('@deprecated', $comment);
@@ -130,7 +130,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertTrue(
$option->hasDefault(),
- sprintf(
+ \sprintf(
'Option `%s` of fixer `%s` should have a default value.',
$option->getName(),
$this->fixer->getName(),
@@ -153,7 +153,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertValidDescription($fixerName, 'summary', $definition->getSummary());
$samples = $definition->getCodeSamples();
- self::assertNotEmpty($samples, sprintf('[%s] Code samples are required.', $fixerName));
+ self::assertNotEmpty($samples, \sprintf('[%s] Code samples are required.', $fixerName));
$configSamplesProvided = [];
$dummyFileInfo = new \SplFileInfo(__FILE__);
@@ -162,11 +162,11 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertIsInt($counter);
++$counter;
- self::assertInstanceOf(CodeSampleInterface::class, $sample, sprintf('[%s] Sample #%d must be an instance of "%s".', $fixerName, $counter, CodeSampleInterface::class));
+ self::assertInstanceOf(CodeSampleInterface::class, $sample, \sprintf('[%s] Sample #%d must be an instance of "%s".', $fixerName, $counter, CodeSampleInterface::class));
$code = $sample->getCode();
- self::assertNotEmpty($code, sprintf('[%s] Code provided by sample #%d must not be empty.', $fixerName, $counter));
- self::assertSame("\n", substr($code, -1), sprintf('[%s] Sample #%d must end with linebreak', $fixerName, $counter));
+ self::assertNotEmpty($code, \sprintf('[%s] Code provided by sample #%d must not be empty.', $fixerName, $counter));
+ self::assertSame("\n", substr($code, -1), \sprintf('[%s] Sample #%d must end with linebreak', $fixerName, $counter));
$config = $sample->getConfiguration();
@@ -174,7 +174,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertInstanceOf(
ConfigurableFixerInterface::class,
$this->fixer,
- sprintf('[%s] Sample #%d has configuration, but the fixer is not configurable.', $fixerName, $counter),
+ \sprintf('[%s] Sample #%d has configuration, but the fixer is not configurable.', $fixerName, $counter),
);
$configSamplesProvided[$counter] = $config;
@@ -183,7 +183,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertArrayNotHasKey(
'default',
$configSamplesProvided,
- sprintf('[%s] Multiple non-versioned samples with default configuration.', $fixerName),
+ \sprintf('[%s] Multiple non-versioned samples with default configuration.', $fixerName),
);
}
@@ -207,7 +207,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
$tokens,
);
- self::assertTrue($tokens->isChanged(), sprintf('[%s] Sample #%d is not changed during fixing.', $fixerName, $counter));
+ self::assertTrue($tokens->isChanged(), \sprintf('[%s] Sample #%d is not changed during fixing.', $fixerName, $counter));
$duplicatedCodeSample = array_search(
$sample,
@@ -217,24 +217,24 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertFalse(
$duplicatedCodeSample,
- sprintf('[%s] Sample #%d duplicates #%d.', $fixerName, $counter, (int) $duplicatedCodeSample + 1),
+ \sprintf('[%s] Sample #%d duplicates #%d.', $fixerName, $counter, (int) $duplicatedCodeSample + 1),
);
}
if ($this->fixer instanceof ConfigurableFixerInterface) {
if (isset($configSamplesProvided['default'])) {
reset($configSamplesProvided);
- self::assertSame('default', key($configSamplesProvided), sprintf('[%s] First sample must be for the default configuration.', $fixerName));
+ self::assertSame('default', key($configSamplesProvided), \sprintf('[%s] First sample must be for the default configuration.', $fixerName));
}
if (\count($configSamplesProvided) < 2) {
- self::fail(sprintf('[%s] Configurable fixer only provides a default configuration sample and none for its configuration options.', $fixerName));
+ self::fail(\sprintf('[%s] Configurable fixer only provides a default configuration sample and none for its configuration options.', $fixerName));
}
$options = $this->fixer->getConfigurationDefinition()->getOptions();
foreach ($options as $option) {
- self::assertMatchesRegularExpression('/^[a-z_]+[a-z]$/', $option->getName(), sprintf('[%s] Option %s is not snake_case.', $fixerName, $option->getName()));
+ self::assertMatchesRegularExpression('/^[a-z_]+[a-z]$/', $option->getName(), \sprintf('[%s] Option %s is not snake_case.', $fixerName, $option->getName()));
}
}
}
@@ -328,7 +328,7 @@ abstract class AbstractCustomFixerTestCase extends TestCase
return null;
} catch (\Throwable $e) {
- return sprintf('Linting "%s" failed with message: %s.', $source, $e->getMessage());
+ return \sprintf('Linting "%s" failed with message: %s.', $source, $e->getMessage());
}
}
@@ -354,18 +354,18 @@ abstract class AbstractCustomFixerTestCase extends TestCase
self::assertInstanceOf(Token::class, $inputToken, 'Input token is null.');
self::assertTrue(
$expectedToken->equals($inputToken),
- sprintf("Token at index %d must be:\n%s,\ngot:\n%s.", $index, $expectedToken->toJson(), $inputToken->toJson()),
+ \sprintf("Token at index %d must be:\n%s,\ngot:\n%s.", $index, $expectedToken->toJson(), $inputToken->toJson()),
);
}
}
private static function assertValidDescription(string $fixerName, string $descriptionType, string $description): void
{
- self::assertMatchesRegularExpression('/^[A-Z`][^"]+\.$/', $description, sprintf('[%s] The %s must start with capital letter or a ` and end with dot.', $fixerName, $descriptionType));
- self::assertStringNotContainsString('phpdocs', $description, sprintf('[%s] `PHPDoc` must not be in the plural in %s.', $fixerName, $descriptionType));
- self::assertCorrectCasing($description, 'PHPDoc', sprintf('[%s] `PHPDoc` must be in correct casing in %s.', $fixerName, $descriptionType));
- self::assertCorrectCasing($description, 'PHPUnit', sprintf('[%s] `PHPUnit` must be in correct casing in %s.', $fixerName, $descriptionType));
- self::assertFalse(strpos($descriptionType, '``'), sprintf('[%s] The %s must not contain sequential backticks.', $fixerName, $descriptionType));
+ self::assertMatchesRegularExpression('/^[A-Z`][^"]+\.$/', $description, \sprintf('[%s] The %s must start with capital letter or a ` and end with dot.', $fixerName, $descriptionType));
+ self::assertStringNotContainsString('phpdocs', $description, \sprintf('[%s] `PHPDoc` must not be in the plural in %s.', $fixerName, $descriptionType));
+ self::assertCorrectCasing($description, 'PHPDoc', \sprintf('[%s] `PHPDoc` must be in correct casing in %s.', $fixerName, $descriptionType));
+ self::assertCorrectCasing($description, 'PHPUnit', \sprintf('[%s] `PHPUnit` must be in correct casing in %s.', $fixerName, $descriptionType));
+ self::assertFalse(strpos($descriptionType, '``'), \sprintf('[%s] The %s must not contain sequential backticks.', $fixerName, $descriptionType));
}
private static function assertCorrectCasing(string $needle, string $haystack, string $message): void
diff --git a/vendor/nexusphp/cs-config/src/Test/AbstractRulesetTestCase.php b/vendor/nexusphp/cs-config/src/Test/AbstractRulesetTestCase.php
index 93cfee6e..48355185 100755
--- a/vendor/nexusphp/cs-config/src/Test/AbstractRulesetTestCase.php
+++ b/vendor/nexusphp/cs-config/src/Test/AbstractRulesetTestCase.php
@@ -76,7 +76,7 @@ abstract class AbstractRulesetTestCase extends TestCase
ARRAY_FILTER_USE_KEY,
);
- self::assertEmpty($fixersThatArePresets, sprintf(
+ self::assertEmpty($fixersThatArePresets, \sprintf(
'[%s] Ruleset should not be using rule sets (presets) as fixers. Found: "%s".',
static::createRuleset()->getName(),
implode('", "', array_keys($fixersThatArePresets)),
@@ -90,7 +90,7 @@ abstract class AbstractRulesetTestCase extends TestCase
sort($fixersNotConfigured);
$c = \count($fixersNotConfigured);
- self::assertEmpty($fixersNotConfigured, sprintf(
+ self::assertEmpty($fixersNotConfigured, \sprintf(
'[%s] Non-deprecated built-in %s "%s" %s not configured in the ruleset.',
static::createRuleset()->getName(),
$c > 1 ? 'fixers' : 'fixer',
@@ -106,7 +106,7 @@ abstract class AbstractRulesetTestCase extends TestCase
sort($fixersNotBuiltIn);
$c = \count($fixersNotBuiltIn);
- self::assertEmpty($fixersNotBuiltIn, sprintf(
+ self::assertEmpty($fixersNotBuiltIn, \sprintf(
'[%s] Ruleset used %s "%s" which %s unknown and/or deprecated in PhpCsFixer.',
static::createRuleset()->getName(),
$c > 1 ? 'fixers' : 'fixer',
@@ -121,7 +121,7 @@ abstract class AbstractRulesetTestCase extends TestCase
$sorted = $fixers;
sort($sorted);
- self::assertSame($sorted, $fixers, sprintf(
+ self::assertSame($sorted, $fixers, \sprintf(
'[%s] Fixers are not sorted by name.',
static::createRuleset()->getName(),
));
@@ -144,7 +144,7 @@ abstract class AbstractRulesetTestCase extends TestCase
$ruleConfiguration = self::$enabledFixers[$name] ?? null;
if (null === $ruleConfiguration) {
- self::markTestSkipped(sprintf('`%s` is not yet defined in this ruleset.', $name)); // @codeCoverageIgnore
+ self::markTestSkipped(\sprintf('`%s` is not yet defined in this ruleset.', $name)); // @codeCoverageIgnore
}
if (false === $ruleConfiguration) {
@@ -161,7 +161,7 @@ abstract class AbstractRulesetTestCase extends TestCase
$usedDeprecatedOptions = array_intersect($deprecatedOptions, $ruleConfiguration);
$extraUsedOptions = array_diff($ruleConfiguration, $goodOptions);
- self::assertEmpty($missingOptions, sprintf(
+ self::assertEmpty($missingOptions, \sprintf(
'Enabled configurable fixer "%s" does not use its available array %s "%s". Missing %s: "%s".',
$name,
\count($goodOptions) > 1 ? 'options' : 'option',
@@ -169,13 +169,13 @@ abstract class AbstractRulesetTestCase extends TestCase
\count($missingOptions) > 1 ? 'options' : 'option',
implode('", "', $missingOptions),
));
- self::assertEmpty($usedDeprecatedOptions, sprintf(
+ self::assertEmpty($usedDeprecatedOptions, \sprintf(
'Enabled configurable fixer "%s" uses deprecated %s: "%s".',
$name,
\count($usedDeprecatedOptions) > 1 ? 'options' : 'option',
implode('", "', $usedDeprecatedOptions),
));
- self::assertEmpty($extraUsedOptions, sprintf(
+ self::assertEmpty($extraUsedOptions, \sprintf(
'%s "%s" for enabled configurable fixer "%s" %s not defined by PhpCsFixer.',
\count($extraUsedOptions) > 1 ? 'Options' : 'Option',
implode('", "', $extraUsedOptions),
diff --git a/vendor/sebastian/comparator/ChangeLog.md b/vendor/sebastian/comparator/ChangeLog.md
index 3b725439..c6d122d5 100755
--- a/vendor/sebastian/comparator/ChangeLog.md
+++ b/vendor/sebastian/comparator/ChangeLog.md
@@ -2,6 +2,12 @@
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
+## [5.0.2] - 2024-08-12
+
+### Fixed
+
+* [#112](https://github.com/sebastianbergmann/comparator/issues/112): Arrays with different keys and the same values are considered equal in canonicalize mode
+
## [5.0.1] - 2023-08-14
### Fixed
@@ -144,6 +150,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
* Added `SebastianBergmann\Comparator\Factory::reset()` to unregister all non-default comparators
* Added support for `phpunit/phpunit-mock-objects` version `^5.0`
+[5.0.2]: https://github.com/sebastianbergmann/comparator/compare/5.0.1...5.0.2
[5.0.1]: https://github.com/sebastianbergmann/comparator/compare/5.0.0...5.0.1
[5.0.0]: https://github.com/sebastianbergmann/comparator/compare/4.0.8...5.0.0
[4.0.8]: https://github.com/sebastianbergmann/comparator/compare/4.0.7...4.0.8
diff --git a/vendor/sebastian/comparator/LICENSE b/vendor/sebastian/comparator/LICENSE
index a453252d..5b4705a4 100755
--- a/vendor/sebastian/comparator/LICENSE
+++ b/vendor/sebastian/comparator/LICENSE
@@ -1,6 +1,6 @@
BSD 3-Clause License
-Copyright (c) 2002-2023, Sebastian Bergmann
+Copyright (c) 2002-2024, Sebastian Bergmann
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/vendor/sebastian/comparator/composer.json b/vendor/sebastian/comparator/composer.json
index a53ecba4..1886cbb5 100755
--- a/vendor/sebastian/comparator/composer.json
+++ b/vendor/sebastian/comparator/composer.json
@@ -35,7 +35,7 @@
"ext-mbstring": "*"
},
"require-dev": {
- "phpunit/phpunit": "^10.3"
+ "phpunit/phpunit": "^10.4"
},
"config": {
"platform": {
diff --git a/vendor/sebastian/comparator/src/ArrayComparator.php b/vendor/sebastian/comparator/src/ArrayComparator.php
index 07eba9d3..b2a4dc62 100755
--- a/vendor/sebastian/comparator/src/ArrayComparator.php
+++ b/vendor/sebastian/comparator/src/ArrayComparator.php
@@ -9,6 +9,7 @@
*/
namespace SebastianBergmann\Comparator;
+use function array_is_list;
use function array_key_exists;
use function assert;
use function is_array;
@@ -39,8 +40,13 @@ class ArrayComparator extends Comparator
assert(is_array($actual));
if ($canonicalize) {
- sort($expected);
- sort($actual);
+ if (array_is_list($expected)) {
+ sort($expected);
+ }
+
+ if (array_is_list($actual)) {
+ sort($actual);
+ }
}
$remaining = $actual;
@@ -56,7 +62,7 @@ class ArrayComparator extends Comparator
$expectedAsString .= sprintf(
" %s => %s\n",
$exporter->export($key),
- $exporter->shortenedExport($value)
+ $exporter->shortenedExport($value),
);
$equal = false;
@@ -71,25 +77,25 @@ class ArrayComparator extends Comparator
$expectedAsString .= sprintf(
" %s => %s\n",
$exporter->export($key),
- $exporter->shortenedExport($value)
+ $exporter->shortenedExport($value),
);
$actualAsString .= sprintf(
" %s => %s\n",
$exporter->export($key),
- $exporter->shortenedExport($actual[$key])
+ $exporter->shortenedExport($actual[$key]),
);
} catch (ComparisonFailure $e) {
$expectedAsString .= sprintf(
" %s => %s\n",
$exporter->export($key),
- $e->getExpectedAsString() ? $this->indent($e->getExpectedAsString()) : $exporter->shortenedExport($e->getExpected())
+ $e->getExpectedAsString() ? $this->indent($e->getExpectedAsString()) : $exporter->shortenedExport($e->getExpected()),
);
$actualAsString .= sprintf(
" %s => %s\n",
$exporter->export($key),
- $e->getActualAsString() ? $this->indent($e->getActualAsString()) : $exporter->shortenedExport($e->getActual())
+ $e->getActualAsString() ? $this->indent($e->getActualAsString()) : $exporter->shortenedExport($e->getActual()),
);
$equal = false;
@@ -100,7 +106,7 @@ class ArrayComparator extends Comparator
$actualAsString .= sprintf(
" %s => %s\n",
$exporter->export($key),
- $exporter->shortenedExport($value)
+ $exporter->shortenedExport($value),
);
$equal = false;
@@ -115,7 +121,7 @@ class ArrayComparator extends Comparator
$actual,
$expectedAsString,
$actualAsString,
- 'Failed asserting that two arrays are equal.'
+ 'Failed asserting that two arrays are equal.',
);
}
}
diff --git a/vendor/sebastian/comparator/src/DOMNodeComparator.php b/vendor/sebastian/comparator/src/DOMNodeComparator.php
index b57aef1d..e78a401f 100755
--- a/vendor/sebastian/comparator/src/DOMNodeComparator.php
+++ b/vendor/sebastian/comparator/src/DOMNodeComparator.php
@@ -42,7 +42,7 @@ final class DOMNodeComparator extends ObjectComparator
$actual,
$expectedAsString,
$actualAsString,
- sprintf("Failed asserting that two DOM %s are equal.\n", $type)
+ sprintf("Failed asserting that two DOM %s are equal.\n", $type),
);
}
}
diff --git a/vendor/sebastian/comparator/src/DateTimeComparator.php b/vendor/sebastian/comparator/src/DateTimeComparator.php
index b32c0af2..16792d77 100755
--- a/vendor/sebastian/comparator/src/DateTimeComparator.php
+++ b/vendor/sebastian/comparator/src/DateTimeComparator.php
@@ -54,7 +54,7 @@ final class DateTimeComparator extends ObjectComparator
$actual,
$this->dateTimeToString($expected),
$this->dateTimeToString($actual),
- 'Failed asserting that two DateTime objects are equal.'
+ 'Failed asserting that two DateTime objects are equal.',
);
}
}
diff --git a/vendor/sebastian/comparator/src/ExceptionComparator.php b/vendor/sebastian/comparator/src/ExceptionComparator.php
index 38843a85..b44dd816 100755
--- a/vendor/sebastian/comparator/src/ExceptionComparator.php
+++ b/vendor/sebastian/comparator/src/ExceptionComparator.php
@@ -33,7 +33,7 @@ final class ExceptionComparator extends ObjectComparator
$array['line'],
$array['trace'],
$array['string'],
- $array['xdebug_message']
+ $array['xdebug_message'],
);
return $array;
diff --git a/vendor/sebastian/comparator/src/NumericComparator.php b/vendor/sebastian/comparator/src/NumericComparator.php
index 576c839d..3d783edb 100755
--- a/vendor/sebastian/comparator/src/NumericComparator.php
+++ b/vendor/sebastian/comparator/src/NumericComparator.php
@@ -49,8 +49,8 @@ final class NumericComparator extends ScalarComparator
sprintf(
'Failed asserting that %s matches expected %s.',
$exporter->export($actual),
- $exporter->export($expected)
- )
+ $exporter->export($expected),
+ ),
);
}
}
diff --git a/vendor/sebastian/comparator/src/ObjectComparator.php b/vendor/sebastian/comparator/src/ObjectComparator.php
index 09fc78db..95f97ed1 100755
--- a/vendor/sebastian/comparator/src/ObjectComparator.php
+++ b/vendor/sebastian/comparator/src/ObjectComparator.php
@@ -42,8 +42,8 @@ class ObjectComparator extends ArrayComparator
sprintf(
'%s is not instance of expected class "%s".',
$exporter->export($actual),
- $expected::class
- )
+ $expected::class,
+ ),
);
}
@@ -66,7 +66,7 @@ class ObjectComparator extends ArrayComparator
$delta,
$canonicalize,
$ignoreCase,
- $processed
+ $processed,
);
} catch (ComparisonFailure $e) {
throw new ComparisonFailure(
@@ -75,7 +75,7 @@ class ObjectComparator extends ArrayComparator
// replace "Array" with "MyClass object"
substr_replace($e->getExpectedAsString(), $expected::class . ' Object', 0, 5),
substr_replace($e->getActualAsString(), $actual::class . ' Object', 0, 5),
- 'Failed asserting that two objects are equal.'
+ 'Failed asserting that two objects are equal.',
);
}
}
diff --git a/vendor/sebastian/comparator/src/ResourceComparator.php b/vendor/sebastian/comparator/src/ResourceComparator.php
index 91440ced..16995623 100755
--- a/vendor/sebastian/comparator/src/ResourceComparator.php
+++ b/vendor/sebastian/comparator/src/ResourceComparator.php
@@ -35,7 +35,7 @@ final class ResourceComparator extends Comparator
$expected,
$actual,
$exporter->export($expected),
- $exporter->export($actual)
+ $exporter->export($actual),
);
}
}
diff --git a/vendor/sebastian/comparator/src/ScalarComparator.php b/vendor/sebastian/comparator/src/ScalarComparator.php
index 50a71ac1..79c50457 100755
--- a/vendor/sebastian/comparator/src/ScalarComparator.php
+++ b/vendor/sebastian/comparator/src/ScalarComparator.php
@@ -59,7 +59,7 @@ class ScalarComparator extends Comparator
$actual,
$exporter->export($expected),
$exporter->export($actual),
- 'Failed asserting that two strings are equal.'
+ 'Failed asserting that two strings are equal.',
);
}
@@ -73,8 +73,8 @@ class ScalarComparator extends Comparator
sprintf(
'Failed asserting that %s matches expected %s.',
$exporter->export($actual),
- $exporter->export($expected)
- )
+ $exporter->export($expected),
+ ),
);
}
}
diff --git a/vendor/sebastian/comparator/src/SplObjectStorageComparator.php b/vendor/sebastian/comparator/src/SplObjectStorageComparator.php
index 144622d6..a1eeda39 100755
--- a/vendor/sebastian/comparator/src/SplObjectStorageComparator.php
+++ b/vendor/sebastian/comparator/src/SplObjectStorageComparator.php
@@ -37,7 +37,7 @@ final class SplObjectStorageComparator extends Comparator
$actual,
$exporter->export($expected),
$exporter->export($actual),
- 'Failed asserting that two objects are equal.'
+ 'Failed asserting that two objects are equal.',
);
}
}
@@ -49,7 +49,7 @@ final class SplObjectStorageComparator extends Comparator
$actual,
$exporter->export($expected),
$exporter->export($actual),
- 'Failed asserting that two objects are equal.'
+ 'Failed asserting that two objects are equal.',
);
}
}
diff --git a/vendor/sebastian/comparator/src/TypeComparator.php b/vendor/sebastian/comparator/src/TypeComparator.php
index 8e9dfacc..67994e9f 100755
--- a/vendor/sebastian/comparator/src/TypeComparator.php
+++ b/vendor/sebastian/comparator/src/TypeComparator.php
@@ -35,8 +35,8 @@ final class TypeComparator extends Comparator
sprintf(
'%s does not match expected type "%s".',
(new Exporter)->shortenedExport($actual),
- gettype($expected)
- )
+ gettype($expected),
+ ),
);
}
}
diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php
index b97d0872..87eb7a6c 100755
--- a/vendor/symfony/console/Application.php
+++ b/vendor/symfony/console/Application.php
@@ -75,8 +75,6 @@ class Application implements ResetInterface
private array $commands = [];
private bool $wantHelps = false;
private ?Command $runningCommand = null;
- private string $name;
- private string $version;
private ?CommandLoaderInterface $commandLoader = null;
private bool $catchExceptions = true;
private bool $catchErrors = false;
@@ -91,15 +89,15 @@ class Application implements ResetInterface
private ?SignalRegistry $signalRegistry = null;
private array $signalsToDispatchEvent = [];
- public function __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN')
- {
- $this->name = $name;
- $this->version = $version;
+ public function __construct(
+ private string $name = 'UNKNOWN',
+ private string $version = 'UNKNOWN',
+ ) {
$this->terminal = new Terminal();
$this->defaultCommand = 'list';
if (\defined('SIGINT') && SignalRegistry::isSupported()) {
$this->signalRegistry = new SignalRegistry();
- $this->signalsToDispatchEvent = [\SIGINT, \SIGTERM, \SIGUSR1, \SIGUSR2];
+ $this->signalsToDispatchEvent = [\SIGINT, \SIGQUIT, \SIGTERM, \SIGUSR1, \SIGUSR2];
}
}
@@ -111,10 +109,7 @@ class Application implements ResetInterface
$this->dispatcher = $dispatcher;
}
- /**
- * @return void
- */
- public function setCommandLoader(CommandLoaderInterface $commandLoader)
+ public function setCommandLoader(CommandLoaderInterface $commandLoader): void
{
$this->commandLoader = $commandLoader;
}
@@ -128,10 +123,7 @@ class Application implements ResetInterface
return $this->signalRegistry;
}
- /**
- * @return void
- */
- public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent)
+ public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent): void
{
$this->signalsToDispatchEvent = $signalsToDispatchEvent;
}
@@ -224,7 +216,7 @@ class Application implements ResetInterface
*
* @return int 0 if everything went fine, or an error code
*/
- public function doRun(InputInterface $input, OutputInterface $output)
+ public function doRun(InputInterface $input, OutputInterface $output): int
{
if (true === $input->hasParameterOption(['--version', '-V'], true)) {
$output->writeln($this->getLongVersion());
@@ -327,17 +319,11 @@ class Application implements ResetInterface
return $exitCode;
}
- /**
- * @return void
- */
- public function reset()
+ public function reset(): void
{
}
- /**
- * @return void
- */
- public function setHelperSet(HelperSet $helperSet)
+ public function setHelperSet(HelperSet $helperSet): void
{
$this->helperSet = $helperSet;
}
@@ -350,10 +336,7 @@ class Application implements ResetInterface
return $this->helperSet ??= $this->getDefaultHelperSet();
}
- /**
- * @return void
- */
- public function setDefinition(InputDefinition $definition)
+ public function setDefinition(InputDefinition $definition): void
{
$this->definition = $definition;
}
@@ -423,10 +406,8 @@ class Application implements ResetInterface
/**
* Sets whether to catch exceptions or not during commands execution.
- *
- * @return void
*/
- public function setCatchExceptions(bool $boolean)
+ public function setCatchExceptions(bool $boolean): void
{
$this->catchExceptions = $boolean;
}
@@ -449,10 +430,8 @@ class Application implements ResetInterface
/**
* Sets whether to automatically exit after a command execution or not.
- *
- * @return void
*/
- public function setAutoExit(bool $boolean)
+ public function setAutoExit(bool $boolean): void
{
$this->autoExit = $boolean;
}
@@ -467,10 +446,8 @@ class Application implements ResetInterface
/**
* Sets the application name.
- *
- * @return void
*/
- public function setName(string $name)
+ public function setName(string $name): void
{
$this->name = $name;
}
@@ -485,20 +462,16 @@ class Application implements ResetInterface
/**
* Sets the application version.
- *
- * @return void
*/
- public function setVersion(string $version)
+ public function setVersion(string $version): void
{
$this->version = $version;
}
/**
* Returns the long version of the application.
- *
- * @return string
*/
- public function getLongVersion()
+ public function getLongVersion(): string
{
if ('UNKNOWN' !== $this->getName()) {
if ('UNKNOWN' !== $this->getVersion()) {
@@ -525,10 +498,8 @@ class Application implements ResetInterface
* If a Command is not enabled it will not be added.
*
* @param Command[] $commands An array of commands
- *
- * @return void
*/
- public function addCommands(array $commands)
+ public function addCommands(array $commands): void
{
foreach ($commands as $command) {
$this->add($command);
@@ -540,10 +511,8 @@ class Application implements ResetInterface
*
* If a command with the same name already exists, it will be overridden.
* If the command is not enabled it will not be added.
- *
- * @return Command|null
*/
- public function add(Command $command)
+ public function add(Command $command): ?Command
{
$this->init();
@@ -576,11 +545,9 @@ class Application implements ResetInterface
/**
* Returns a registered command by name or alias.
*
- * @return Command
- *
* @throws CommandNotFoundException When given command name does not exist
*/
- public function get(string $name)
+ public function get(string $name): Command
{
$this->init();
@@ -653,7 +620,7 @@ class Application implements ResetInterface
$expr = implode('[^:]*:', array_map('preg_quote', explode(':', $namespace))).'[^:]*';
$namespaces = preg_grep('{^'.$expr.'}', $allNamespaces);
- if (empty($namespaces)) {
+ if (!$namespaces) {
$message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);
if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
@@ -683,11 +650,9 @@ class Application implements ResetInterface
* Contrary to get, this command tries to find the best
* match if you give it an abbreviation of a name or alias.
*
- * @return Command
- *
* @throws CommandNotFoundException When command name is incorrect or ambiguous
*/
- public function find(string $name)
+ public function find(string $name): Command
{
$this->init();
@@ -709,12 +674,12 @@ class Application implements ResetInterface
$expr = implode('[^:]*:', array_map('preg_quote', explode(':', $name))).'[^:]*';
$commands = preg_grep('{^'.$expr.'}', $allCommands);
- if (empty($commands)) {
+ if (!$commands) {
$commands = preg_grep('{^'.$expr.'}i', $allCommands);
}
// if no commands matched or we just matched namespaces
- if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) {
+ if (!$commands || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) {
if (false !== $pos = strrpos($name, ':')) {
// check if a namespace exists and contains commands
$this->findNamespace(substr($name, 0, $pos));
@@ -749,7 +714,7 @@ class Application implements ResetInterface
$aliases[$nameOrAlias] = $commandName;
- return $commandName === $nameOrAlias || !\in_array($commandName, $commands);
+ return $commandName === $nameOrAlias || !\in_array($commandName, $commands, true);
}));
}
@@ -795,7 +760,7 @@ class Application implements ResetInterface
*
* @return Command[]
*/
- public function all(?string $namespace = null)
+ public function all(?string $namespace = null): array
{
$this->init();
@@ -936,10 +901,8 @@ class Application implements ResetInterface
/**
* Configures the input and output instances based on the user arguments and options.
- *
- * @return void
*/
- protected function configureIO(InputInterface $input, OutputInterface $output)
+ protected function configureIO(InputInterface $input, OutputInterface $output): void
{
if (true === $input->hasParameterOption(['--ansi'], true)) {
$output->setDecorated(true);
@@ -1004,7 +967,7 @@ class Application implements ResetInterface
*
* @return int 0 if everything went fine, or an error code
*/
- protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
+ protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output): int
{
foreach ($command->getHelperSet() as $helper) {
if ($helper instanceof InputAwareInterface) {
@@ -1021,7 +984,7 @@ class Application implements ResetInterface
if (Terminal::hasSttyAvailable()) {
$sttyMode = shell_exec('stty -g');
- foreach ([\SIGINT, \SIGTERM] as $signal) {
+ foreach ([\SIGINT, \SIGQUIT, \SIGTERM] as $signal) {
$this->signalRegistry->register($signal, static fn () => shell_exec('stty '.$sttyMode));
}
}
@@ -1038,11 +1001,6 @@ class Application implements ResetInterface
// If the command is signalable, we call the handleSignal() method
if (\in_array($signal, $commandSignals, true)) {
$exitCode = $command->handleSignal($signal, $exitCode);
- // BC layer for Symfony <= 5
- if (null === $exitCode) {
- trigger_deprecation('symfony/console', '6.3', 'Not returning an exit code from "%s::handleSignal()" is deprecated, return "false" to keep the command running or "0" to exit successfully.', get_debug_type($command));
- $exitCode = 0;
- }
}
if (false !== $exitCode) {
@@ -1060,14 +1018,7 @@ class Application implements ResetInterface
foreach ($commandSignals as $signal) {
$this->signalRegistry->register($signal, function (int $signal) use ($command): void {
- $exitCode = $command->handleSignal($signal);
- // BC layer for Symfony <= 5
- if (null === $exitCode) {
- trigger_deprecation('symfony/console', '6.3', 'Not returning an exit code from "%s::handleSignal()" is deprecated, return "false" to keep the command running or "0" to exit successfully.', get_debug_type($command));
- $exitCode = 0;
- }
-
- if (false !== $exitCode) {
+ if (false !== $exitCode = $command->handleSignal($signal)) {
exit($exitCode);
}
});
diff --git a/vendor/symfony/console/Attribute/AsCommand.php b/vendor/symfony/console/Attribute/AsCommand.php
index b337f548..6066d7c5 100755
--- a/vendor/symfony/console/Attribute/AsCommand.php
+++ b/vendor/symfony/console/Attribute/AsCommand.php
@@ -17,6 +17,12 @@ namespace Symfony\Component\Console\Attribute;
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsCommand
{
+ /**
+ * @param string $name The name of the command, used when calling it (i.e. "cache:clear")
+ * @param string|null $description The description of the command, displayed with the help page
+ * @param string[] $aliases The list of aliases of the command. The command will be executed when using one of them (i.e. "cache:clean")
+ * @param bool $hidden If true, the command won't be shown when listing all the available commands, but it can still be run as any other command
+ */
public function __construct(
public string $name,
public ?string $description = null,
diff --git a/vendor/symfony/console/CHANGELOG.md b/vendor/symfony/console/CHANGELOG.md
index 9ccb41d9..25d7f717 100755
--- a/vendor/symfony/console/CHANGELOG.md
+++ b/vendor/symfony/console/CHANGELOG.md
@@ -1,6 +1,19 @@
CHANGELOG
=========
+7.1
+---
+
+ * Add `ArgvInput::getRawTokens()`
+
+7.0
+---
+
+ * Add method `__toString()` to `InputInterface`
+ * Remove `Command::$defaultName` and `Command::$defaultDescription`, use the `AsCommand` attribute instead
+ * Require explicit argument when calling `*Command::setApplication()`, `*FormatterStyle::setForeground/setBackground()`, `Helper::setHelpSet()`, `Input*::setDefault()` and `Question::setAutocompleterCallback/setValidator()`
+ * Remove `StringInput::REGEX_STRING`
+
6.4
---
diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php
index 9f9cb2f5..03da6db4 100755
--- a/vendor/symfony/console/Command/Command.php
+++ b/vendor/symfony/console/Command/Command.php
@@ -39,20 +39,6 @@ class Command
public const FAILURE = 1;
public const INVALID = 2;
- /**
- * @var string|null The default command name
- *
- * @deprecated since Symfony 6.1, use the AsCommand attribute instead
- */
- protected static $defaultName;
-
- /**
- * @var string|null The default command description
- *
- * @deprecated since Symfony 6.1, use the AsCommand attribute instead
- */
- protected static $defaultDescription;
-
private ?Application $application = null;
private ?string $name = null;
private ?string $processTitle = null;
@@ -70,40 +56,20 @@ class Command
public static function getDefaultName(): ?string
{
- $class = static::class;
-
- if ($attribute = (new \ReflectionClass($class))->getAttributes(AsCommand::class)) {
+ if ($attribute = (new \ReflectionClass(static::class))->getAttributes(AsCommand::class)) {
return $attribute[0]->newInstance()->name;
}
- $r = new \ReflectionProperty($class, 'defaultName');
-
- if ($class !== $r->class || null === static::$defaultName) {
- return null;
- }
-
- trigger_deprecation('symfony/console', '6.1', 'Relying on the static property "$defaultName" for setting a command name is deprecated. Add the "%s" attribute to the "%s" class instead.', AsCommand::class, static::class);
-
- return static::$defaultName;
+ return null;
}
public static function getDefaultDescription(): ?string
{
- $class = static::class;
-
- if ($attribute = (new \ReflectionClass($class))->getAttributes(AsCommand::class)) {
+ if ($attribute = (new \ReflectionClass(static::class))->getAttributes(AsCommand::class)) {
return $attribute[0]->newInstance()->description;
}
- $r = new \ReflectionProperty($class, 'defaultDescription');
-
- if ($class !== $r->class || null === static::$defaultDescription) {
- return null;
- }
-
- trigger_deprecation('symfony/console', '6.1', 'Relying on the static property "$defaultDescription" for setting a command description is deprecated. Add the "%s" attribute to the "%s" class instead.', AsCommand::class, static::class);
-
- return static::$defaultDescription;
+ return null;
}
/**
@@ -141,22 +107,14 @@ class Command
* Ignores validation errors.
*
* This is mainly useful for the help command.
- *
- * @return void
*/
- public function ignoreValidationErrors()
+ public function ignoreValidationErrors(): void
{
$this->ignoreValidationErrors = true;
}
- /**
- * @return void
- */
- public function setApplication(?Application $application = null)
+ public function setApplication(?Application $application): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
$this->application = $application;
if ($application) {
$this->setHelperSet($application->getHelperSet());
@@ -167,10 +125,7 @@ class Command
$this->fullDefinition = null;
}
- /**
- * @return void
- */
- public function setHelperSet(HelperSet $helperSet)
+ public function setHelperSet(HelperSet $helperSet): void
{
$this->helperSet = $helperSet;
}
@@ -196,10 +151,8 @@ class Command
*
* Override this to check for x or y and return false if the command cannot
* run properly under the current conditions.
- *
- * @return bool
*/
- public function isEnabled()
+ public function isEnabled(): bool
{
return true;
}
@@ -227,7 +180,7 @@ class Command
*
* @see setCode()
*/
- protected function execute(InputInterface $input, OutputInterface $output)
+ protected function execute(InputInterface $input, OutputInterface $output): int
{
throw new LogicException('You must override the execute() method in the concrete command class.');
}
@@ -324,17 +277,13 @@ class Command
$statusCode = ($this->code)($input, $output);
} else {
$statusCode = $this->execute($input, $output);
-
- if (!\is_int($statusCode)) {
- throw new \TypeError(sprintf('Return value of "%s::execute()" must be of the type int, "%s" returned.', static::class, get_debug_type($statusCode)));
- }
}
return is_numeric($statusCode) ? (int) $statusCode : 0;
}
/**
- * Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
+ * Supplies suggestions when resolving possible completion options for input (e.g. option or argument).
*/
public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
{
@@ -452,20 +401,16 @@ class Command
/**
* Adds an argument.
*
- * @param $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
- * @param $default The default value (for InputArgument::OPTIONAL mode only)
+ * @param $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
+ * @param $default The default value (for InputArgument::OPTIONAL mode only)
* @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion
*
* @return $this
*
* @throws InvalidArgumentException When argument mode is not valid
*/
- public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = null */): static
+ public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
{
- $suggestedValues = 5 <= \func_num_args() ? func_get_arg(4) : [];
- if (!\is_array($suggestedValues) && !$suggestedValues instanceof \Closure) {
- throw new \TypeError(sprintf('Argument 5 passed to "%s()" must be array or \Closure, "%s" given.', __METHOD__, get_debug_type($suggestedValues)));
- }
$this->definition->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues));
$this->fullDefinition?->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues));
@@ -475,21 +420,17 @@ class Command
/**
* Adds an option.
*
- * @param $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
- * @param $mode The option mode: One of the InputOption::VALUE_* constants
- * @param $default The default value (must be null for InputOption::VALUE_NONE)
+ * @param $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
+ * @param $mode The option mode: One of the InputOption::VALUE_* constants
+ * @param $default The default value (must be null for InputOption::VALUE_NONE)
* @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion
*
* @return $this
*
* @throws InvalidArgumentException If option mode is invalid or incompatible
*/
- public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static
+ public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
{
- $suggestedValues = 6 <= \func_num_args() ? func_get_arg(5) : [];
- if (!\is_array($suggestedValues) && !$suggestedValues instanceof \Closure) {
- throw new \TypeError(sprintf('Argument 5 passed to "%s()" must be array or \Closure, "%s" given.', __METHOD__, get_debug_type($suggestedValues)));
- }
$this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues));
$this->fullDefinition?->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues));
@@ -695,12 +636,10 @@ class Command
/**
* Gets a helper instance by name.
*
- * @return HelperInterface
- *
* @throws LogicException if no HelperSet is defined
* @throws InvalidArgumentException if the helper is not defined
*/
- public function getHelper(string $name): mixed
+ public function getHelper(string $name): HelperInterface
{
if (null === $this->helperSet) {
throw new LogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name));
diff --git a/vendor/symfony/console/Command/CompleteCommand.php b/vendor/symfony/console/Command/CompleteCommand.php
index 23be5577..38aa737f 100755
--- a/vendor/symfony/console/Command/CompleteCommand.php
+++ b/vendor/symfony/console/Command/CompleteCommand.php
@@ -34,18 +34,7 @@ final class CompleteCommand extends Command
{
public const COMPLETION_API_VERSION = '1';
- /**
- * @deprecated since Symfony 6.1
- */
- protected static $defaultName = '|_complete';
-
- /**
- * @deprecated since Symfony 6.1
- */
- protected static $defaultDescription = 'Internal command to provide shell completion suggestions';
-
private array $completionOutputs;
-
private bool $isDebug = false;
/**
diff --git a/vendor/symfony/console/Command/DumpCompletionCommand.php b/vendor/symfony/console/Command/DumpCompletionCommand.php
index 51b613a1..be6f5459 100755
--- a/vendor/symfony/console/Command/DumpCompletionCommand.php
+++ b/vendor/symfony/console/Command/DumpCompletionCommand.php
@@ -27,16 +27,6 @@ use Symfony\Component\Process\Process;
#[AsCommand(name: 'completion', description: 'Dump the shell completion script')]
final class DumpCompletionCommand extends Command
{
- /**
- * @deprecated since Symfony 6.1
- */
- protected static $defaultName = 'completion';
-
- /**
- * @deprecated since Symfony 6.1
- */
- protected static $defaultDescription = 'Dump the shell completion script';
-
private array $supportedShells;
protected function configure(): void
diff --git a/vendor/symfony/console/Command/HelpCommand.php b/vendor/symfony/console/Command/HelpCommand.php
index e6447b05..a2a72dab 100755
--- a/vendor/symfony/console/Command/HelpCommand.php
+++ b/vendor/symfony/console/Command/HelpCommand.php
@@ -27,10 +27,7 @@ class HelpCommand extends Command
{
private Command $command;
- /**
- * @return void
- */
- protected function configure()
+ protected function configure(): void
{
$this->ignoreValidationErrors();
@@ -57,10 +54,7 @@ EOF
;
}
- /**
- * @return void
- */
- public function setCommand(Command $command)
+ public function setCommand(Command $command): void
{
$this->command = $command;
}
diff --git a/vendor/symfony/console/Command/LazyCommand.php b/vendor/symfony/console/Command/LazyCommand.php
index b94da666..fd2c300d 100755
--- a/vendor/symfony/console/Command/LazyCommand.php
+++ b/vendor/symfony/console/Command/LazyCommand.php
@@ -27,17 +27,21 @@ use Symfony\Component\Console\Output\OutputInterface;
final class LazyCommand extends Command
{
private \Closure|Command $command;
- private ?bool $isEnabled;
- public function __construct(string $name, array $aliases, string $description, bool $isHidden, \Closure $commandFactory, ?bool $isEnabled = true)
- {
+ public function __construct(
+ string $name,
+ array $aliases,
+ string $description,
+ bool $isHidden,
+ \Closure $commandFactory,
+ private ?bool $isEnabled = true,
+ ) {
$this->setName($name)
->setAliases($aliases)
->setHidden($isHidden)
->setDescription($description);
$this->command = $commandFactory;
- $this->isEnabled = $isEnabled;
}
public function ignoreValidationErrors(): void
@@ -45,11 +49,8 @@ final class LazyCommand extends Command
$this->getCommand()->ignoreValidationErrors();
}
- public function setApplication(?Application $application = null): void
+ public function setApplication(?Application $application): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
if ($this->command instanceof parent) {
$this->command->setApplication($application);
}
@@ -116,9 +117,8 @@ final class LazyCommand extends Command
/**
* @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion
*/
- public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static
+ public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
{
- $suggestedValues = 5 <= \func_num_args() ? func_get_arg(4) : [];
$this->getCommand()->addArgument($name, $mode, $description, $default, $suggestedValues);
return $this;
@@ -127,9 +127,8 @@ final class LazyCommand extends Command
/**
* @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion
*/
- public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null /* array|\Closure $suggestedValues = [] */): static
+ public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
{
- $suggestedValues = 6 <= \func_num_args() ? func_get_arg(5) : [];
$this->getCommand()->addOption($name, $shortcut, $mode, $description, $default, $suggestedValues);
return $this;
diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php
index 5850c3d7..61b4b1b3 100755
--- a/vendor/symfony/console/Command/ListCommand.php
+++ b/vendor/symfony/console/Command/ListCommand.php
@@ -25,10 +25,7 @@ use Symfony\Component\Console\Output\OutputInterface;
*/
class ListCommand extends Command
{
- /**
- * @return void
- */
- protected function configure()
+ protected function configure(): void
{
$this
->setName('list')
diff --git a/vendor/symfony/console/Command/LockableTrait.php b/vendor/symfony/console/Command/LockableTrait.php
index cd7548f0..f0001cc5 100755
--- a/vendor/symfony/console/Command/LockableTrait.php
+++ b/vendor/symfony/console/Command/LockableTrait.php
@@ -26,6 +26,8 @@ trait LockableTrait
{
private ?LockInterface $lock = null;
+ private ?LockFactory $lockFactory = null;
+
/**
* Locks a command.
*/
@@ -39,13 +41,17 @@ trait LockableTrait
throw new LogicException('A lock is already in place.');
}
- if (SemaphoreStore::isSupported()) {
- $store = new SemaphoreStore();
- } else {
- $store = new FlockStore();
+ if (null === $this->lockFactory) {
+ if (SemaphoreStore::isSupported()) {
+ $store = new SemaphoreStore();
+ } else {
+ $store = new FlockStore();
+ }
+
+ $this->lockFactory = (new LockFactory($store));
}
- $this->lock = (new LockFactory($store))->createLock($name ?: $this->getName());
+ $this->lock = $this->lockFactory->createLock($name ?: $this->getName());
if (!$this->lock->acquire($blocking)) {
$this->lock = null;
diff --git a/vendor/symfony/console/Command/SignalableCommandInterface.php b/vendor/symfony/console/Command/SignalableCommandInterface.php
index f8eb8e52..40b301d1 100755
--- a/vendor/symfony/console/Command/SignalableCommandInterface.php
+++ b/vendor/symfony/console/Command/SignalableCommandInterface.php
@@ -26,9 +26,7 @@ interface SignalableCommandInterface
/**
* The method will be called when the application is signaled.
*
- * @param int|false $previousExitCode
- *
* @return int|false The exit code to return or false to continue the normal execution
*/
- public function handleSignal(int $signal, /* int|false $previousExitCode = 0 */);
+ public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false;
}
diff --git a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
index bfa0ac46..84e25be7 100755
--- a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
+++ b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
@@ -22,16 +22,13 @@ use Symfony\Component\Console\Exception\CommandNotFoundException;
*/
class ContainerCommandLoader implements CommandLoaderInterface
{
- private ContainerInterface $container;
- private array $commandMap;
-
/**
* @param array $commandMap An array with command names as keys and service ids as values
*/
- public function __construct(ContainerInterface $container, array $commandMap)
- {
- $this->container = $container;
- $this->commandMap = $commandMap;
+ public function __construct(
+ private ContainerInterface $container,
+ private array $commandMap,
+ ) {
}
public function get(string $name): Command
diff --git a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
index 9ced75ae..ae16bf6f 100755
--- a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
+++ b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
@@ -21,14 +21,12 @@ use Symfony\Component\Console\Exception\CommandNotFoundException;
*/
class FactoryCommandLoader implements CommandLoaderInterface
{
- private array $factories;
-
/**
* @param callable[] $factories Indexed by command names
*/
- public function __construct(array $factories)
- {
- $this->factories = $factories;
+ public function __construct(
+ private array $factories,
+ ) {
}
public function has(string $name): bool
diff --git a/vendor/symfony/console/Completion/Output/FishCompletionOutput.php b/vendor/symfony/console/Completion/Output/FishCompletionOutput.php
index d2c414e4..356a974e 100755
--- a/vendor/symfony/console/Completion/Output/FishCompletionOutput.php
+++ b/vendor/symfony/console/Completion/Output/FishCompletionOutput.php
@@ -21,11 +21,14 @@ class FishCompletionOutput implements CompletionOutputInterface
{
public function write(CompletionSuggestions $suggestions, OutputInterface $output): void
{
- $values = $suggestions->getValueSuggestions();
+ $values = [];
+ foreach ($suggestions->getValueSuggestions() as $value) {
+ $values[] = $value->getValue().($value->getDescription() ? "\t".$value->getDescription() : '');
+ }
foreach ($suggestions->getOptionSuggestions() as $option) {
- $values[] = '--'.$option->getName();
+ $values[] = '--'.$option->getName().($option->getDescription() ? "\t".$option->getDescription() : '');
if ($option->isNegatable()) {
- $values[] = '--no-'.$option->getName();
+ $values[] = '--no-'.$option->getName().($option->getDescription() ? "\t".$option->getDescription() : '');
}
}
$output->write(implode("\n", $values));
diff --git a/vendor/symfony/console/Completion/Suggestion.php b/vendor/symfony/console/Completion/Suggestion.php
index 7392965a..3251b079 100755
--- a/vendor/symfony/console/Completion/Suggestion.php
+++ b/vendor/symfony/console/Completion/Suggestion.php
@@ -20,7 +20,7 @@ class Suggestion implements \Stringable
{
public function __construct(
private readonly string $value,
- private readonly string $description = ''
+ private readonly string $description = '',
) {
}
diff --git a/vendor/symfony/console/Cursor.php b/vendor/symfony/console/Cursor.php
index 69fd3821..965f996e 100755
--- a/vendor/symfony/console/Cursor.php
+++ b/vendor/symfony/console/Cursor.php
@@ -18,16 +18,16 @@ use Symfony\Component\Console\Output\OutputInterface;
*/
final class Cursor
{
- private OutputInterface $output;
/** @var resource */
private $input;
/**
* @param resource|null $input
*/
- public function __construct(OutputInterface $output, $input = null)
- {
- $this->output = $output;
+ public function __construct(
+ private OutputInterface $output,
+ $input = null,
+ ) {
$this->input = $input ?? (\defined('STDIN') ? \STDIN : fopen('php://input', 'r+'));
}
diff --git a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
index 27705ddb..f712c614 100755
--- a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
+++ b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
@@ -29,10 +29,7 @@ use Symfony\Component\DependencyInjection\TypedReference;
*/
class AddConsoleCommandPass implements CompilerPassInterface
{
- /**
- * @return void
- */
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$commandServices = $container->findTaggedServiceIds('console.command', true);
$lazyCommandMap = [];
diff --git a/vendor/symfony/console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Descriptor/ApplicationDescription.php
index ef9e8a63..5149fde4 100755
--- a/vendor/symfony/console/Descriptor/ApplicationDescription.php
+++ b/vendor/symfony/console/Descriptor/ApplicationDescription.php
@@ -24,9 +24,6 @@ class ApplicationDescription
{
public const GLOBAL_NAMESPACE = '_global';
- private Application $application;
- private ?string $namespace;
- private bool $showHidden;
private array $namespaces;
/**
@@ -39,11 +36,11 @@ class ApplicationDescription
*/
private array $aliases = [];
- public function __construct(Application $application, ?string $namespace = null, bool $showHidden = false)
- {
- $this->application = $application;
- $this->namespace = $namespace;
- $this->showHidden = $showHidden;
+ public function __construct(
+ private Application $application,
+ private ?string $namespace = null,
+ private bool $showHidden = false,
+ ) {
}
public function getNamespaces(): array
diff --git a/vendor/symfony/console/Descriptor/DescriptorInterface.php b/vendor/symfony/console/Descriptor/DescriptorInterface.php
index ab468a25..04e5a7c8 100755
--- a/vendor/symfony/console/Descriptor/DescriptorInterface.php
+++ b/vendor/symfony/console/Descriptor/DescriptorInterface.php
@@ -20,8 +20,5 @@ use Symfony\Component\Console\Output\OutputInterface;
*/
interface DescriptorInterface
{
- /**
- * @return void
- */
- public function describe(OutputInterface $output, object $object, array $options = []);
+ public function describe(OutputInterface $output, object $object, array $options = []): void;
}
diff --git a/vendor/symfony/console/Descriptor/ReStructuredTextDescriptor.php b/vendor/symfony/console/Descriptor/ReStructuredTextDescriptor.php
index d4423fd3..f12fecb6 100755
--- a/vendor/symfony/console/Descriptor/ReStructuredTextDescriptor.php
+++ b/vendor/symfony/console/Descriptor/ReStructuredTextDescriptor.php
@@ -226,7 +226,7 @@ class ReStructuredTextDescriptor extends Descriptor
$nonDefaultOptions = [];
foreach ($definition->getOptions() as $option) {
// Skip global options.
- if (!\in_array($option->getName(), $globalOptions)) {
+ if (!\in_array($option->getName(), $globalOptions, true)) {
$nonDefaultOptions[] = $option;
}
}
diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php
index 866c7185..8e44c88c 100755
--- a/vendor/symfony/console/Descriptor/XmlDescriptor.php
+++ b/vendor/symfony/console/Descriptor/XmlDescriptor.php
@@ -208,7 +208,7 @@ class XmlDescriptor extends Descriptor
$defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : []));
$objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
- if (!empty($defaults)) {
+ if ($defaults) {
foreach ($defaults as $default) {
$defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
$defaultXML->appendChild($dom->createTextNode($default));
diff --git a/vendor/symfony/console/Event/ConsoleErrorEvent.php b/vendor/symfony/console/Event/ConsoleErrorEvent.php
index 7be2ff83..1c0d6265 100755
--- a/vendor/symfony/console/Event/ConsoleErrorEvent.php
+++ b/vendor/symfony/console/Event/ConsoleErrorEvent.php
@@ -22,14 +22,15 @@ use Symfony\Component\Console\Output\OutputInterface;
*/
final class ConsoleErrorEvent extends ConsoleEvent
{
- private \Throwable $error;
private int $exitCode;
- public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, ?Command $command = null)
- {
+ public function __construct(
+ InputInterface $input,
+ OutputInterface $output,
+ private \Throwable $error,
+ ?Command $command = null,
+ ) {
parent::__construct($command, $input, $output);
-
- $this->error = $error;
}
public function getError(): \Throwable
diff --git a/vendor/symfony/console/Event/ConsoleEvent.php b/vendor/symfony/console/Event/ConsoleEvent.php
index 6ba1615f..2f9f0778 100755
--- a/vendor/symfony/console/Event/ConsoleEvent.php
+++ b/vendor/symfony/console/Event/ConsoleEvent.php
@@ -23,16 +23,11 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
class ConsoleEvent extends Event
{
- protected $command;
-
- private InputInterface $input;
- private OutputInterface $output;
-
- public function __construct(?Command $command, InputInterface $input, OutputInterface $output)
- {
- $this->command = $command;
- $this->input = $input;
- $this->output = $output;
+ public function __construct(
+ protected ?Command $command,
+ private InputInterface $input,
+ private OutputInterface $output,
+ ) {
}
/**
diff --git a/vendor/symfony/console/Event/ConsoleSignalEvent.php b/vendor/symfony/console/Event/ConsoleSignalEvent.php
index 95af1f91..b27f08a1 100755
--- a/vendor/symfony/console/Event/ConsoleSignalEvent.php
+++ b/vendor/symfony/console/Event/ConsoleSignalEvent.php
@@ -20,14 +20,14 @@ use Symfony\Component\Console\Output\OutputInterface;
*/
final class ConsoleSignalEvent extends ConsoleEvent
{
- private int $handlingSignal;
- private int|false $exitCode;
-
- public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal, int|false $exitCode = 0)
- {
+ public function __construct(
+ Command $command,
+ InputInterface $input,
+ OutputInterface $output,
+ private int $handlingSignal,
+ private int|false $exitCode = 0,
+ ) {
parent::__construct($command, $input, $output);
- $this->handlingSignal = $handlingSignal;
- $this->exitCode = $exitCode;
}
public function getHandlingSignal(): int
diff --git a/vendor/symfony/console/EventListener/ErrorListener.php b/vendor/symfony/console/EventListener/ErrorListener.php
index c9ec2443..49915a49 100755
--- a/vendor/symfony/console/EventListener/ErrorListener.php
+++ b/vendor/symfony/console/EventListener/ErrorListener.php
@@ -24,17 +24,12 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
*/
class ErrorListener implements EventSubscriberInterface
{
- private ?LoggerInterface $logger;
-
- public function __construct(?LoggerInterface $logger = null)
- {
- $this->logger = $logger;
+ public function __construct(
+ private ?LoggerInterface $logger = null,
+ ) {
}
- /**
- * @return void
- */
- public function onConsoleError(ConsoleErrorEvent $event)
+ public function onConsoleError(ConsoleErrorEvent $event): void
{
if (null === $this->logger) {
return;
@@ -51,10 +46,7 @@ class ErrorListener implements EventSubscriberInterface
$this->logger->critical('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]);
}
- /**
- * @return void
- */
- public function onConsoleTerminate(ConsoleTerminateEvent $event)
+ public function onConsoleTerminate(ConsoleTerminateEvent $event): void
{
if (null === $this->logger) {
return;
diff --git a/vendor/symfony/console/Exception/CommandNotFoundException.php b/vendor/symfony/console/Exception/CommandNotFoundException.php
index 541b32b2..246f04fa 100755
--- a/vendor/symfony/console/Exception/CommandNotFoundException.php
+++ b/vendor/symfony/console/Exception/CommandNotFoundException.php
@@ -18,19 +18,19 @@ namespace Symfony\Component\Console\Exception;
*/
class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface
{
- private array $alternatives;
-
/**
* @param string $message Exception message to throw
* @param string[] $alternatives List of similar defined names
* @param int $code Exception code
* @param \Throwable|null $previous Previous exception used for the exception chaining
*/
- public function __construct(string $message, array $alternatives = [], int $code = 0, ?\Throwable $previous = null)
- {
+ public function __construct(
+ string $message,
+ private array $alternatives = [],
+ int $code = 0,
+ ?\Throwable $previous = null,
+ ) {
parent::__construct($message, $code, $previous);
-
- $this->alternatives = $alternatives;
}
/**
diff --git a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php b/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php
index ae23decb..06fa6e40 100755
--- a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php
+++ b/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php
@@ -21,19 +21,13 @@ final class NullOutputFormatterStyle implements OutputFormatterStyleInterface
return $text;
}
- public function setBackground(?string $color = null): void
+ public function setBackground(?string $color): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
// do nothing
}
- public function setForeground(?string $color = null): void
+ public function setForeground(?string $color): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
// do nothing
}
diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php
index 3e4897c3..8e81e590 100755
--- a/vendor/symfony/console/Formatter/OutputFormatter.php
+++ b/vendor/symfony/console/Formatter/OutputFormatter.php
@@ -83,10 +83,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface
$this->styleStack = new OutputFormatterStyleStack();
}
- /**
- * @return void
- */
- public function setDecorated(bool $decorated)
+ public function setDecorated(bool $decorated): void
{
$this->decorated = $decorated;
}
@@ -96,10 +93,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface
return $this->decorated;
}
- /**
- * @return void
- */
- public function setStyle(string $name, OutputFormatterStyleInterface $style)
+ public function setStyle(string $name, OutputFormatterStyleInterface $style): void
{
$this->styles[strtolower($name)] = $style;
}
@@ -123,10 +117,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface
return $this->formatAndWrap($message, 0);
}
- /**
- * @return string
- */
- public function formatAndWrap(?string $message, int $width)
+ public function formatAndWrap(?string $message, int $width): string
{
if (null === $message) {
return '';
diff --git a/vendor/symfony/console/Formatter/OutputFormatterInterface.php b/vendor/symfony/console/Formatter/OutputFormatterInterface.php
index 433cd419..947347fa 100755
--- a/vendor/symfony/console/Formatter/OutputFormatterInterface.php
+++ b/vendor/symfony/console/Formatter/OutputFormatterInterface.php
@@ -20,10 +20,8 @@ interface OutputFormatterInterface
{
/**
* Sets the decorated flag.
- *
- * @return void
*/
- public function setDecorated(bool $decorated);
+ public function setDecorated(bool $decorated): void;
/**
* Whether the output will decorate messages.
@@ -32,10 +30,8 @@ interface OutputFormatterInterface
/**
* Sets a new style.
- *
- * @return void
*/
- public function setStyle(string $name, OutputFormatterStyleInterface $style);
+ public function setStyle(string $name, OutputFormatterStyleInterface $style): void;
/**
* Checks if output formatter has style with specified name.
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Formatter/OutputFormatterStyle.php
index 21e7f5ab..20a65b51 100755
--- a/vendor/symfony/console/Formatter/OutputFormatterStyle.php
+++ b/vendor/symfony/console/Formatter/OutputFormatterStyle.php
@@ -38,25 +38,13 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
$this->color = new Color($this->foreground = $foreground ?: '', $this->background = $background ?: '', $this->options = $options);
}
- /**
- * @return void
- */
- public function setForeground(?string $color = null)
+ public function setForeground(?string $color): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
$this->color = new Color($this->foreground = $color ?: '', $this->background, $this->options);
}
- /**
- * @return void
- */
- public function setBackground(?string $color = null)
+ public function setBackground(?string $color): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
$this->color = new Color($this->foreground, $this->background = $color ?: '', $this->options);
}
@@ -65,19 +53,13 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
$this->href = $url;
}
- /**
- * @return void
- */
- public function setOption(string $option)
+ public function setOption(string $option): void
{
$this->options[] = $option;
$this->color = new Color($this->foreground, $this->background, $this->options);
}
- /**
- * @return void
- */
- public function unsetOption(string $option)
+ public function unsetOption(string $option): void
{
$pos = array_search($option, $this->options);
if (false !== $pos) {
@@ -87,10 +69,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
$this->color = new Color($this->foreground, $this->background, $this->options);
}
- /**
- * @return void
- */
- public function setOptions(array $options)
+ public function setOptions(array $options): void
{
$this->color = new Color($this->foreground, $this->background, $this->options = $options);
}
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
index 3b15098c..03741927 100755
--- a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
+++ b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
@@ -20,38 +20,28 @@ interface OutputFormatterStyleInterface
{
/**
* Sets style foreground color.
- *
- * @return void
*/
- public function setForeground(?string $color);
+ public function setForeground(?string $color): void;
/**
* Sets style background color.
- *
- * @return void
*/
- public function setBackground(?string $color);
+ public function setBackground(?string $color): void;
/**
* Sets some specific style option.
- *
- * @return void
*/
- public function setOption(string $option);
+ public function setOption(string $option): void;
/**
* Unsets some specific style option.
- *
- * @return void
*/
- public function unsetOption(string $option);
+ public function unsetOption(string $option): void;
/**
* Sets multiple style options at once.
- *
- * @return void
*/
- public function setOptions(array $options);
+ public function setOptions(array $options): void;
/**
* Applies the style to a given text.
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
index 62d2ca0e..4985213a 100755
--- a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
+++ b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
@@ -34,20 +34,16 @@ class OutputFormatterStyleStack implements ResetInterface
/**
* Resets stack (ie. empty internal arrays).
- *
- * @return void
*/
- public function reset()
+ public function reset(): void
{
$this->styles = [];
}
/**
* Pushes a style in the stack.
- *
- * @return void
*/
- public function push(OutputFormatterStyleInterface $style)
+ public function push(OutputFormatterStyleInterface $style): void
{
$this->styles[] = $style;
}
diff --git a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php b/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php
index 746cd27e..412d9976 100755
--- a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php
+++ b/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php
@@ -20,8 +20,6 @@ interface WrappableOutputFormatterInterface extends OutputFormatterInterface
{
/**
* Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping).
- *
- * @return string
*/
- public function formatAndWrap(?string $message, int $width);
+ public function formatAndWrap(?string $message, int $width): string;
}
diff --git a/vendor/symfony/console/Helper/DescriptorHelper.php b/vendor/symfony/console/Helper/DescriptorHelper.php
index eb32bce8..300c7b10 100755
--- a/vendor/symfony/console/Helper/DescriptorHelper.php
+++ b/vendor/symfony/console/Helper/DescriptorHelper.php
@@ -50,11 +50,9 @@ class DescriptorHelper extends Helper
* * format: string, the output format name
* * raw_text: boolean, sets output type as raw
*
- * @return void
- *
* @throws InvalidArgumentException when the given format is not supported
*/
- public function describe(OutputInterface $output, ?object $object, array $options = [])
+ public function describe(OutputInterface $output, ?object $object, array $options = []): void
{
$options = array_merge([
'raw_text' => false,
diff --git a/vendor/symfony/console/Helper/Dumper.php b/vendor/symfony/console/Helper/Dumper.php
index a3b8e395..0cd01e61 100755
--- a/vendor/symfony/console/Helper/Dumper.php
+++ b/vendor/symfony/console/Helper/Dumper.php
@@ -21,17 +21,13 @@ use Symfony\Component\VarDumper\Dumper\CliDumper;
*/
final class Dumper
{
- private OutputInterface $output;
- private ?CliDumper $dumper;
- private ?ClonerInterface $cloner;
private \Closure $handler;
- public function __construct(OutputInterface $output, ?CliDumper $dumper = null, ?ClonerInterface $cloner = null)
- {
- $this->output = $output;
- $this->dumper = $dumper;
- $this->cloner = $cloner;
-
+ public function __construct(
+ private OutputInterface $output,
+ private ?CliDumper $dumper = null,
+ private ?ClonerInterface $cloner = null,
+ ) {
if (class_exists(CliDumper::class)) {
$this->handler = function ($var): string {
$dumper = $this->dumper ??= new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR);
diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php
index 05be6478..de090063 100755
--- a/vendor/symfony/console/Helper/Helper.php
+++ b/vendor/symfony/console/Helper/Helper.php
@@ -21,16 +21,10 @@ use Symfony\Component\String\UnicodeString;
*/
abstract class Helper implements HelperInterface
{
- protected $helperSet;
+ protected ?HelperSet $helperSet = null;
- /**
- * @return void
- */
- public function setHelperSet(?HelperSet $helperSet = null)
+ public function setHelperSet(?HelperSet $helperSet): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
$this->helperSet = $helperSet;
}
@@ -91,10 +85,7 @@ abstract class Helper implements HelperInterface
return mb_substr($string, $from, $length, $encoding);
}
- /**
- * @return string
- */
- public static function formatTime(int|float $secs, int $precision = 1)
+ public static function formatTime(int|float $secs, int $precision = 1): string
{
$secs = (int) floor($secs);
@@ -134,10 +125,7 @@ abstract class Helper implements HelperInterface
return implode(', ', array_reverse($times));
}
- /**
- * @return string
- */
- public static function formatMemory(int $memory)
+ public static function formatMemory(int $memory): string
{
if ($memory >= 1024 * 1024 * 1024) {
return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024);
@@ -154,10 +142,7 @@ abstract class Helper implements HelperInterface
return sprintf('%d B', $memory);
}
- /**
- * @return string
- */
- public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string)
+ public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string): string
{
$isDecorated = $formatter->isDecorated();
$formatter->setDecorated(false);
diff --git a/vendor/symfony/console/Helper/HelperInterface.php b/vendor/symfony/console/Helper/HelperInterface.php
index ab626c93..8c4da3c9 100755
--- a/vendor/symfony/console/Helper/HelperInterface.php
+++ b/vendor/symfony/console/Helper/HelperInterface.php
@@ -20,10 +20,8 @@ interface HelperInterface
{
/**
* Sets the helper set associated with this helper.
- *
- * @return void
*/
- public function setHelperSet(?HelperSet $helperSet);
+ public function setHelperSet(?HelperSet $helperSet): void;
/**
* Gets the helper set associated with this helper.
@@ -32,8 +30,6 @@ interface HelperInterface
/**
* Returns the canonical name of this helper.
- *
- * @return string
*/
- public function getName();
+ public function getName(): string;
}
diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php
index f8c74ca2..30df9f95 100755
--- a/vendor/symfony/console/Helper/HelperSet.php
+++ b/vendor/symfony/console/Helper/HelperSet.php
@@ -35,10 +35,7 @@ class HelperSet implements \IteratorAggregate
}
}
- /**
- * @return void
- */
- public function set(HelperInterface $helper, ?string $alias = null)
+ public function set(HelperInterface $helper, ?string $alias = null): void
{
$this->helpers[$helper->getName()] = $helper;
if (null !== $alias) {
diff --git a/vendor/symfony/console/Helper/InputAwareHelper.php b/vendor/symfony/console/Helper/InputAwareHelper.php
index 6f822597..47126bda 100755
--- a/vendor/symfony/console/Helper/InputAwareHelper.php
+++ b/vendor/symfony/console/Helper/InputAwareHelper.php
@@ -21,12 +21,9 @@ use Symfony\Component\Console\Input\InputInterface;
*/
abstract class InputAwareHelper extends Helper implements InputAwareInterface
{
- protected $input;
+ protected InputInterface $input;
- /**
- * @return void
- */
- public function setInput(InputInterface $input)
+ public function setInput(InputInterface $input): void
{
$this->input = $input;
}
diff --git a/vendor/symfony/console/Helper/OutputWrapper.php b/vendor/symfony/console/Helper/OutputWrapper.php
index 2ec819c7..0ea2b705 100755
--- a/vendor/symfony/console/Helper/OutputWrapper.php
+++ b/vendor/symfony/console/Helper/OutputWrapper.php
@@ -49,7 +49,7 @@ final class OutputWrapper
private const URL_PATTERN = 'https?://\S+';
public function __construct(
- private bool $allowCutUrls = false
+ private bool $allowCutUrls = false,
) {
}
diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php
index b406292b..7c22b7d5 100755
--- a/vendor/symfony/console/Helper/ProgressBar.php
+++ b/vendor/symfony/console/Helper/ProgressBar.php
@@ -195,7 +195,7 @@ final class ProgressBar
public function getMaxSteps(): int
{
- return $this->max;
+ return $this->max ?? 0;
}
public function getProgress(): int
@@ -215,7 +215,7 @@ final class ProgressBar
public function getBarOffset(): float
{
- return floor($this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? (int) (min(5, $this->barWidth / 15) * $this->writeCount) : $this->step) % $this->barWidth);
+ return floor(null !== $this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? (int) (min(5, $this->barWidth / 15) * $this->writeCount) : $this->step) % $this->barWidth);
}
public function getEstimated(): float
@@ -253,7 +253,7 @@ final class ProgressBar
public function getBarCharacter(): string
{
- return $this->barChar ?? ($this->max ? '=' : $this->emptyBarChar);
+ return $this->barChar ?? (null !== $this->max ? '=' : $this->emptyBarChar);
}
public function setEmptyBarCharacter(string $char): void
@@ -315,7 +315,21 @@ final class ProgressBar
*/
public function iterate(iterable $iterable, ?int $max = null): iterable
{
- $this->start($max ?? (is_countable($iterable) ? \count($iterable) : 0));
+ if (0 === $max) {
+ $max = null;
+ }
+
+ $max ??= is_countable($iterable) ? \count($iterable) : null;
+
+ if (0 === $max) {
+ $this->max = 0;
+ $this->stepWidth = 2;
+ $this->finish();
+
+ return;
+ }
+
+ $this->start($max);
foreach ($iterable as $key => $value) {
yield $key => $value;
@@ -373,11 +387,15 @@ final class ProgressBar
$step = 0;
}
- $redrawFreq = $this->redrawFreq ?? (($this->max ?: 10) / 10);
- $prevPeriod = (int) ($this->step / $redrawFreq);
- $currPeriod = (int) ($step / $redrawFreq);
+ $redrawFreq = $this->redrawFreq ?? (($this->max ?? 10) / 10);
+ $prevPeriod = $redrawFreq ? (int) ($this->step / $redrawFreq) : 0;
+ $currPeriod = $redrawFreq ? (int) ($step / $redrawFreq) : 0;
$this->step = $step;
- $this->percent = $this->max ? (float) $this->step / $this->max : 0;
+ $this->percent = match ($this->max) {
+ null => 0,
+ 0 => 1,
+ default => (float) $this->step / $this->max,
+ };
$timeInterval = microtime(true) - $this->lastWriteTime;
// Draw regardless of other limits
@@ -398,11 +416,20 @@ final class ProgressBar
}
}
- public function setMaxSteps(int $max): void
+ public function setMaxSteps(?int $max): void
{
+ if (0 === $max) {
+ $max = null;
+ }
+
$this->format = null;
- $this->max = max(0, $max);
- $this->stepWidth = $this->max ? Helper::width((string) $this->max) : 4;
+ if (null === $max) {
+ $this->max = null;
+ $this->stepWidth = 4;
+ } else {
+ $this->max = max(0, $max);
+ $this->stepWidth = Helper::width((string) $this->max);
+ }
}
/**
@@ -410,16 +437,16 @@ final class ProgressBar
*/
public function finish(): void
{
- if (!$this->max) {
+ if (null === $this->max) {
$this->max = $this->step;
}
- if ($this->step === $this->max && !$this->overwrite) {
+ if (($this->step === $this->max || null === $this->max) && !$this->overwrite) {
// prevent double 100% output
return;
}
- $this->setProgress($this->max);
+ $this->setProgress($this->max ?? $this->step);
}
/**
@@ -542,14 +569,14 @@ final class ProgressBar
},
'elapsed' => fn (self $bar) => Helper::formatTime(time() - $bar->getStartTime(), 2),
'remaining' => function (self $bar) {
- if (!$bar->getMaxSteps()) {
+ if (null === $bar->getMaxSteps()) {
throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.');
}
return Helper::formatTime($bar->getRemaining(), 2);
},
'estimated' => function (self $bar) {
- if (!$bar->getMaxSteps()) {
+ if (null === $bar->getMaxSteps()) {
throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.');
}
diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php
index 92106caf..969d8353 100755
--- a/vendor/symfony/console/Helper/ProgressIndicator.php
+++ b/vendor/symfony/console/Helper/ProgressIndicator.php
@@ -31,13 +31,11 @@ class ProgressIndicator
'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)',
];
- private OutputInterface $output;
private int $startTime;
private ?string $format = null;
private ?string $message = null;
private array $indicatorValues;
private int $indicatorCurrent;
- private int $indicatorChangeInterval;
private float $indicatorUpdateTime;
private bool $started = false;
@@ -50,9 +48,12 @@ class ProgressIndicator
* @param int $indicatorChangeInterval Change interval in milliseconds
* @param array|null $indicatorValues Animated indicator characters
*/
- public function __construct(OutputInterface $output, ?string $format = null, int $indicatorChangeInterval = 100, ?array $indicatorValues = null)
- {
- $this->output = $output;
+ public function __construct(
+ private OutputInterface $output,
+ ?string $format = null,
+ private int $indicatorChangeInterval = 100,
+ ?array $indicatorValues = null,
+ ) {
$format ??= $this->determineBestFormat();
$indicatorValues ??= ['-', '\\', '|', '/'];
@@ -63,17 +64,14 @@ class ProgressIndicator
}
$this->format = self::getFormatDefinition($format);
- $this->indicatorChangeInterval = $indicatorChangeInterval;
$this->indicatorValues = $indicatorValues;
$this->startTime = time();
}
/**
* Sets the current indicator message.
- *
- * @return void
*/
- public function setMessage(?string $message)
+ public function setMessage(?string $message): void
{
$this->message = $message;
@@ -82,10 +80,8 @@ class ProgressIndicator
/**
* Starts the indicator output.
- *
- * @return void
*/
- public function start(string $message)
+ public function start(string $message): void
{
if ($this->started) {
throw new LogicException('Progress indicator already started.');
@@ -102,10 +98,8 @@ class ProgressIndicator
/**
* Advances the indicator.
- *
- * @return void
*/
- public function advance()
+ public function advance(): void
{
if (!$this->started) {
throw new LogicException('Progress indicator has not yet been started.');
@@ -129,10 +123,8 @@ class ProgressIndicator
/**
* Finish the indicator with message.
- *
- * @return void
*/
- public function finish(string $message)
+ public function finish(string $message): void
{
if (!$this->started) {
throw new LogicException('Progress indicator has not yet been started.');
@@ -156,10 +148,8 @@ class ProgressIndicator
* Sets a placeholder formatter for a given name.
*
* This method also allow you to override an existing placeholder.
- *
- * @return void
*/
- public static function setPlaceholderFormatterDefinition(string $name, callable $callable)
+ public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void
{
self::$formatters ??= self::initPlaceholderFormatters();
diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php
index b40b1319..54825c6c 100755
--- a/vendor/symfony/console/Helper/QuestionHelper.php
+++ b/vendor/symfony/console/Helper/QuestionHelper.php
@@ -34,11 +34,6 @@ use function Symfony\Component\String\s;
*/
class QuestionHelper extends Helper
{
- /**
- * @var resource|null
- */
- private $inputStream;
-
private static bool $stty = true;
private static bool $stdinIsInteractive;
@@ -59,16 +54,15 @@ class QuestionHelper extends Helper
return $this->getDefaultAnswer($question);
}
- if ($input instanceof StreamableInputInterface && $stream = $input->getStream()) {
- $this->inputStream = $stream;
- }
+ $inputStream = $input instanceof StreamableInputInterface ? $input->getStream() : null;
+ $inputStream ??= STDIN;
try {
if (!$question->getValidator()) {
- return $this->doAsk($output, $question);
+ return $this->doAsk($inputStream, $output, $question);
}
- $interviewer = fn () => $this->doAsk($output, $question);
+ $interviewer = fn () => $this->doAsk($inputStream, $output, $question);
return $this->validateAttempts($interviewer, $output, $question);
} catch (MissingInputException $exception) {
@@ -89,10 +83,8 @@ class QuestionHelper extends Helper
/**
* Prevents usage of stty.
- *
- * @return void
*/
- public static function disableStty()
+ public static function disableStty(): void
{
self::$stty = false;
}
@@ -100,13 +92,14 @@ class QuestionHelper extends Helper
/**
* Asks the question to the user.
*
+ * @param resource $inputStream
+ *
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
*/
- private function doAsk(OutputInterface $output, Question $question): mixed
+ private function doAsk($inputStream, OutputInterface $output, Question $question): mixed
{
$this->writePrompt($output, $question);
- $inputStream = $this->inputStream ?: \STDIN;
$autocomplete = $question->getAutocompleterCallback();
if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) {
@@ -190,10 +183,8 @@ class QuestionHelper extends Helper
/**
* Outputs the question prompt.
- *
- * @return void
*/
- protected function writePrompt(OutputInterface $output, Question $question)
+ protected function writePrompt(OutputInterface $output, Question $question): void
{
$message = $question->getQuestion();
@@ -228,10 +219,8 @@ class QuestionHelper extends Helper
/**
* Outputs an error message.
- *
- * @return void
*/
- protected function writeError(OutputInterface $output, \Exception $error)
+ protected function writeError(OutputInterface $output, \Exception $error): void
{
if (null !== $this->getHelperSet() && $this->getHelperSet()->has('formatter')) {
$message = $this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error');
diff --git a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php
index 8ebc8437..48d947b7 100755
--- a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php
+++ b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php
@@ -25,10 +25,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
*/
class SymfonyQuestionHelper extends QuestionHelper
{
- /**
- * @return void
- */
- protected function writePrompt(OutputInterface $output, Question $question)
+ protected function writePrompt(OutputInterface $output, Question $question): void
{
$text = OutputFormatter::escapeTrailingBackslash($question->getQuestion());
$default = $question->getDefault();
@@ -83,10 +80,7 @@ class SymfonyQuestionHelper extends QuestionHelper
$output->write($prompt);
}
- /**
- * @return void
- */
- protected function writeError(OutputInterface $output, \Exception $error)
+ protected function writeError(OutputInterface $output, \Exception $error): void
{
if ($output instanceof SymfonyStyle) {
$output->newLine();
diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php
index 1f026dc5..09709a28 100755
--- a/vendor/symfony/console/Helper/Table.php
+++ b/vendor/symfony/console/Helper/Table.php
@@ -45,7 +45,6 @@ class Table
private array $rows = [];
private array $effectiveColumnWidths = [];
private int $numberOfColumns;
- private OutputInterface $output;
private TableStyle $style;
private array $columnStyles = [];
private array $columnWidths = [];
@@ -55,10 +54,9 @@ class Table
private static array $styles;
- public function __construct(OutputInterface $output)
- {
- $this->output = $output;
-
+ public function __construct(
+ private OutputInterface $output,
+ ) {
self::$styles ??= self::initStyles();
$this->setStyle('default');
@@ -66,10 +64,8 @@ class Table
/**
* Sets a style definition.
- *
- * @return void
*/
- public static function setStyleDefinition(string $name, TableStyle $style)
+ public static function setStyleDefinition(string $name, TableStyle $style): void
{
self::$styles ??= self::initStyles();
@@ -194,7 +190,7 @@ class Table
/**
* @return $this
*/
- public function setRows(array $rows)
+ public function setRows(array $rows): static
{
$this->rows = [];
@@ -312,10 +308,8 @@ class Table
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
* | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
* +---------------+-----------------------+------------------+
- *
- * @return void
*/
- public function render()
+ public function render(): void
{
$divider = new TableSeparator();
$isCellWithColspan = static fn ($cell) => $cell instanceof TableCell && $cell->getColspan() >= 2;
@@ -725,7 +719,7 @@ class Table
foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
// we need to know if $unmergedRow will be merged or inserted into $rows
- if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) {
+ if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRow) <= $this->numberOfColumns)) {
foreach ($unmergedRow as $cellKey => $cell) {
// insert cell into row at cellKey position
array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]);
@@ -733,8 +727,8 @@ class Table
} else {
$row = $this->copyRow($rows, $unmergedRowKey - 1);
foreach ($unmergedRow as $column => $cell) {
- if (!empty($cell)) {
- $row[$column] = $unmergedRow[$column];
+ if ($cell) {
+ $row[$column] = $cell;
}
}
array_splice($rows, $unmergedRowKey, 0, [$row]);
diff --git a/vendor/symfony/console/Helper/TableCell.php b/vendor/symfony/console/Helper/TableCell.php
index 394b2bc9..1c4eeea2 100755
--- a/vendor/symfony/console/Helper/TableCell.php
+++ b/vendor/symfony/console/Helper/TableCell.php
@@ -18,17 +18,16 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
*/
class TableCell
{
- private string $value;
private array $options = [
'rowspan' => 1,
'colspan' => 1,
'style' => null,
];
- public function __construct(string $value = '', array $options = [])
- {
- $this->value = $value;
-
+ public function __construct(
+ private string $value = '',
+ array $options = [],
+ ) {
// check option names
if ($diff = array_diff(array_keys($options), array_keys($this->options))) {
throw new InvalidArgumentException(sprintf('The TableCell does not support the following options: \'%s\'.', implode('\', \'', $diff)));
diff --git a/vendor/symfony/console/Helper/TableCellStyle.php b/vendor/symfony/console/Helper/TableCellStyle.php
index 9419dcb4..49b97f85 100755
--- a/vendor/symfony/console/Helper/TableCellStyle.php
+++ b/vendor/symfony/console/Helper/TableCellStyle.php
@@ -67,7 +67,7 @@ class TableCellStyle
{
return array_filter(
$this->getOptions(),
- fn ($key) => \in_array($key, self::TAG_OPTIONS) && isset($this->options[$key]),
+ fn ($key) => \in_array($key, self::TAG_OPTIONS, true) && isset($this->options[$key]),
\ARRAY_FILTER_USE_KEY
);
}
diff --git a/vendor/symfony/console/Helper/TableRows.php b/vendor/symfony/console/Helper/TableRows.php
index 97d07726..fb2dc278 100755
--- a/vendor/symfony/console/Helper/TableRows.php
+++ b/vendor/symfony/console/Helper/TableRows.php
@@ -16,11 +16,9 @@ namespace Symfony\Component\Console\Helper;
*/
class TableRows implements \IteratorAggregate
{
- private \Closure $generator;
-
- public function __construct(\Closure $generator)
- {
- $this->generator = $generator;
+ public function __construct(
+ private \Closure $generator,
+ ) {
}
public function getIterator(): \Traversable
diff --git a/vendor/symfony/console/Input/ArgvInput.php b/vendor/symfony/console/Input/ArgvInput.php
index ab9f28c5..95703ba5 100755
--- a/vendor/symfony/console/Input/ArgvInput.php
+++ b/vendor/symfony/console/Input/ArgvInput.php
@@ -40,9 +40,11 @@ use Symfony\Component\Console\Exception\RuntimeException;
*/
class ArgvInput extends Input
{
+ /** @var list */
private array $tokens;
private array $parsed;
+ /** @param list|null $argv */
public function __construct(?array $argv = null, ?InputDefinition $definition = null)
{
$argv ??= $_SERVER['argv'] ?? [];
@@ -55,18 +57,13 @@ class ArgvInput extends Input
parent::__construct($definition);
}
- /**
- * @return void
- */
- protected function setTokens(array $tokens)
+ /** @param list $tokens */
+ protected function setTokens(array $tokens): void
{
$this->tokens = $tokens;
}
- /**
- * @return void
- */
- protected function parse()
+ protected function parse(): void
{
$parseOptions = true;
$this->parsed = $this->tokens;
@@ -348,6 +345,35 @@ class ArgvInput extends Input
return $default;
}
+ /**
+ * Returns un-parsed and not validated tokens.
+ *
+ * @param bool $strip Whether to return the raw parameters (false) or the values after the command name (true)
+ *
+ * @return list
+ */
+ public function getRawTokens(bool $strip = false): array
+ {
+ if (!$strip) {
+ return $this->tokens;
+ }
+
+ $parameters = [];
+ $keep = false;
+ foreach ($this->tokens as $value) {
+ if (!$keep && $value === $this->getFirstArgument()) {
+ $keep = true;
+
+ continue;
+ }
+ if ($keep) {
+ $parameters[] = $value;
+ }
+ }
+
+ return $parameters;
+ }
+
/**
* Returns a stringified representation of the args passed to the command.
*/
diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php
index c1bc914c..d27ff411 100755
--- a/vendor/symfony/console/Input/ArrayInput.php
+++ b/vendor/symfony/console/Input/ArrayInput.php
@@ -25,12 +25,10 @@ use Symfony\Component\Console\Exception\InvalidOptionException;
*/
class ArrayInput extends Input
{
- private array $parameters;
-
- public function __construct(array $parameters, ?InputDefinition $definition = null)
- {
- $this->parameters = $parameters;
-
+ public function __construct(
+ private array $parameters,
+ ?InputDefinition $definition = null,
+ ) {
parent::__construct($definition);
}
@@ -113,10 +111,7 @@ class ArrayInput extends Input
return implode(' ', $params);
}
- /**
- * @return void
- */
- protected function parse()
+ protected function parse(): void
{
foreach ($this->parameters as $key => $value) {
if ('--' === $key) {
diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php
index 1c21573b..5a8b9a27 100755
--- a/vendor/symfony/console/Input/Input.php
+++ b/vendor/symfony/console/Input/Input.php
@@ -27,12 +27,12 @@ use Symfony\Component\Console\Exception\RuntimeException;
*/
abstract class Input implements InputInterface, StreamableInputInterface
{
- protected $definition;
+ protected InputDefinition $definition;
/** @var resource */
protected $stream;
- protected $options = [];
- protected $arguments = [];
- protected $interactive = true;
+ protected array $options = [];
+ protected array $arguments = [];
+ protected bool $interactive = true;
public function __construct(?InputDefinition $definition = null)
{
@@ -44,10 +44,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
}
}
- /**
- * @return void
- */
- public function bind(InputDefinition $definition)
+ public function bind(InputDefinition $definition): void
{
$this->arguments = [];
$this->options = [];
@@ -58,15 +55,10 @@ abstract class Input implements InputInterface, StreamableInputInterface
/**
* Processes command line arguments.
- *
- * @return void
*/
- abstract protected function parse();
+ abstract protected function parse(): void;
- /**
- * @return void
- */
- public function validate()
+ public function validate(): void
{
$definition = $this->definition;
$givenArguments = $this->arguments;
@@ -83,10 +75,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
return $this->interactive;
}
- /**
- * @return void
- */
- public function setInteractive(bool $interactive)
+ public function setInteractive(bool $interactive): void
{
$this->interactive = $interactive;
}
@@ -105,10 +94,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
return $this->arguments[$name] ?? $this->definition->getArgument($name)->getDefault();
}
- /**
- * @return void
- */
- public function setArgument(string $name, mixed $value)
+ public function setArgument(string $name, mixed $value): void
{
if (!$this->definition->hasArgument($name)) {
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
@@ -144,10 +130,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault();
}
- /**
- * @return void
- */
- public function setOption(string $name, mixed $value)
+ public function setOption(string $name, mixed $value): void
{
if ($this->definition->hasNegation($name)) {
$this->options[$this->definition->negationToName($name)] = !$value;
@@ -175,10 +158,8 @@ abstract class Input implements InputInterface, StreamableInputInterface
/**
* @param resource $stream
- *
- * @return void
*/
- public function setStream($stream)
+ public function setStream($stream): void
{
$this->stream = $stream;
}
diff --git a/vendor/symfony/console/Input/InputArgument.php b/vendor/symfony/console/Input/InputArgument.php
index 4ef79feb..a5d94927 100755
--- a/vendor/symfony/console/Input/InputArgument.php
+++ b/vendor/symfony/console/Input/InputArgument.php
@@ -25,37 +25,47 @@ use Symfony\Component\Console\Exception\LogicException;
*/
class InputArgument
{
+ /**
+ * Providing an argument is required (e.g. just 'app:foo' is not allowed).
+ */
public const REQUIRED = 1;
+
+ /**
+ * Providing an argument is optional (e.g. 'app:foo' and 'app:foo bar' are both allowed). This is the default behavior of arguments.
+ */
public const OPTIONAL = 2;
+
+ /**
+ * The argument accepts multiple values and turn them into an array (e.g. 'app:foo bar baz' will result in value ['bar', 'baz']).
+ */
public const IS_ARRAY = 4;
- private string $name;
private int $mode;
- private string|int|bool|array|null|float $default;
- private array|\Closure $suggestedValues;
- private string $description;
+ private string|int|bool|array|float|null $default;
/**
* @param string $name The argument name
- * @param int|null $mode The argument mode: a bit mask of self::REQUIRED, self::OPTIONAL and self::IS_ARRAY
+ * @param int-mask-of|null $mode The argument mode: a bit mask of self::REQUIRED, self::OPTIONAL and self::IS_ARRAY
* @param string $description A description text
* @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only)
* @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion
*
* @throws InvalidArgumentException When argument mode is not valid
*/
- public function __construct(string $name, ?int $mode = null, string $description = '', string|bool|int|float|array|null $default = null, \Closure|array $suggestedValues = [])
- {
+ public function __construct(
+ private string $name,
+ ?int $mode = null,
+ private string $description = '',
+ string|bool|int|float|array|null $default = null,
+ private \Closure|array $suggestedValues = [],
+ ) {
if (null === $mode) {
$mode = self::OPTIONAL;
- } elseif ($mode > 7 || $mode < 1) {
+ } elseif ($mode >= (self::IS_ARRAY << 1) || $mode < 1) {
throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode));
}
- $this->name = $name;
$this->mode = $mode;
- $this->description = $description;
- $this->suggestedValues = $suggestedValues;
$this->setDefault($default);
}
@@ -90,16 +100,9 @@ class InputArgument
/**
* Sets the default value.
- *
- * @return void
- *
- * @throws LogicException When incorrect default value is given
*/
- public function setDefault(string|bool|int|float|array|null $default = null)
+ public function setDefault(string|bool|int|float|array|null $default): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
if ($this->isRequired() && null !== $default) {
throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
}
@@ -123,13 +126,16 @@ class InputArgument
return $this->default;
}
+ /**
+ * Returns true if the argument has values for input completion.
+ */
public function hasCompletion(): bool
{
return [] !== $this->suggestedValues;
}
/**
- * Adds suggestions to $suggestions for the current completion input.
+ * Supplies suggestions when command resolves possible completion options for input.
*
* @see Command::complete()
*/
diff --git a/vendor/symfony/console/Input/InputAwareInterface.php b/vendor/symfony/console/Input/InputAwareInterface.php
index 0ad27b45..ba4664cd 100755
--- a/vendor/symfony/console/Input/InputAwareInterface.php
+++ b/vendor/symfony/console/Input/InputAwareInterface.php
@@ -21,8 +21,6 @@ interface InputAwareInterface
{
/**
* Sets the Console Input.
- *
- * @return void
*/
- public function setInput(InputInterface $input);
+ public function setInput(InputInterface $input): void;
}
diff --git a/vendor/symfony/console/Input/InputDefinition.php b/vendor/symfony/console/Input/InputDefinition.php
index b7162d77..f27e2974 100755
--- a/vendor/symfony/console/Input/InputDefinition.php
+++ b/vendor/symfony/console/Input/InputDefinition.php
@@ -46,10 +46,8 @@ class InputDefinition
/**
* Sets the definition of the input.
- *
- * @return void
*/
- public function setDefinition(array $definition)
+ public function setDefinition(array $definition): void
{
$arguments = [];
$options = [];
@@ -69,10 +67,8 @@ class InputDefinition
* Sets the InputArgument objects.
*
* @param InputArgument[] $arguments An array of InputArgument objects
- *
- * @return void
*/
- public function setArguments(array $arguments = [])
+ public function setArguments(array $arguments = []): void
{
$this->arguments = [];
$this->requiredCount = 0;
@@ -85,10 +81,8 @@ class InputDefinition
* Adds an array of InputArgument objects.
*
* @param InputArgument[] $arguments An array of InputArgument objects
- *
- * @return void
*/
- public function addArguments(?array $arguments = [])
+ public function addArguments(?array $arguments = []): void
{
if (null !== $arguments) {
foreach ($arguments as $argument) {
@@ -98,11 +92,9 @@ class InputDefinition
}
/**
- * @return void
- *
* @throws LogicException When incorrect argument is given
*/
- public function addArgument(InputArgument $argument)
+ public function addArgument(InputArgument $argument): void
{
if (isset($this->arguments[$argument->getName()])) {
throw new LogicException(sprintf('An argument with name "%s" already exists.', $argument->getName()));
@@ -198,10 +190,8 @@ class InputDefinition
* Sets the InputOption objects.
*
* @param InputOption[] $options An array of InputOption objects
- *
- * @return void
*/
- public function setOptions(array $options = [])
+ public function setOptions(array $options = []): void
{
$this->options = [];
$this->shortcuts = [];
@@ -213,10 +203,8 @@ class InputDefinition
* Adds an array of InputOption objects.
*
* @param InputOption[] $options An array of InputOption objects
- *
- * @return void
*/
- public function addOptions(array $options = [])
+ public function addOptions(array $options = []): void
{
foreach ($options as $option) {
$this->addOption($option);
@@ -224,11 +212,9 @@ class InputDefinition
}
/**
- * @return void
- *
* @throws LogicException When option given already exist
*/
- public function addOption(InputOption $option)
+ public function addOption(InputOption $option): void
{
if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) {
throw new LogicException(sprintf('An option named "%s" already exists.', $option->getName()));
diff --git a/vendor/symfony/console/Input/InputInterface.php b/vendor/symfony/console/Input/InputInterface.php
index aaed5fd0..c177d960 100755
--- a/vendor/symfony/console/Input/InputInterface.php
+++ b/vendor/symfony/console/Input/InputInterface.php
@@ -18,9 +18,6 @@ use Symfony\Component\Console\Exception\RuntimeException;
* InputInterface is the interface implemented by all input classes.
*
* @author Fabien Potencier
- *
- * @method string __toString() Returns a stringified representation of the args passed to the command.
- * InputArguments MUST be escaped as well as the InputOption values passed to the command.
*/
interface InputInterface
{
@@ -53,28 +50,22 @@ interface InputInterface
* @param string|array $values The value(s) to look for in the raw parameters (can be an array)
* @param string|bool|int|float|array|null $default The default value to return if no result is found
* @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
- *
- * @return mixed
*/
- public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false);
+ public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed;
/**
* Binds the current Input instance with the given arguments and options.
*
- * @return void
- *
* @throws RuntimeException
*/
- public function bind(InputDefinition $definition);
+ public function bind(InputDefinition $definition): void;
/**
* Validates the input.
*
- * @return void
- *
* @throws RuntimeException When not enough arguments are given
*/
- public function validate();
+ public function validate(): void;
/**
* Returns all the given arguments merged with the default values.
@@ -86,20 +77,16 @@ interface InputInterface
/**
* Returns the argument value for a given argument name.
*
- * @return mixed
- *
* @throws InvalidArgumentException When argument given doesn't exist
*/
- public function getArgument(string $name);
+ public function getArgument(string $name): mixed;
/**
* Sets an argument value by name.
*
- * @return void
- *
* @throws InvalidArgumentException When argument given doesn't exist
*/
- public function setArgument(string $name, mixed $value);
+ public function setArgument(string $name, mixed $value): void;
/**
* Returns true if an InputArgument object exists by name or position.
@@ -116,20 +103,16 @@ interface InputInterface
/**
* Returns the option value for a given option name.
*
- * @return mixed
- *
* @throws InvalidArgumentException When option given doesn't exist
*/
- public function getOption(string $name);
+ public function getOption(string $name): mixed;
/**
* Sets an option value by name.
*
- * @return void
- *
* @throws InvalidArgumentException When option given doesn't exist
*/
- public function setOption(string $name, mixed $value);
+ public function setOption(string $name, mixed $value): void;
/**
* Returns true if an InputOption object exists by name.
@@ -143,8 +126,13 @@ interface InputInterface
/**
* Sets the input interactivity.
- *
- * @return void
*/
- public function setInteractive(bool $interactive);
+ public function setInteractive(bool $interactive): void;
+
+ /**
+ * Returns a stringified representation of the args passed to the command.
+ *
+ * InputArguments MUST be escaped as well as the InputOption values passed to the command.
+ */
+ public function __toString(): string;
}
diff --git a/vendor/symfony/console/Input/InputOption.php b/vendor/symfony/console/Input/InputOption.php
index bb533801..617c348d 100755
--- a/vendor/symfony/console/Input/InputOption.php
+++ b/vendor/symfony/console/Input/InputOption.php
@@ -46,32 +46,36 @@ class InputOption
public const VALUE_IS_ARRAY = 8;
/**
- * The option may have either positive or negative value (e.g. --ansi or --no-ansi).
+ * The option allows passing a negated variant (e.g. --ansi or --no-ansi).
*/
public const VALUE_NEGATABLE = 16;
private string $name;
- private string|array|null $shortcut;
+ private ?string $shortcut;
private int $mode;
- private string|int|bool|array|null|float $default;
- private array|\Closure $suggestedValues;
- private string $description;
+ private string|int|bool|array|float|null $default;
/**
* @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
- * @param int|null $mode The option mode: One of the VALUE_* constants
+ * @param int-mask-of|null $mode The option mode: One of the VALUE_* constants
* @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE)
* @param array|\Closure(CompletionInput,CompletionSuggestions):list $suggestedValues The values used for input completion
*
* @throws InvalidArgumentException If option mode is invalid or incompatible
*/
- public function __construct(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', string|bool|int|float|array|null $default = null, array|\Closure $suggestedValues = [])
- {
+ public function __construct(
+ string $name,
+ string|array|null $shortcut = null,
+ ?int $mode = null,
+ private string $description = '',
+ string|bool|int|float|array|null $default = null,
+ private array|\Closure $suggestedValues = [],
+ ) {
if (str_starts_with($name, '--')) {
$name = substr($name, 2);
}
- if (empty($name)) {
+ if (!$name) {
throw new InvalidArgumentException('An option name cannot be empty.');
}
@@ -101,8 +105,6 @@ class InputOption
$this->name = $name;
$this->shortcut = $shortcut;
$this->mode = $mode;
- $this->description = $description;
- $this->suggestedValues = $suggestedValues;
if ($suggestedValues && !$this->acceptValue()) {
throw new LogicException('Cannot set suggested values if the option does not accept a value.');
@@ -173,19 +175,21 @@ class InputOption
return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode);
}
+ /**
+ * Returns true if the option allows passing a negated variant.
+ *
+ * @return bool true if mode is self::VALUE_NEGATABLE, false otherwise
+ */
public function isNegatable(): bool
{
return self::VALUE_NEGATABLE === (self::VALUE_NEGATABLE & $this->mode);
}
/**
- * @return void
+ * Sets the default value.
*/
- public function setDefault(string|bool|int|float|array|null $default = null)
+ public function setDefault(string|bool|int|float|array|null $default): void
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) {
throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.');
}
@@ -217,13 +221,16 @@ class InputOption
return $this->description;
}
+ /**
+ * Returns true if the option has values for input completion.
+ */
public function hasCompletion(): bool
{
return [] !== $this->suggestedValues;
}
/**
- * Adds suggestions to $suggestions for the current completion input.
+ * Supplies suggestions when command resolves possible completion options for input.
*
* @see Command::complete()
*/
diff --git a/vendor/symfony/console/Input/StreamableInputInterface.php b/vendor/symfony/console/Input/StreamableInputInterface.php
index 4b95fcb1..4a0dc017 100755
--- a/vendor/symfony/console/Input/StreamableInputInterface.php
+++ b/vendor/symfony/console/Input/StreamableInputInterface.php
@@ -25,10 +25,8 @@ interface StreamableInputInterface extends InputInterface
* This is mainly useful for testing purpose.
*
* @param resource $stream The input stream
- *
- * @return void
*/
- public function setStream($stream);
+ public function setStream($stream): void;
/**
* Returns the input stream.
diff --git a/vendor/symfony/console/Input/StringInput.php b/vendor/symfony/console/Input/StringInput.php
index 82bd2144..83570014 100755
--- a/vendor/symfony/console/Input/StringInput.php
+++ b/vendor/symfony/console/Input/StringInput.php
@@ -24,10 +24,6 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
*/
class StringInput extends ArgvInput
{
- /**
- * @deprecated since Symfony 6.1
- */
- public const REGEX_STRING = '([^\s]+?)(?:\s|(?
+ *
* @throws InvalidArgumentException When unable to parse input (should never happen)
*/
private function tokenize(string $input): array
diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php
index fddef50c..ad6e49ce 100755
--- a/vendor/symfony/console/Logger/ConsoleLogger.php
+++ b/vendor/symfony/console/Logger/ConsoleLogger.php
@@ -29,7 +29,6 @@ class ConsoleLogger extends AbstractLogger
public const INFO = 'info';
public const ERROR = 'error';
- private OutputInterface $output;
private array $verbosityLevelMap = [
LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL,
LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL,
@@ -52,9 +51,11 @@ class ConsoleLogger extends AbstractLogger
];
private bool $errored = false;
- public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = [])
- {
- $this->output = $output;
+ public function __construct(
+ private OutputInterface $output,
+ array $verbosityLevelMap = [],
+ array $formatLevelMap = [],
+ ) {
$this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap;
$this->formatLevelMap = $formatLevelMap + $this->formatLevelMap;
}
diff --git a/vendor/symfony/console/Messenger/RunCommandMessageHandler.php b/vendor/symfony/console/Messenger/RunCommandMessageHandler.php
index 14f9c176..1bc49949 100755
--- a/vendor/symfony/console/Messenger/RunCommandMessageHandler.php
+++ b/vendor/symfony/console/Messenger/RunCommandMessageHandler.php
@@ -22,8 +22,9 @@ use Symfony\Component\Console\Output\BufferedOutput;
*/
final class RunCommandMessageHandler
{
- public function __construct(private readonly Application $application)
- {
+ public function __construct(
+ private readonly Application $application,
+ ) {
}
public function __invoke(RunCommandMessage $message): RunCommandContext
diff --git a/vendor/symfony/console/Output/AnsiColorMode.php b/vendor/symfony/console/Output/AnsiColorMode.php
index 5f9f744f..ca40ffb7 100755
--- a/vendor/symfony/console/Output/AnsiColorMode.php
+++ b/vendor/symfony/console/Output/AnsiColorMode.php
@@ -63,7 +63,7 @@ enum AnsiColorMode
return match ($this) {
self::Ansi4 => (string) $this->convertFromRGB($r, $g, $b),
self::Ansi8 => '8;5;'.((string) $this->convertFromRGB($r, $g, $b)),
- self::Ansi24 => sprintf('8;2;%d;%d;%d', $r, $g, $b)
+ self::Ansi24 => sprintf('8;2;%d;%d;%d', $r, $g, $b),
};
}
@@ -72,7 +72,7 @@ enum AnsiColorMode
return match ($this) {
self::Ansi4 => $this->degradeHexColorToAnsi4($r, $g, $b),
self::Ansi8 => $this->degradeHexColorToAnsi8($r, $g, $b),
- default => throw new InvalidArgumentException("RGB cannot be converted to {$this->name}.")
+ default => throw new InvalidArgumentException("RGB cannot be converted to {$this->name}."),
};
}
diff --git a/vendor/symfony/console/Output/BufferedOutput.php b/vendor/symfony/console/Output/BufferedOutput.php
index ef5099bf..3c8d3906 100755
--- a/vendor/symfony/console/Output/BufferedOutput.php
+++ b/vendor/symfony/console/Output/BufferedOutput.php
@@ -29,10 +29,7 @@ class BufferedOutput extends Output
return $content;
}
- /**
- * @return void
- */
- protected function doWrite(string $message, bool $newline)
+ protected function doWrite(string $message, bool $newline): void
{
$this->buffer .= $message;
diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php
index 5837e74a..2ad3dbcf 100755
--- a/vendor/symfony/console/Output/ConsoleOutput.php
+++ b/vendor/symfony/console/Output/ConsoleOutput.php
@@ -64,28 +64,19 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter());
}
- /**
- * @return void
- */
- public function setDecorated(bool $decorated)
+ public function setDecorated(bool $decorated): void
{
parent::setDecorated($decorated);
$this->stderr->setDecorated($decorated);
}
- /**
- * @return void
- */
- public function setFormatter(OutputFormatterInterface $formatter)
+ public function setFormatter(OutputFormatterInterface $formatter): void
{
parent::setFormatter($formatter);
$this->stderr->setFormatter($formatter);
}
- /**
- * @return void
- */
- public function setVerbosity(int $level)
+ public function setVerbosity(int $level): void
{
parent::setVerbosity($level);
$this->stderr->setVerbosity($level);
@@ -96,10 +87,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
return $this->stderr;
}
- /**
- * @return void
- */
- public function setErrorOutput(OutputInterface $error)
+ public function setErrorOutput(OutputInterface $error): void
{
$this->stderr = $error;
}
diff --git a/vendor/symfony/console/Output/ConsoleOutputInterface.php b/vendor/symfony/console/Output/ConsoleOutputInterface.php
index 9c0049c8..1f8f147c 100755
--- a/vendor/symfony/console/Output/ConsoleOutputInterface.php
+++ b/vendor/symfony/console/Output/ConsoleOutputInterface.php
@@ -24,10 +24,7 @@ interface ConsoleOutputInterface extends OutputInterface
*/
public function getErrorOutput(): OutputInterface;
- /**
- * @return void
- */
- public function setErrorOutput(OutputInterface $error);
+ public function setErrorOutput(OutputInterface $error): void;
public function section(): ConsoleSectionOutput;
}
diff --git a/vendor/symfony/console/Output/ConsoleSectionOutput.php b/vendor/symfony/console/Output/ConsoleSectionOutput.php
index f2d7933b..09aa7fe9 100755
--- a/vendor/symfony/console/Output/ConsoleSectionOutput.php
+++ b/vendor/symfony/console/Output/ConsoleSectionOutput.php
@@ -60,12 +60,10 @@ class ConsoleSectionOutput extends StreamOutput
* Clears previous output for this section.
*
* @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
- *
- * @return void
*/
- public function clear(?int $lines = null)
+ public function clear(?int $lines = null): void
{
- if (empty($this->content) || !$this->isDecorated()) {
+ if (!$this->content || !$this->isDecorated()) {
return;
}
@@ -83,10 +81,8 @@ class ConsoleSectionOutput extends StreamOutput
/**
* Overwrites the previous output with a new message.
- *
- * @return void
*/
- public function overwrite(string|iterable $message)
+ public function overwrite(string|iterable $message): void
{
$this->clear();
$this->writeln($message);
@@ -162,10 +158,7 @@ class ConsoleSectionOutput extends StreamOutput
++$this->lines;
}
- /**
- * @return void
- */
- protected function doWrite(string $message, bool $newline)
+ protected function doWrite(string $message, bool $newline): void
{
// Simulate newline behavior for consistent output formatting, avoiding extra logic
if (!$newline && str_ends_with($message, \PHP_EOL)) {
diff --git a/vendor/symfony/console/Output/NullOutput.php b/vendor/symfony/console/Output/NullOutput.php
index f3aa15b1..40ae3328 100755
--- a/vendor/symfony/console/Output/NullOutput.php
+++ b/vendor/symfony/console/Output/NullOutput.php
@@ -26,10 +26,7 @@ class NullOutput implements OutputInterface
{
private NullOutputFormatter $formatter;
- /**
- * @return void
- */
- public function setFormatter(OutputFormatterInterface $formatter)
+ public function setFormatter(OutputFormatterInterface $formatter): void
{
// do nothing
}
@@ -40,10 +37,7 @@ class NullOutput implements OutputInterface
return $this->formatter ??= new NullOutputFormatter();
}
- /**
- * @return void
- */
- public function setDecorated(bool $decorated)
+ public function setDecorated(bool $decorated): void
{
// do nothing
}
@@ -53,10 +47,7 @@ class NullOutput implements OutputInterface
return false;
}
- /**
- * @return void
- */
- public function setVerbosity(int $level)
+ public function setVerbosity(int $level): void
{
// do nothing
}
@@ -86,18 +77,12 @@ class NullOutput implements OutputInterface
return false;
}
- /**
- * @return void
- */
- public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL)
+ public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL): void
{
// do nothing
}
- /**
- * @return void
- */
- public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL)
+ public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL): void
{
// do nothing
}
diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php
index 00f481e0..2bb10574 100755
--- a/vendor/symfony/console/Output/Output.php
+++ b/vendor/symfony/console/Output/Output.php
@@ -44,10 +44,7 @@ abstract class Output implements OutputInterface
$this->formatter->setDecorated($decorated);
}
- /**
- * @return void
- */
- public function setFormatter(OutputFormatterInterface $formatter)
+ public function setFormatter(OutputFormatterInterface $formatter): void
{
$this->formatter = $formatter;
}
@@ -57,10 +54,7 @@ abstract class Output implements OutputInterface
return $this->formatter;
}
- /**
- * @return void
- */
- public function setDecorated(bool $decorated)
+ public function setDecorated(bool $decorated): void
{
$this->formatter->setDecorated($decorated);
}
@@ -70,10 +64,7 @@ abstract class Output implements OutputInterface
return $this->formatter->isDecorated();
}
- /**
- * @return void
- */
- public function setVerbosity(int $level)
+ public function setVerbosity(int $level): void
{
$this->verbosity = $level;
}
@@ -103,18 +94,12 @@ abstract class Output implements OutputInterface
return self::VERBOSITY_DEBUG <= $this->verbosity;
}
- /**
- * @return void
- */
- public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL)
+ public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL): void
{
$this->write($messages, true, $options);
}
- /**
- * @return void
- */
- public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL)
+ public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL): void
{
if (!is_iterable($messages)) {
$messages = [$messages];
@@ -148,8 +133,6 @@ abstract class Output implements OutputInterface
/**
* Writes a message to the output.
- *
- * @return void
*/
- abstract protected function doWrite(string $message, bool $newline);
+ abstract protected function doWrite(string $message, bool $newline): void;
}
diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php
index 19a81790..41315fbf 100755
--- a/vendor/symfony/console/Output/OutputInterface.php
+++ b/vendor/symfony/console/Output/OutputInterface.php
@@ -36,29 +36,23 @@ interface OutputInterface
* @param bool $newline Whether to add a newline
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants),
* 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
- *
- * @return void
*/
- public function write(string|iterable $messages, bool $newline = false, int $options = 0);
+ public function write(string|iterable $messages, bool $newline = false, int $options = 0): void;
/**
* Writes a message to the output and adds a newline at the end.
*
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants),
* 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
- *
- * @return void
*/
- public function writeln(string|iterable $messages, int $options = 0);
+ public function writeln(string|iterable $messages, int $options = 0): void;
/**
* Sets the verbosity of the output.
*
* @param self::VERBOSITY_* $level
- *
- * @return void
*/
- public function setVerbosity(int $level);
+ public function setVerbosity(int $level): void;
/**
* Gets the current verbosity of the output.
@@ -89,20 +83,15 @@ interface OutputInterface
/**
* Sets the decorated flag.
- *
- * @return void
*/
- public function setDecorated(bool $decorated);
+ public function setDecorated(bool $decorated): void;
/**
* Gets the decorated flag.
*/
public function isDecorated(): bool;
- /**
- * @return void
- */
- public function setFormatter(OutputFormatterInterface $formatter);
+ public function setFormatter(OutputFormatterInterface $formatter): void;
/**
* Returns current output formatter instance.
diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php
index 218bc9ef..b46f4d2c 100755
--- a/vendor/symfony/console/Output/StreamOutput.php
+++ b/vendor/symfony/console/Output/StreamOutput.php
@@ -63,10 +63,7 @@ class StreamOutput extends Output
return $this->stream;
}
- /**
- * @return void
- */
- protected function doWrite(string $message, bool $newline)
+ protected function doWrite(string $message, bool $newline): void
{
if ($newline) {
$message .= \PHP_EOL;
@@ -93,7 +90,7 @@ class StreamOutput extends Output
protected function hasColorSupport(): bool
{
// Follow https://no-color.org/
- if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) {
+ if ('' !== ($_SERVER['NO_COLOR'] ?? getenv('NO_COLOR') ?: '')) {
return false;
}
diff --git a/vendor/symfony/console/Output/TrimmedBufferOutput.php b/vendor/symfony/console/Output/TrimmedBufferOutput.php
index 23a2be8c..c1862a2b 100755
--- a/vendor/symfony/console/Output/TrimmedBufferOutput.php
+++ b/vendor/symfony/console/Output/TrimmedBufferOutput.php
@@ -45,10 +45,7 @@ class TrimmedBufferOutput extends Output
return $content;
}
- /**
- * @return void
- */
- protected function doWrite(string $message, bool $newline)
+ protected function doWrite(string $message, bool $newline): void
{
$this->buffer .= $message;
diff --git a/vendor/symfony/console/Question/ChoiceQuestion.php b/vendor/symfony/console/Question/ChoiceQuestion.php
index e449ff68..0ccad051 100755
--- a/vendor/symfony/console/Question/ChoiceQuestion.php
+++ b/vendor/symfony/console/Question/ChoiceQuestion.php
@@ -20,7 +20,6 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
*/
class ChoiceQuestion extends Question
{
- private array $choices;
private bool $multiselect = false;
private string $prompt = ' > ';
private string $errorMessage = 'Value "%s" is invalid';
@@ -30,15 +29,17 @@ class ChoiceQuestion extends Question
* @param array $choices The list of available choices
* @param mixed $default The default answer to return
*/
- public function __construct(string $question, array $choices, mixed $default = null)
- {
+ public function __construct(
+ string $question,
+ private array $choices,
+ mixed $default = null,
+ ) {
if (!$choices) {
throw new \LogicException('Choice question must have at least 1 choice available.');
}
parent::__construct($question, $default);
- $this->choices = $choices;
$this->setValidator($this->getDefaultValidator());
$this->setAutocompleterValues($choices);
}
diff --git a/vendor/symfony/console/Question/ConfirmationQuestion.php b/vendor/symfony/console/Question/ConfirmationQuestion.php
index 40eab242..951d6814 100755
--- a/vendor/symfony/console/Question/ConfirmationQuestion.php
+++ b/vendor/symfony/console/Question/ConfirmationQuestion.php
@@ -18,18 +18,18 @@ namespace Symfony\Component\Console\Question;
*/
class ConfirmationQuestion extends Question
{
- private string $trueAnswerRegex;
-
/**
* @param string $question The question to ask to the user
* @param bool $default The default answer to return, true or false
* @param string $trueAnswerRegex A regex to match the "yes" answer
*/
- public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i')
- {
+ public function __construct(
+ string $question,
+ bool $default = true,
+ private string $trueAnswerRegex = '/^y/i',
+ ) {
parent::__construct($question, $default);
- $this->trueAnswerRegex = $trueAnswerRegex;
$this->setNormalizer($this->getDefaultNormalizer());
}
diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php
index 94c688fa..46a60c79 100755
--- a/vendor/symfony/console/Question/Question.php
+++ b/vendor/symfony/console/Question/Question.php
@@ -21,13 +21,11 @@ use Symfony\Component\Console\Exception\LogicException;
*/
class Question
{
- private string $question;
private ?int $attempts = null;
private bool $hidden = false;
private bool $hiddenFallback = true;
private ?\Closure $autocompleterCallback = null;
private ?\Closure $validator = null;
- private string|int|bool|null|float $default;
private ?\Closure $normalizer = null;
private bool $trimmable = true;
private bool $multiline = false;
@@ -36,10 +34,10 @@ class Question
* @param string $question The question to ask to the user
* @param string|bool|int|float|null $default The default answer to return if the user enters nothing
*/
- public function __construct(string $question, string|bool|int|float|null $default = null)
- {
- $this->question = $question;
- $this->default = $default;
+ public function __construct(
+ private string $question,
+ private string|bool|int|float|null $default = null,
+ ) {
}
/**
@@ -175,11 +173,8 @@ class Question
*
* @return $this
*/
- public function setAutocompleterCallback(?callable $callback = null): static
+ public function setAutocompleterCallback(?callable $callback): static
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
if ($this->hidden && null !== $callback) {
throw new LogicException('A hidden question cannot use the autocompleter.');
}
@@ -194,11 +189,8 @@ class Question
*
* @return $this
*/
- public function setValidator(?callable $validator = null): static
+ public function setValidator(?callable $validator): static
{
- if (1 > \func_num_args()) {
- trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
- }
$this->validator = null === $validator ? null : $validator(...);
return $this;
@@ -266,10 +258,7 @@ class Question
return $this->normalizer;
}
- /**
- * @return bool
- */
- protected function isAssoc(array $array)
+ protected function isAssoc(array $array): bool
{
return (bool) \count(array_filter(array_keys($array), 'is_string'));
}
diff --git a/vendor/symfony/console/README.md b/vendor/symfony/console/README.md
index e9013182..92f70e71 100755
--- a/vendor/symfony/console/README.md
+++ b/vendor/symfony/console/README.md
@@ -7,14 +7,7 @@ interfaces.
Sponsor
-------
-The Console component for Symfony 6.4 is [backed][1] by [Les-Tilleuls.coop][2].
-
-Les-Tilleuls.coop is a team of 70+ Symfony experts who can help you design, develop and
-fix your projects. They provide a wide range of professional services including development,
-consulting, coaching, training and audits. They also are highly skilled in JS, Go and DevOps.
-They are a worker cooperative!
-
-Help Symfony by [sponsoring][3] its development!
+Help Symfony by [sponsoring][1] its development!
Resources
---------
@@ -31,6 +24,4 @@ Credits
`Resources/bin/hiddeninput.exe` is a third party binary provided within this
component. Find sources and license at https://github.com/Seldaek/hidden-input.
-[1]: https://symfony.com/backers
-[2]: https://les-tilleuls.coop
-[3]: https://symfony.com/sponsor
+[1]: https://symfony.com/sponsor
diff --git a/vendor/symfony/console/Resources/completion.fish b/vendor/symfony/console/Resources/completion.fish
index 1c34292a..1853dd80 100755
--- a/vendor/symfony/console/Resources/completion.fish
+++ b/vendor/symfony/console/Resources/completion.fish
@@ -19,11 +19,7 @@ function _sf_{{ COMMAND_NAME }}
set completecmd $completecmd "-c$c"
- set sfcomplete ($completecmd)
-
- for i in $sfcomplete
- echo $i
- end
+ $completecmd
end
complete -c '{{ COMMAND_NAME }}' -a '(_sf_{{ COMMAND_NAME }})' -f
diff --git a/vendor/symfony/console/Style/OutputStyle.php b/vendor/symfony/console/Style/OutputStyle.php
index ddfa8dec..9f62ea31 100755
--- a/vendor/symfony/console/Style/OutputStyle.php
+++ b/vendor/symfony/console/Style/OutputStyle.php
@@ -23,17 +23,12 @@ use Symfony\Component\Console\Output\OutputInterface;
*/
abstract class OutputStyle implements OutputInterface, StyleInterface
{
- private OutputInterface $output;
-
- public function __construct(OutputInterface $output)
- {
- $this->output = $output;
+ public function __construct(
+ private OutputInterface $output,
+ ) {
}
- /**
- * @return void
- */
- public function newLine(int $count = 1)
+ public function newLine(int $count = 1): void
{
$this->output->write(str_repeat(\PHP_EOL, $count));
}
@@ -43,26 +38,17 @@ abstract class OutputStyle implements OutputInterface, StyleInterface
return new ProgressBar($this->output, $max);
}
- /**
- * @return void
- */
- public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL)
+ public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL): void
{
$this->output->write($messages, $newline, $type);
}
- /**
- * @return void
- */
- public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL)
+ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL): void
{
$this->output->writeln($messages, $type);
}
- /**
- * @return void
- */
- public function setVerbosity(int $level)
+ public function setVerbosity(int $level): void
{
$this->output->setVerbosity($level);
}
@@ -72,10 +58,7 @@ abstract class OutputStyle implements OutputInterface, StyleInterface
return $this->output->getVerbosity();
}
- /**
- * @return void
- */
- public function setDecorated(bool $decorated)
+ public function setDecorated(bool $decorated): void
{
$this->output->setDecorated($decorated);
}
@@ -85,10 +68,7 @@ abstract class OutputStyle implements OutputInterface, StyleInterface
return $this->output->isDecorated();
}
- /**
- * @return void
- */
- public function setFormatter(OutputFormatterInterface $formatter)
+ public function setFormatter(OutputFormatterInterface $formatter): void
{
$this->output->setFormatter($formatter);
}
@@ -118,10 +98,7 @@ abstract class OutputStyle implements OutputInterface, StyleInterface
return $this->output->isDebug();
}
- /**
- * @return OutputInterface
- */
- protected function getErrorOutput()
+ protected function getErrorOutput(): OutputInterface
{
if (!$this->output instanceof ConsoleOutputInterface) {
return $this->output;
diff --git a/vendor/symfony/console/Style/StyleInterface.php b/vendor/symfony/console/Style/StyleInterface.php
index 6bced158..fcc5bc77 100755
--- a/vendor/symfony/console/Style/StyleInterface.php
+++ b/vendor/symfony/console/Style/StyleInterface.php
@@ -20,73 +20,53 @@ interface StyleInterface
{
/**
* Formats a command title.
- *
- * @return void
*/
- public function title(string $message);
+ public function title(string $message): void;
/**
* Formats a section title.
- *
- * @return void
*/
- public function section(string $message);
+ public function section(string $message): void;
/**
* Formats a list.
- *
- * @return void
*/
- public function listing(array $elements);
+ public function listing(array $elements): void;
/**
* Formats informational text.
- *
- * @return void
*/
- public function text(string|array $message);
+ public function text(string|array $message): void;
/**
* Formats a success result bar.
- *
- * @return void
*/
- public function success(string|array $message);
+ public function success(string|array $message): void;
/**
* Formats an error result bar.
- *
- * @return void
*/
- public function error(string|array $message);
+ public function error(string|array $message): void;
/**
* Formats an warning result bar.
- *
- * @return void
*/
- public function warning(string|array $message);
+ public function warning(string|array $message): void;
/**
* Formats a note admonition.
- *
- * @return void
*/
- public function note(string|array $message);
+ public function note(string|array $message): void;
/**
* Formats a caution admonition.
- *
- * @return void
*/
- public function caution(string|array $message);
+ public function caution(string|array $message): void;
/**
* Formats a table.
- *
- * @return void
*/
- public function table(array $headers, array $rows);
+ public function table(array $headers, array $rows): void;
/**
* Asks a question.
@@ -110,29 +90,21 @@ interface StyleInterface
/**
* Add newline(s).
- *
- * @return void
*/
- public function newLine(int $count = 1);
+ public function newLine(int $count = 1): void;
/**
* Starts the progress output.
- *
- * @return void
*/
- public function progressStart(int $max = 0);
+ public function progressStart(int $max = 0): void;
/**
* Advances the progress output X steps.
- *
- * @return void
*/
- public function progressAdvance(int $step = 1);
+ public function progressAdvance(int $step = 1): void;
/**
* Finishes the progress output.
- *
- * @return void
*/
- public function progressFinish();
+ public function progressFinish(): void;
}
diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php
index 03bda878..19ad892e 100755
--- a/vendor/symfony/console/Style/SymfonyStyle.php
+++ b/vendor/symfony/console/Style/SymfonyStyle.php
@@ -40,30 +40,27 @@ class SymfonyStyle extends OutputStyle
{
public const MAX_LINE_LENGTH = 120;
- private InputInterface $input;
- private OutputInterface $output;
private SymfonyQuestionHelper $questionHelper;
private ProgressBar $progressBar;
private int $lineLength;
private TrimmedBufferOutput $bufferedOutput;
- public function __construct(InputInterface $input, OutputInterface $output)
- {
- $this->input = $input;
+ public function __construct(
+ private InputInterface $input,
+ private OutputInterface $output,
+ ) {
$this->bufferedOutput = new TrimmedBufferOutput(\DIRECTORY_SEPARATOR === '\\' ? 4 : 2, $output->getVerbosity(), false, clone $output->getFormatter());
// Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
$width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
$this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
- parent::__construct($this->output = $output);
+ parent::__construct($output);
}
/**
* Formats a message as a block of text.
- *
- * @return void
*/
- public function block(string|array $messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true)
+ public function block(string|array $messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true): void
{
$messages = \is_array($messages) ? array_values($messages) : [$messages];
@@ -72,10 +69,7 @@ class SymfonyStyle extends OutputStyle
$this->newLine();
}
- /**
- * @return void
- */
- public function title(string $message)
+ public function title(string $message): void
{
$this->autoPrependBlock();
$this->writeln([
@@ -85,10 +79,7 @@ class SymfonyStyle extends OutputStyle
$this->newLine();
}
- /**
- * @return void
- */
- public function section(string $message)
+ public function section(string $message): void
{
$this->autoPrependBlock();
$this->writeln([
@@ -98,10 +89,7 @@ class SymfonyStyle extends OutputStyle
$this->newLine();
}
- /**
- * @return void
- */
- public function listing(array $elements)
+ public function listing(array $elements): void
{
$this->autoPrependText();
$elements = array_map(fn ($element) => sprintf(' * %s', $element), $elements);
@@ -110,10 +98,7 @@ class SymfonyStyle extends OutputStyle
$this->newLine();
}
- /**
- * @return void
- */
- public function text(string|array $message)
+ public function text(string|array $message): void
{
$this->autoPrependText();
@@ -125,68 +110,46 @@ class SymfonyStyle extends OutputStyle
/**
* Formats a command comment.
- *
- * @return void
*/
- public function comment(string|array $message)
+ public function comment(string|array $message): void
{
$this->block($message, null, null, ' // >', false, false);
}
- /**
- * @return void
- */
- public function success(string|array $message)
+ public function success(string|array $message): void
{
$this->block($message, 'OK', 'fg=black;bg=green', ' ', true);
}
- /**
- * @return void
- */
- public function error(string|array $message)
+ public function error(string|array $message): void
{
$this->block($message, 'ERROR', 'fg=white;bg=red', ' ', true);
}
- /**
- * @return void
- */
- public function warning(string|array $message)
+ public function warning(string|array $message): void
{
$this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', true);
}
- /**
- * @return void
- */
- public function note(string|array $message)
+ public function note(string|array $message): void
{
$this->block($message, 'NOTE', 'fg=yellow', ' ! ');
}
/**
* Formats an info message.
- *
- * @return void
*/
- public function info(string|array $message)
+ public function info(string|array $message): void
{
$this->block($message, 'INFO', 'fg=green', ' ', true);
}
- /**
- * @return void
- */
- public function caution(string|array $message)
+ public function caution(string|array $message): void
{
$this->block($message, 'CAUTION', 'fg=white;bg=red', ' ! ', true);
}
- /**
- * @return void
- */
- public function table(array $headers, array $rows)
+ public function table(array $headers, array $rows): void
{
$this->createTable()
->setHeaders($headers)
@@ -199,10 +162,8 @@ class SymfonyStyle extends OutputStyle
/**
* Formats a horizontal table.
- *
- * @return void
*/
- public function horizontalTable(array $headers, array $rows)
+ public function horizontalTable(array $headers, array $rows): void
{
$this->createTable()
->setHorizontal(true)
@@ -221,10 +182,8 @@ class SymfonyStyle extends OutputStyle
* * 'A title'
* * ['key' => 'value']
* * new TableSeparator()
- *
- * @return void
*/
- public function definitionList(string|array|TableSeparator ...$list)
+ public function definitionList(string|array|TableSeparator ...$list): void
{
$headers = [];
$row = [];
@@ -285,27 +244,18 @@ class SymfonyStyle extends OutputStyle
return $this->askQuestion($questionChoice);
}
- /**
- * @return void
- */
- public function progressStart(int $max = 0)
+ public function progressStart(int $max = 0): void
{
$this->progressBar = $this->createProgressBar($max);
$this->progressBar->start();
}
- /**
- * @return void
- */
- public function progressAdvance(int $step = 1)
+ public function progressAdvance(int $step = 1): void
{
$this->getProgressBar()->advance($step);
}
- /**
- * @return void
- */
- public function progressFinish()
+ public function progressFinish(): void
{
$this->getProgressBar()->finish();
$this->newLine(2);
@@ -366,10 +316,7 @@ class SymfonyStyle extends OutputStyle
return $answer;
}
- /**
- * @return void
- */
- public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL)
+ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL): void
{
if (!is_iterable($messages)) {
$messages = [$messages];
@@ -381,10 +328,7 @@ class SymfonyStyle extends OutputStyle
}
}
- /**
- * @return void
- */
- public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL)
+ public function write(string|iterable $messages, bool $newline = false, int $type = self::OUTPUT_NORMAL): void
{
if (!is_iterable($messages)) {
$messages = [$messages];
@@ -396,10 +340,7 @@ class SymfonyStyle extends OutputStyle
}
}
- /**
- * @return void
- */
- public function newLine(int $count = 1)
+ public function newLine(int $count = 1): void
{
parent::newLine($count);
$this->bufferedOutput->write(str_repeat("\n", $count));
diff --git a/vendor/symfony/console/Terminal.php b/vendor/symfony/console/Terminal.php
index 3eda0376..9eb16aa7 100755
--- a/vendor/symfony/console/Terminal.php
+++ b/vendor/symfony/console/Terminal.php
@@ -140,7 +140,7 @@ class Terminal
// or [w, h] from "wxh"
self::$width = (int) $matches[1];
self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2];
- } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) {
+ } elseif (!sapi_windows_vt100_support(fopen('php://stdout', 'w')) && self::hasSttyAvailable()) {
// only use stty on Windows if the terminal does not support vt100 (e.g. Windows 7 + git-bash)
// testing for stty in a Windows 10 vt100-enabled console will implicitly disable vt100 support on STDOUT
self::initDimensionsUsingStty();
@@ -154,14 +154,6 @@ class Terminal
}
}
- /**
- * Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
- */
- private static function hasVt100Support(): bool
- {
- return \function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(fopen('php://stdout', 'w'));
- }
-
/**
* Initializes dimensions using the output of an stty columns line.
*/
diff --git a/vendor/symfony/console/Tester/ApplicationTester.php b/vendor/symfony/console/Tester/ApplicationTester.php
index 58aee54d..cebb6f8e 100755
--- a/vendor/symfony/console/Tester/ApplicationTester.php
+++ b/vendor/symfony/console/Tester/ApplicationTester.php
@@ -28,11 +28,9 @@ class ApplicationTester
{
use TesterTrait;
- private Application $application;
-
- public function __construct(Application $application)
- {
- $this->application = $application;
+ public function __construct(
+ private Application $application,
+ ) {
}
/**
diff --git a/vendor/symfony/console/Tester/CommandCompletionTester.php b/vendor/symfony/console/Tester/CommandCompletionTester.php
index a90fe52e..76cbaf14 100755
--- a/vendor/symfony/console/Tester/CommandCompletionTester.php
+++ b/vendor/symfony/console/Tester/CommandCompletionTester.php
@@ -22,11 +22,9 @@ use Symfony\Component\Console\Completion\CompletionSuggestions;
*/
class CommandCompletionTester
{
- private Command $command;
-
- public function __construct(Command $command)
- {
- $this->command = $command;
+ public function __construct(
+ private Command $command,
+ ) {
}
/**
diff --git a/vendor/symfony/console/Tester/CommandTester.php b/vendor/symfony/console/Tester/CommandTester.php
index 2ff813b7..d39cde7f 100755
--- a/vendor/symfony/console/Tester/CommandTester.php
+++ b/vendor/symfony/console/Tester/CommandTester.php
@@ -24,11 +24,9 @@ class CommandTester
{
use TesterTrait;
- private Command $command;
-
- public function __construct(Command $command)
- {
- $this->command = $command;
+ public function __construct(
+ private Command $command,
+ ) {
}
/**
diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json
index 1610f734..0ed1bd9a 100755
--- a/vendor/symfony/console/composer.json
+++ b/vendor/symfony/console/composer.json
@@ -16,34 +16,33 @@
}
],
"require": {
- "php": ">=8.1",
- "symfony/deprecation-contracts": "^2.5|^3",
+ "php": ">=8.2",
"symfony/polyfill-mbstring": "~1.0",
"symfony/service-contracts": "^2.5|^3",
- "symfony/string": "^5.4|^6.0|^7.0"
+ "symfony/string": "^6.4|^7.0"
},
"require-dev": {
- "symfony/config": "^5.4|^6.0|^7.0",
- "symfony/event-dispatcher": "^5.4|^6.0|^7.0",
- "symfony/dependency-injection": "^5.4|^6.0|^7.0",
+ "symfony/config": "^6.4|^7.0",
+ "symfony/event-dispatcher": "^6.4|^7.0",
"symfony/http-foundation": "^6.4|^7.0",
"symfony/http-kernel": "^6.4|^7.0",
- "symfony/lock": "^5.4|^6.0|^7.0",
- "symfony/messenger": "^5.4|^6.0|^7.0",
- "symfony/process": "^5.4|^6.0|^7.0",
- "symfony/stopwatch": "^5.4|^6.0|^7.0",
- "symfony/var-dumper": "^5.4|^6.0|^7.0",
+ "symfony/dependency-injection": "^6.4|^7.0",
+ "symfony/lock": "^6.4|^7.0",
+ "symfony/messenger": "^6.4|^7.0",
+ "symfony/process": "^6.4|^7.0",
+ "symfony/stopwatch": "^6.4|^7.0",
+ "symfony/var-dumper": "^6.4|^7.0",
"psr/log": "^1|^2|^3"
},
"provide": {
"psr/log-implementation": "1.0|2.0|3.0"
},
"conflict": {
- "symfony/dependency-injection": "<5.4",
- "symfony/dotenv": "<5.4",
- "symfony/event-dispatcher": "<5.4",
- "symfony/lock": "<5.4",
- "symfony/process": "<5.4"
+ "symfony/dependency-injection": "<6.4",
+ "symfony/dotenv": "<6.4",
+ "symfony/event-dispatcher": "<6.4",
+ "symfony/lock": "<6.4",
+ "symfony/process": "<6.4"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Console\\": "" },
diff --git a/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php b/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php
index bb931b82..590ada9e 100755
--- a/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php
+++ b/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php
@@ -19,6 +19,12 @@ namespace Symfony\Component\EventDispatcher\Attribute;
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class AsEventListener
{
+ /**
+ * @param string|null $event The event name to listen to
+ * @param string|null $method The method to run when the listened event is triggered
+ * @param int $priority The priority of this listener if several are declared for the same event
+ * @param string|null $dispatcher The service id of the event dispatcher to listen to
+ */
public function __construct(
public ?string $event = null,
public ?string $method = null,
diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
index 5ba83dad..72ce5265 100755
--- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
+++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
@@ -30,47 +30,33 @@ use Symfony\Contracts\Service\ResetInterface;
*/
class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterface
{
- protected $logger;
- protected $stopwatch;
-
/**
* @var \SplObjectStorage|null
*/
private ?\SplObjectStorage $callStack = null;
- private EventDispatcherInterface $dispatcher;
private array $wrappedListeners = [];
private array $orphanedEvents = [];
- private ?RequestStack $requestStack;
private string $currentRequestHash = '';
- public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, ?LoggerInterface $logger = null, ?RequestStack $requestStack = null)
- {
- $this->dispatcher = $dispatcher;
- $this->stopwatch = $stopwatch;
- $this->logger = $logger;
- $this->requestStack = $requestStack;
+ public function __construct(
+ private EventDispatcherInterface $dispatcher,
+ protected Stopwatch $stopwatch,
+ protected ?LoggerInterface $logger = null,
+ private ?RequestStack $requestStack = null,
+ ) {
}
- /**
- * @return void
- */
- public function addListener(string $eventName, callable|array $listener, int $priority = 0)
+ public function addListener(string $eventName, callable|array $listener, int $priority = 0): void
{
$this->dispatcher->addListener($eventName, $listener, $priority);
}
- /**
- * @return void
- */
- public function addSubscriber(EventSubscriberInterface $subscriber)
+ public function addSubscriber(EventSubscriberInterface $subscriber): void
{
$this->dispatcher->addSubscriber($subscriber);
}
- /**
- * @return void
- */
- public function removeListener(string $eventName, callable|array $listener)
+ public function removeListener(string $eventName, callable|array $listener): void
{
if (isset($this->wrappedListeners[$eventName])) {
foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) {
@@ -85,10 +71,7 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa
$this->dispatcher->removeListener($eventName, $listener);
}
- /**
- * @return void
- */
- public function removeSubscriber(EventSubscriberInterface $subscriber)
+ public function removeSubscriber(EventSubscriberInterface $subscriber): void
{
$this->dispatcher->removeSubscriber($subscriber);
}
@@ -226,10 +209,7 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa
return array_merge(...array_values($this->orphanedEvents));
}
- /**
- * @return void
- */
- public function reset()
+ public function reset(): void
{
$this->callStack = null;
$this->orphanedEvents = [];
@@ -249,19 +229,15 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa
/**
* Called before dispatching the event.
- *
- * @return void
*/
- protected function beforeDispatch(string $eventName, object $event)
+ protected function beforeDispatch(string $eventName, object $event): void
{
}
/**
* Called after dispatching the event.
- *
- * @return void
*/
- protected function afterDispatch(string $eventName, object $event)
+ protected function afterDispatch(string $eventName, object $event): void
{
}
diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
index 59f7c136..b83115bb 100755
--- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
+++ b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
@@ -26,21 +26,20 @@ final class WrappedListener
private string $name;
private bool $called = false;
private bool $stoppedPropagation = false;
- private Stopwatch $stopwatch;
- private ?EventDispatcherInterface $dispatcher;
private string $pretty;
private string $callableRef;
private ClassStub|string $stub;
- private ?int $priority = null;
private static bool $hasClassStub;
- public function __construct(callable|array $listener, ?string $name, Stopwatch $stopwatch, ?EventDispatcherInterface $dispatcher = null, ?int $priority = null)
- {
+ public function __construct(
+ callable|array $listener,
+ ?string $name,
+ private Stopwatch $stopwatch,
+ private ?EventDispatcherInterface $dispatcher = null,
+ private ?int $priority = null,
+ ) {
$this->listener = $listener;
$this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? $listener(...) : null);
- $this->stopwatch = $stopwatch;
- $this->dispatcher = $dispatcher;
- $this->priority = $priority;
if (\is_array($listener)) {
[$this->name, $this->callableRef] = $this->parseListener($listener);
@@ -48,9 +47,9 @@ final class WrappedListener
$this->callableRef .= '::'.$listener[1];
} elseif ($listener instanceof \Closure) {
$r = new \ReflectionFunction($listener);
- if (str_contains($r->name, '{closure')) {
+ if ($r->isAnonymous()) {
$this->pretty = $this->name = 'closure';
- } elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
+ } elseif ($class = $r->getClosureCalledClass()) {
$this->name = $class->name;
$this->pretty = $this->name.'::'.$r->name;
} else {
diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php
index 13b4336a..53089920 100755
--- a/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php
+++ b/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php
@@ -21,11 +21,9 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
*/
class AddEventAliasesPass implements CompilerPassInterface
{
- private array $eventAliases;
-
- public function __construct(array $eventAliases)
- {
- $this->eventAliases = $eventAliases;
+ public function __construct(
+ private array $eventAliases,
+ ) {
}
public function process(ContainerBuilder $container): void
diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
index 866f4e64..29a76bbc 100755
--- a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
+++ b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
@@ -48,10 +48,7 @@ class RegisterListenersPass implements CompilerPassInterface
return $this;
}
- /**
- * @return void
- */
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('event_dispatcher') && !$container->hasAlias('event_dispatcher')) {
return;
diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php
index 60529892..43bc16b8 100755
--- a/vendor/symfony/event-dispatcher/EventDispatcher.php
+++ b/vendor/symfony/event-dispatcher/EventDispatcher.php
@@ -123,19 +123,13 @@ class EventDispatcher implements EventDispatcherInterface
return false;
}
- /**
- * @return void
- */
- public function addListener(string $eventName, callable|array $listener, int $priority = 0)
+ public function addListener(string $eventName, callable|array $listener, int $priority = 0): void
{
$this->listeners[$eventName][$priority][] = $listener;
unset($this->sorted[$eventName], $this->optimized[$eventName]);
}
- /**
- * @return void
- */
- public function removeListener(string $eventName, callable|array $listener)
+ public function removeListener(string $eventName, callable|array $listener): void
{
if (empty($this->listeners[$eventName])) {
return;
@@ -163,10 +157,7 @@ class EventDispatcher implements EventDispatcherInterface
}
}
- /**
- * @return void
- */
- public function addSubscriber(EventSubscriberInterface $subscriber)
+ public function addSubscriber(EventSubscriberInterface $subscriber): void
{
foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
if (\is_string($params)) {
@@ -181,10 +172,7 @@ class EventDispatcher implements EventDispatcherInterface
}
}
- /**
- * @return void
- */
- public function removeSubscriber(EventSubscriberInterface $subscriber)
+ public function removeSubscriber(EventSubscriberInterface $subscriber): void
{
foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
if (\is_array($params) && \is_array($params[0])) {
@@ -206,10 +194,8 @@ class EventDispatcher implements EventDispatcherInterface
* @param callable[] $listeners The event listeners
* @param string $eventName The name of the event to dispatch
* @param object $event The event object to pass to the event handlers/listeners
- *
- * @return void
*/
- protected function callListeners(iterable $listeners, string $eventName, object $event)
+ protected function callListeners(iterable $listeners, string $eventName, object $event): void
{
$stoppable = $event instanceof StoppableEventInterface;
diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php
index e95a7b11..99f8b1a0 100755
--- a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php
+++ b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php
@@ -27,32 +27,23 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface
*
* @param int $priority The higher this value, the earlier an event
* listener will be triggered in the chain (defaults to 0)
- *
- * @return void
*/
- public function addListener(string $eventName, callable $listener, int $priority = 0);
+ public function addListener(string $eventName, callable $listener, int $priority = 0): void;
/**
* Adds an event subscriber.
*
* The subscriber is asked for all the events it is
* interested in and added as a listener for these events.
- *
- * @return void
*/
- public function addSubscriber(EventSubscriberInterface $subscriber);
+ public function addSubscriber(EventSubscriberInterface $subscriber): void;
/**
* Removes an event listener from the specified events.
- *
- * @return void
*/
- public function removeListener(string $eventName, callable $listener);
+ public function removeListener(string $eventName, callable $listener): void;
- /**
- * @return void
- */
- public function removeSubscriber(EventSubscriberInterface $subscriber);
+ public function removeSubscriber(EventSubscriberInterface $subscriber): void;
/**
* Gets the listeners of a specific event or all listeners sorted by descending priority.
diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php
index 0ccbbd81..2ac654fb 100755
--- a/vendor/symfony/event-dispatcher/GenericEvent.php
+++ b/vendor/symfony/event-dispatcher/GenericEvent.php
@@ -25,19 +25,16 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
{
- protected $subject;
- protected $arguments;
-
/**
* Encapsulate an event with $subject and $arguments.
*
* @param mixed $subject The subject of the event, usually an object or a callable
* @param array $arguments Arguments to store in the event
*/
- public function __construct(mixed $subject = null, array $arguments = [])
- {
- $this->subject = $subject;
- $this->arguments = $arguments;
+ public function __construct(
+ protected mixed $subject = null,
+ protected array $arguments = [],
+ ) {
}
/**
diff --git a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php
index 301a805c..a6d078e9 100755
--- a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php
+++ b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php
@@ -18,11 +18,9 @@ namespace Symfony\Component\EventDispatcher;
*/
class ImmutableEventDispatcher implements EventDispatcherInterface
{
- private EventDispatcherInterface $dispatcher;
-
- public function __construct(EventDispatcherInterface $dispatcher)
- {
- $this->dispatcher = $dispatcher;
+ public function __construct(
+ private EventDispatcherInterface $dispatcher,
+ ) {
}
public function dispatch(object $event, ?string $eventName = null): object
@@ -30,34 +28,22 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
return $this->dispatcher->dispatch($event, $eventName);
}
- /**
- * @return never
- */
- public function addListener(string $eventName, callable|array $listener, int $priority = 0)
+ public function addListener(string $eventName, callable|array $listener, int $priority = 0): never
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
- /**
- * @return never
- */
- public function addSubscriber(EventSubscriberInterface $subscriber)
+ public function addSubscriber(EventSubscriberInterface $subscriber): never
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
- /**
- * @return never
- */
- public function removeListener(string $eventName, callable|array $listener)
+ public function removeListener(string $eventName, callable|array $listener): never
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
- /**
- * @return never
- */
- public function removeSubscriber(EventSubscriberInterface $subscriber)
+ public function removeSubscriber(EventSubscriberInterface $subscriber): never
{
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}
diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json
index ff281afd..598bbdc5 100755
--- a/vendor/symfony/event-dispatcher/composer.json
+++ b/vendor/symfony/event-dispatcher/composer.json
@@ -16,21 +16,21 @@
}
],
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/event-dispatcher-contracts": "^2.5|^3"
},
"require-dev": {
- "symfony/dependency-injection": "^5.4|^6.0|^7.0",
- "symfony/expression-language": "^5.4|^6.0|^7.0",
- "symfony/config": "^5.4|^6.0|^7.0",
- "symfony/error-handler": "^5.4|^6.0|^7.0",
- "symfony/http-foundation": "^5.4|^6.0|^7.0",
+ "symfony/dependency-injection": "^6.4|^7.0",
+ "symfony/expression-language": "^6.4|^7.0",
+ "symfony/config": "^6.4|^7.0",
+ "symfony/error-handler": "^6.4|^7.0",
+ "symfony/http-foundation": "^6.4|^7.0",
"symfony/service-contracts": "^2.5|^3",
- "symfony/stopwatch": "^5.4|^6.0|^7.0",
+ "symfony/stopwatch": "^6.4|^7.0",
"psr/log": "^1|^2|^3"
},
"conflict": {
- "symfony/dependency-injection": "<5.4",
+ "symfony/dependency-injection": "<6.4",
"symfony/service-contracts": "<2.5"
},
"provide": {
diff --git a/vendor/symfony/filesystem/CHANGELOG.md b/vendor/symfony/filesystem/CHANGELOG.md
index fcb7170c..80818d1b 100755
--- a/vendor/symfony/filesystem/CHANGELOG.md
+++ b/vendor/symfony/filesystem/CHANGELOG.md
@@ -1,6 +1,16 @@
CHANGELOG
=========
+7.1
+---
+
+ * Add the `Filesystem::readFile()` method
+
+7.0
+---
+
+ * Add argument `$lock` to `Filesystem::appendToFile()`
+
5.4
---
diff --git a/vendor/symfony/filesystem/Exception/IOException.php b/vendor/symfony/filesystem/Exception/IOException.php
index df3a0850..46ab8b4a 100755
--- a/vendor/symfony/filesystem/Exception/IOException.php
+++ b/vendor/symfony/filesystem/Exception/IOException.php
@@ -20,12 +20,12 @@ namespace Symfony\Component\Filesystem\Exception;
*/
class IOException extends \RuntimeException implements IOExceptionInterface
{
- private ?string $path;
-
- public function __construct(string $message, int $code = 0, ?\Throwable $previous = null, ?string $path = null)
- {
- $this->path = $path;
-
+ public function __construct(
+ string $message,
+ int $code = 0,
+ ?\Throwable $previous = null,
+ private ?string $path = null,
+ ) {
parent::__construct($message, $code, $previous);
}
diff --git a/vendor/symfony/filesystem/Filesystem.php b/vendor/symfony/filesystem/Filesystem.php
index 37556e3d..03e449d3 100755
--- a/vendor/symfony/filesystem/Filesystem.php
+++ b/vendor/symfony/filesystem/Filesystem.php
@@ -31,12 +31,10 @@ class Filesystem
* If the target file is newer, it is overwritten only when the
* $overwriteNewerFiles option is set to true.
*
- * @return void
- *
* @throws FileNotFoundException When originFile doesn't exist
* @throws IOException When copy fails
*/
- public function copy(string $originFile, string $targetFile, bool $overwriteNewerFiles = false)
+ public function copy(string $originFile, string $targetFile, bool $overwriteNewerFiles = false): void
{
$originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://');
if ($originIsLocal && !is_file($originFile)) {
@@ -87,11 +85,9 @@ class Filesystem
/**
* Creates a directory recursively.
*
- * @return void
- *
* @throws IOException On any directory creation failure
*/
- public function mkdir(string|iterable $dirs, int $mode = 0777)
+ public function mkdir(string|iterable $dirs, int $mode = 0777): void
{
foreach ($this->toIterable($dirs) as $dir) {
if (is_dir($dir)) {
@@ -130,11 +126,9 @@ class Filesystem
* @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used
* @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used
*
- * @return void
- *
* @throws IOException When touch fails
*/
- public function touch(string|iterable $files, ?int $time = null, ?int $atime = null)
+ public function touch(string|iterable $files, ?int $time = null, ?int $atime = null): void
{
foreach ($this->toIterable($files) as $file) {
if (!($time ? self::box('touch', $file, $time, $atime) : self::box('touch', $file))) {
@@ -146,11 +140,9 @@ class Filesystem
/**
* Removes files or directories.
*
- * @return void
- *
* @throws IOException When removal fails
*/
- public function remove(string|iterable $files)
+ public function remove(string|iterable $files): void
{
if ($files instanceof \Traversable) {
$files = iterator_to_array($files, false);
@@ -214,11 +206,9 @@ class Filesystem
* @param int $umask The mode mask (octal)
* @param bool $recursive Whether change the mod recursively or not
*
- * @return void
- *
* @throws IOException When the change fails
*/
- public function chmod(string|iterable $files, int $mode, int $umask = 0000, bool $recursive = false)
+ public function chmod(string|iterable $files, int $mode, int $umask = 0000, bool $recursive = false): void
{
foreach ($this->toIterable($files) as $file) {
if (!self::box('chmod', $file, $mode & ~$umask)) {
@@ -236,11 +226,9 @@ class Filesystem
* @param string|int $user A user name or number
* @param bool $recursive Whether change the owner recursively or not
*
- * @return void
- *
* @throws IOException When the change fails
*/
- public function chown(string|iterable $files, string|int $user, bool $recursive = false)
+ public function chown(string|iterable $files, string|int $user, bool $recursive = false): void
{
foreach ($this->toIterable($files) as $file) {
if ($recursive && is_dir($file) && !is_link($file)) {
@@ -264,11 +252,9 @@ class Filesystem
* @param string|int $group A group name or number
* @param bool $recursive Whether change the group recursively or not
*
- * @return void
- *
* @throws IOException When the change fails
*/
- public function chgrp(string|iterable $files, string|int $group, bool $recursive = false)
+ public function chgrp(string|iterable $files, string|int $group, bool $recursive = false): void
{
foreach ($this->toIterable($files) as $file) {
if ($recursive && is_dir($file) && !is_link($file)) {
@@ -289,12 +275,10 @@ class Filesystem
/**
* Renames a file or a directory.
*
- * @return void
- *
* @throws IOException When target file or directory already exists
* @throws IOException When origin cannot be renamed
*/
- public function rename(string $origin, string $target, bool $overwrite = false)
+ public function rename(string $origin, string $target, bool $overwrite = false): void
{
// we check that target does not exist
if (!$overwrite && $this->isReadable($target)) {
@@ -332,11 +316,9 @@ class Filesystem
/**
* Creates a symbolic link or copy a directory.
*
- * @return void
- *
* @throws IOException When symlink fails
*/
- public function symlink(string $originDir, string $targetDir, bool $copyOnWindows = false)
+ public function symlink(string $originDir, string $targetDir, bool $copyOnWindows = false): void
{
self::assertFunctionExists('symlink');
@@ -370,12 +352,10 @@ class Filesystem
*
* @param string|string[] $targetFiles The target file(s)
*
- * @return void
- *
* @throws FileNotFoundException When original file is missing or not a file
* @throws IOException When link fails, including if link already exists
*/
- public function hardlink(string $originFile, string|iterable $targetFiles)
+ public function hardlink(string $originFile, string|iterable $targetFiles): void
{
self::assertFunctionExists('link');
@@ -529,11 +509,9 @@ class Filesystem
* - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false)
* - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
*
- * @return void
- *
* @throws IOException When file type is unknown
*/
- public function mirror(string $originDir, string $targetDir, ?\Traversable $iterator = null, array $options = [])
+ public function mirror(string $originDir, string $targetDir, ?\Traversable $iterator = null, array $options = []): void
{
$targetDir = rtrim($targetDir, '/\\');
$originDir = rtrim($originDir, '/\\');
@@ -655,11 +633,9 @@ class Filesystem
*
* @param string|resource $content The data to write into the file
*
- * @return void
- *
* @throws IOException if the file cannot be written to
*/
- public function dumpFile(string $filename, $content)
+ public function dumpFile(string $filename, $content): void
{
if (\is_array($content)) {
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
@@ -702,11 +678,9 @@ class Filesystem
* @param string|resource $content The content to append
* @param bool $lock Whether the file should be locked when writing to it
*
- * @return void
- *
* @throws IOException If the file is not writable
*/
- public function appendToFile(string $filename, $content/* , bool $lock = false */)
+ public function appendToFile(string $filename, $content, bool $lock = false): void
{
if (\is_array($content)) {
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
@@ -718,13 +692,30 @@ class Filesystem
$this->mkdir($dir);
}
- $lock = \func_num_args() > 2 && func_get_arg(2);
-
if (false === self::box('file_put_contents', $filename, $content, \FILE_APPEND | ($lock ? \LOCK_EX : 0))) {
throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename);
}
}
+ /**
+ * Returns the content of a file as a string.
+ *
+ * @throws IOException If the file cannot be read
+ */
+ public function readFile(string $filename): string
+ {
+ if (is_dir($filename)) {
+ throw new IOException(sprintf('Failed to read file "%s": File is a directory.', $filename));
+ }
+
+ $content = self::box('file_get_contents', $filename);
+ if (false === $content) {
+ throw new IOException(sprintf('Failed to read file "%s": ', $filename).self::$lastError, 0, null, $filename);
+ }
+
+ return $content;
+ }
+
private function toIterable(string|iterable $files): iterable
{
return is_iterable($files) ? $files : [$files];
diff --git a/vendor/symfony/filesystem/Path.php b/vendor/symfony/filesystem/Path.php
index 948e1c41..db9ce4be 100755
--- a/vendor/symfony/filesystem/Path.php
+++ b/vendor/symfony/filesystem/Path.php
@@ -346,13 +346,13 @@ final class Path
$extension = ltrim($extension, '.');
// No extension for paths
- if ('/' === substr($path, -1)) {
+ if (str_ends_with($path, '/')) {
return $path;
}
// No actual extension in path
- if (empty($actualExtension)) {
- return $path.('.' === substr($path, -1) ? '' : '.').$extension;
+ if (!$actualExtension) {
+ return $path.(str_ends_with($path, '.') ? '' : '.').$extension;
}
return substr($path, 0, -\strlen($actualExtension)).$extension;
@@ -668,7 +668,7 @@ final class Path
}
// Only add slash if previous part didn't end with '/' or '\'
- if (!\in_array(substr($finalPath, -1), ['/', '\\'])) {
+ if (!\in_array(substr($finalPath, -1), ['/', '\\'], true)) {
$finalPath .= '/';
}
diff --git a/vendor/symfony/filesystem/composer.json b/vendor/symfony/filesystem/composer.json
index fd75755b..c781e55b 100755
--- a/vendor/symfony/filesystem/composer.json
+++ b/vendor/symfony/filesystem/composer.json
@@ -16,12 +16,12 @@
}
],
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.8"
},
"require-dev": {
- "symfony/process": "^5.4|^6.4|^7.0"
+ "symfony/process": "^6.4|^7.0"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Filesystem\\": "" },
diff --git a/vendor/symfony/finder/Comparator/Comparator.php b/vendor/symfony/finder/Comparator/Comparator.php
index bd685834..c3d40e70 100755
--- a/vendor/symfony/finder/Comparator/Comparator.php
+++ b/vendor/symfony/finder/Comparator/Comparator.php
@@ -16,16 +16,16 @@ namespace Symfony\Component\Finder\Comparator;
*/
class Comparator
{
- private string $target;
private string $operator;
- public function __construct(string $target, string $operator = '==')
- {
+ public function __construct(
+ private string $target,
+ string $operator = '==',
+ ) {
if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) {
throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
}
- $this->target = $target;
$this->operator = $operator;
}
diff --git a/vendor/symfony/finder/Finder.php b/vendor/symfony/finder/Finder.php
index 0fd283c1..0894dcde 100755
--- a/vendor/symfony/finder/Finder.php
+++ b/vendor/symfony/finder/Finder.php
@@ -124,7 +124,7 @@ class Finder implements \IteratorAggregate, \Countable
public function depth(string|int|array $levels): static
{
foreach ((array) $levels as $level) {
- $this->depths[] = new Comparator\NumberComparator($level);
+ $this->depths[] = new NumberComparator($level);
}
return $this;
@@ -152,7 +152,7 @@ class Finder implements \IteratorAggregate, \Countable
public function date(string|array $dates): static
{
foreach ((array) $dates as $date) {
- $this->dates[] = new Comparator\DateComparator($date);
+ $this->dates[] = new DateComparator($date);
}
return $this;
@@ -307,7 +307,7 @@ class Finder implements \IteratorAggregate, \Countable
public function size(string|int|array $sizes): static
{
foreach ((array) $sizes as $size) {
- $this->sizes[] = new Comparator\NumberComparator($size);
+ $this->sizes[] = new NumberComparator($size);
}
return $this;
@@ -397,10 +397,8 @@ class Finder implements \IteratorAggregate, \Countable
* @see ignoreVCS()
*
* @param string|string[] $pattern VCS patterns to ignore
- *
- * @return void
*/
- public static function addVCSPattern(string|array $pattern)
+ public static function addVCSPattern(string|array $pattern): void
{
foreach ((array) $pattern as $p) {
self::$vcsPatterns[] = $p;
@@ -438,7 +436,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function sortByExtension(): static
{
- $this->sort = Iterator\SortableIterator::SORT_BY_EXTENSION;
+ $this->sort = SortableIterator::SORT_BY_EXTENSION;
return $this;
}
@@ -454,7 +452,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function sortByName(bool $useNaturalSort = false): static
{
- $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME;
+ $this->sort = $useNaturalSort ? SortableIterator::SORT_BY_NAME_NATURAL : SortableIterator::SORT_BY_NAME;
return $this;
}
@@ -470,7 +468,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function sortByCaseInsensitiveName(bool $useNaturalSort = false): static
{
- $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE : Iterator\SortableIterator::SORT_BY_NAME_CASE_INSENSITIVE;
+ $this->sort = $useNaturalSort ? SortableIterator::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE : SortableIterator::SORT_BY_NAME_CASE_INSENSITIVE;
return $this;
}
@@ -486,7 +484,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function sortBySize(): static
{
- $this->sort = Iterator\SortableIterator::SORT_BY_SIZE;
+ $this->sort = SortableIterator::SORT_BY_SIZE;
return $this;
}
@@ -502,7 +500,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function sortByType(): static
{
- $this->sort = Iterator\SortableIterator::SORT_BY_TYPE;
+ $this->sort = SortableIterator::SORT_BY_TYPE;
return $this;
}
@@ -520,7 +518,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function sortByAccessedTime(): static
{
- $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME;
+ $this->sort = SortableIterator::SORT_BY_ACCESSED_TIME;
return $this;
}
@@ -552,7 +550,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function sortByChangedTime(): static
{
- $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME;
+ $this->sort = SortableIterator::SORT_BY_CHANGED_TIME;
return $this;
}
@@ -570,7 +568,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function sortByModifiedTime(): static
{
- $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME;
+ $this->sort = SortableIterator::SORT_BY_MODIFIED_TIME;
return $this;
}
@@ -588,9 +586,8 @@ class Finder implements \IteratorAggregate, \Countable
*
* @see CustomFilterIterator
*/
- public function filter(\Closure $closure /* , bool $prune = false */): static
+ public function filter(\Closure $closure, bool $prune = false): static
{
- $prune = 1 < \func_num_args() ? func_get_arg(1) : false;
$this->filters[] = $closure;
if ($prune) {
@@ -674,7 +671,7 @@ class Finder implements \IteratorAggregate, \Countable
$iterator = $this->searchInDirectory($this->dirs[0]);
if ($this->sort || $this->reverseSorting) {
- $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
+ $iterator = (new SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
}
return $iterator;
@@ -690,7 +687,7 @@ class Finder implements \IteratorAggregate, \Countable
}
if ($this->sort || $this->reverseSorting) {
- $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
+ $iterator = (new SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
}
return $iterator;
@@ -793,13 +790,13 @@ class Finder implements \IteratorAggregate, \Countable
$iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs);
if ($exclude) {
- $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude);
+ $iterator = new ExcludeDirectoryFilterIterator($iterator, $exclude);
}
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) {
- $iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth);
+ $iterator = new DepthRangeFilterIterator($iterator, $minDepth, $maxDepth);
}
if ($this->mode) {
@@ -807,23 +804,23 @@ class Finder implements \IteratorAggregate, \Countable
}
if ($this->names || $this->notNames) {
- $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames);
+ $iterator = new FilenameFilterIterator($iterator, $this->names, $this->notNames);
}
if ($this->contains || $this->notContains) {
- $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains);
+ $iterator = new FilecontentFilterIterator($iterator, $this->contains, $this->notContains);
}
if ($this->sizes) {
- $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes);
+ $iterator = new SizeRangeFilterIterator($iterator, $this->sizes);
}
if ($this->dates) {
- $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates);
+ $iterator = new DateRangeFilterIterator($iterator, $this->dates);
}
if ($this->filters) {
- $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters);
+ $iterator = new CustomFilterIterator($iterator, $this->filters);
}
if ($this->paths || $notPaths) {
diff --git a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
index 82a9df30..3450c49d 100755
--- a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
+++ b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
@@ -23,8 +23,8 @@ namespace Symfony\Component\Finder\Iterator;
*/
abstract class MultiplePcreFilterIterator extends \FilterIterator
{
- protected $matchRegexps = [];
- protected $noMatchRegexps = [];
+ protected array $matchRegexps = [];
+ protected array $noMatchRegexps = [];
/**
* @param \Iterator $iterator The Iterator to filter
@@ -80,11 +80,7 @@ abstract class MultiplePcreFilterIterator extends \FilterIterator
*/
protected function isRegex(string $str): bool
{
- $availableModifiers = 'imsxuADU';
-
- if (\PHP_VERSION_ID >= 80200) {
- $availableModifiers .= 'n';
- }
+ $availableModifiers = 'imsxuADUn';
if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) {
$start = substr($m[1], 0, 1);
diff --git a/vendor/symfony/finder/SplFileInfo.php b/vendor/symfony/finder/SplFileInfo.php
index 867e8e81..2afc3782 100755
--- a/vendor/symfony/finder/SplFileInfo.php
+++ b/vendor/symfony/finder/SplFileInfo.php
@@ -18,19 +18,17 @@ namespace Symfony\Component\Finder;
*/
class SplFileInfo extends \SplFileInfo
{
- private string $relativePath;
- private string $relativePathname;
-
/**
* @param string $file The file name
* @param string $relativePath The relative path
* @param string $relativePathname The relative path name
*/
- public function __construct(string $file, string $relativePath, string $relativePathname)
- {
+ public function __construct(
+ string $file,
+ private string $relativePath,
+ private string $relativePathname,
+ ) {
parent::__construct($file);
- $this->relativePath = $relativePath;
- $this->relativePathname = $relativePathname;
}
/**
diff --git a/vendor/symfony/finder/composer.json b/vendor/symfony/finder/composer.json
index bbc9d7f2..2b70600d 100755
--- a/vendor/symfony/finder/composer.json
+++ b/vendor/symfony/finder/composer.json
@@ -16,10 +16,10 @@
}
],
"require": {
- "php": ">=8.1"
+ "php": ">=8.2"
},
"require-dev": {
- "symfony/filesystem": "^6.0|^7.0"
+ "symfony/filesystem": "^6.4|^7.0"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Finder\\": "" },
diff --git a/vendor/symfony/options-resolver/OptionConfigurator.php b/vendor/symfony/options-resolver/OptionConfigurator.php
index 3aa37288..e708c2ce 100755
--- a/vendor/symfony/options-resolver/OptionConfigurator.php
+++ b/vendor/symfony/options-resolver/OptionConfigurator.php
@@ -15,13 +15,10 @@ use Symfony\Component\OptionsResolver\Exception\AccessException;
final class OptionConfigurator
{
- private string $name;
- private OptionsResolver $resolver;
-
- public function __construct(string $name, OptionsResolver $resolver)
- {
- $this->name = $name;
- $this->resolver = $resolver;
+ public function __construct(
+ private string $name,
+ private OptionsResolver $resolver,
+ ) {
$this->resolver->setDefined($name);
}
diff --git a/vendor/symfony/options-resolver/OptionsResolver.php b/vendor/symfony/options-resolver/OptionsResolver.php
index 8a0a8c4b..fc378ce3 100755
--- a/vendor/symfony/options-resolver/OptionsResolver.php
+++ b/vendor/symfony/options-resolver/OptionsResolver.php
@@ -490,7 +490,7 @@ class OptionsResolver implements Options
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
*/
- public function setNormalizer(string $option, \Closure $normalizer)
+ public function setNormalizer(string $option, \Closure $normalizer): static
{
if ($this->locked) {
throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.');
@@ -574,7 +574,7 @@ class OptionsResolver implements Options
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
*/
- public function setAllowedValues(string $option, mixed $allowedValues)
+ public function setAllowedValues(string $option, mixed $allowedValues): static
{
if ($this->locked) {
throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.');
@@ -614,7 +614,7 @@ class OptionsResolver implements Options
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
*/
- public function addAllowedValues(string $option, mixed $allowedValues)
+ public function addAllowedValues(string $option, mixed $allowedValues): static
{
if ($this->locked) {
throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.');
@@ -654,7 +654,7 @@ class OptionsResolver implements Options
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
*/
- public function setAllowedTypes(string $option, string|array $allowedTypes)
+ public function setAllowedTypes(string $option, string|array $allowedTypes): static
{
if ($this->locked) {
throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.');
@@ -688,7 +688,7 @@ class OptionsResolver implements Options
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
*/
- public function addAllowedTypes(string $option, string|array $allowedTypes)
+ public function addAllowedTypes(string $option, string|array $allowedTypes): static
{
if ($this->locked) {
throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.');
diff --git a/vendor/symfony/options-resolver/composer.json b/vendor/symfony/options-resolver/composer.json
index 9f2daf4e..e70640d6 100755
--- a/vendor/symfony/options-resolver/composer.json
+++ b/vendor/symfony/options-resolver/composer.json
@@ -16,7 +16,7 @@
}
],
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3"
},
"autoload": {
diff --git a/vendor/symfony/process/CHANGELOG.md b/vendor/symfony/process/CHANGELOG.md
index e26819b5..f7b68b5d 100755
--- a/vendor/symfony/process/CHANGELOG.md
+++ b/vendor/symfony/process/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========
+7.1
+---
+
+ * Add `Process::setIgnoredSignals()` to disable signal propagation to the child process
+
6.4
---
diff --git a/vendor/symfony/process/Exception/ProcessFailedException.php b/vendor/symfony/process/Exception/ProcessFailedException.php
index 19b40570..499809ee 100755
--- a/vendor/symfony/process/Exception/ProcessFailedException.php
+++ b/vendor/symfony/process/Exception/ProcessFailedException.php
@@ -47,10 +47,7 @@ class ProcessFailedException extends RuntimeException
$this->process = $process;
}
- /**
- * @return Process
- */
- public function getProcess()
+ public function getProcess(): Process
{
return $this->process;
}
diff --git a/vendor/symfony/process/Exception/ProcessTimedOutException.php b/vendor/symfony/process/Exception/ProcessTimedOutException.php
index 1cecdae7..252e1112 100755
--- a/vendor/symfony/process/Exception/ProcessTimedOutException.php
+++ b/vendor/symfony/process/Exception/ProcessTimedOutException.php
@@ -38,26 +38,17 @@ class ProcessTimedOutException extends RuntimeException
));
}
- /**
- * @return Process
- */
- public function getProcess()
+ public function getProcess(): Process
{
return $this->process;
}
- /**
- * @return bool
- */
- public function isGeneralTimeout()
+ public function isGeneralTimeout(): bool
{
return self::TYPE_GENERAL === $this->timeoutType;
}
- /**
- * @return bool
- */
- public function isIdleTimeout()
+ public function isIdleTimeout(): bool
{
return self::TYPE_IDLE === $this->timeoutType;
}
diff --git a/vendor/symfony/process/ExecutableFinder.php b/vendor/symfony/process/ExecutableFinder.php
index 8c7bf58d..ceb7a558 100755
--- a/vendor/symfony/process/ExecutableFinder.php
+++ b/vendor/symfony/process/ExecutableFinder.php
@@ -23,20 +23,16 @@ class ExecutableFinder
/**
* Replaces default suffixes of executable.
- *
- * @return void
*/
- public function setSuffixes(array $suffixes)
+ public function setSuffixes(array $suffixes): void
{
$this->suffixes = $suffixes;
}
/**
* Adds new possible suffix to check for executable.
- *
- * @return void
*/
- public function addSuffix(string $suffix)
+ public function addSuffix(string $suffix): void
{
$this->suffixes[] = $suffix;
}
diff --git a/vendor/symfony/process/InputStream.php b/vendor/symfony/process/InputStream.php
index 931217c8..cd91029e 100755
--- a/vendor/symfony/process/InputStream.php
+++ b/vendor/symfony/process/InputStream.php
@@ -28,10 +28,8 @@ class InputStream implements \IteratorAggregate
/**
* Sets a callback that is called when the write buffer becomes empty.
- *
- * @return void
*/
- public function onEmpty(?callable $onEmpty = null)
+ public function onEmpty(?callable $onEmpty = null): void
{
$this->onEmpty = null !== $onEmpty ? $onEmpty(...) : null;
}
@@ -41,10 +39,8 @@ class InputStream implements \IteratorAggregate
*
* @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar,
* stream resource or \Traversable
- *
- * @return void
*/
- public function write(mixed $input)
+ public function write(mixed $input): void
{
if (null === $input) {
return;
@@ -57,20 +53,16 @@ class InputStream implements \IteratorAggregate
/**
* Closes the write buffer.
- *
- * @return void
*/
- public function close()
+ public function close(): void
{
$this->open = false;
}
/**
* Tells whether the write buffer is closed or not.
- *
- * @return bool
*/
- public function isClosed()
+ public function isClosed(): bool
{
return !$this->open;
}
diff --git a/vendor/symfony/process/Messenger/RunProcessContext.php b/vendor/symfony/process/Messenger/RunProcessContext.php
index b5ade072..5e223040 100755
--- a/vendor/symfony/process/Messenger/RunProcessContext.php
+++ b/vendor/symfony/process/Messenger/RunProcessContext.php
@@ -27,7 +27,7 @@ final class RunProcessContext
Process $process,
) {
$this->exitCode = $process->getExitCode();
- $this->output = $process->isOutputDisabled() ? null : $process->getOutput();
- $this->errorOutput = $process->isOutputDisabled() ? null : $process->getErrorOutput();
+ $this->output = !$process->isStarted() || $process->isOutputDisabled() ? null : $process->getOutput();
+ $this->errorOutput = !$process->isStarted() || $process->isOutputDisabled() ? null : $process->getErrorOutput();
}
}
diff --git a/vendor/symfony/process/PhpProcess.php b/vendor/symfony/process/PhpProcess.php
index 6e2ab59f..01d88954 100755
--- a/vendor/symfony/process/PhpProcess.php
+++ b/vendor/symfony/process/PhpProcess.php
@@ -55,10 +55,7 @@ class PhpProcess extends Process
throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class));
}
- /**
- * @return void
- */
- public function start(?callable $callback = null, array $env = [])
+ public function start(?callable $callback = null, array $env = []): void
{
if (null === $this->getCommandLine()) {
throw new RuntimeException('Unable to find the PHP executable.');
diff --git a/vendor/symfony/process/Process.php b/vendor/symfony/process/Process.php
index bf2e8e85..fd3ad875 100755
--- a/vendor/symfony/process/Process.php
+++ b/vendor/symfony/process/Process.php
@@ -15,6 +15,7 @@ use Symfony\Component\Process\Exception\InvalidArgumentException;
use Symfony\Component\Process\Exception\LogicException;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Exception\ProcessSignaledException;
+use Symfony\Component\Process\Exception\ProcessStartFailedException;
use Symfony\Component\Process\Exception\ProcessTimedOutException;
use Symfony\Component\Process\Exception\RuntimeException;
use Symfony\Component\Process\Pipes\UnixPipes;
@@ -76,6 +77,7 @@ class Process implements \IteratorAggregate
private bool $tty = false;
private bool $pty;
private array $options = ['suppress_errors' => true, 'bypass_shell' => true];
+ private array $ignoredSignals = [];
private WindowsPipes|UnixPipes $processPipes;
@@ -89,7 +91,7 @@ class Process implements \IteratorAggregate
*
* User-defined errors must use exit codes in the 64-113 range.
*/
- public static $exitCodes = [
+ public static array $exitCodes = [
0 => 'OK',
1 => 'General error',
2 => 'Misuse of shell builtins',
@@ -200,10 +202,7 @@ class Process implements \IteratorAggregate
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
}
- /**
- * @return void
- */
- public function __wakeup()
+ public function __wakeup(): void
{
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
}
@@ -237,11 +236,11 @@ class Process implements \IteratorAggregate
*
* @return int The exit status code
*
- * @throws RuntimeException When process can't be launched
- * @throws RuntimeException When process is already running
- * @throws ProcessTimedOutException When process timed out
- * @throws ProcessSignaledException When process stopped after receiving signal
- * @throws LogicException In case a callback is provided and output has been disabled
+ * @throws ProcessStartFailedException When process can't be launched
+ * @throws RuntimeException When process is already running
+ * @throws ProcessTimedOutException When process timed out
+ * @throws ProcessSignaledException When process stopped after receiving signal
+ * @throws LogicException In case a callback is provided and output has been disabled
*
* @final
*/
@@ -288,13 +287,11 @@ class Process implements \IteratorAggregate
* @param callable|null $callback A PHP callback to run whenever there is some
* output available on STDOUT or STDERR
*
- * @return void
- *
- * @throws RuntimeException When process can't be launched
- * @throws RuntimeException When process is already running
- * @throws LogicException In case a callback is provided and output has been disabled
+ * @throws ProcessStartFailedException When process can't be launched
+ * @throws RuntimeException When process is already running
+ * @throws LogicException In case a callback is provided and output has been disabled
*/
- public function start(?callable $callback = null, array $env = [])
+ public function start(?callable $callback = null, array $env = []): void
{
if ($this->isRunning()) {
throw new RuntimeException('Process is already running.');
@@ -312,12 +309,7 @@ class Process implements \IteratorAggregate
$env += '\\' === \DIRECTORY_SEPARATOR ? array_diff_ukey($this->getDefaultEnv(), $env, 'strcasecmp') : $this->getDefaultEnv();
if (\is_array($commandline = $this->commandline)) {
- $commandline = implode(' ', array_map($this->escapeArgument(...), $commandline));
-
- if ('\\' !== \DIRECTORY_SEPARATOR) {
- // exec is mandatory to deal with sending a signal to the process
- $commandline = 'exec '.$commandline;
- }
+ $commandline = array_values(array_map(strval(...), $commandline));
} else {
$commandline = $this->replacePlaceholders($commandline, $env);
}
@@ -328,6 +320,11 @@ class Process implements \IteratorAggregate
// last exit code is output on the fourth pipe and caught to work around --enable-sigchild
$descriptors[3] = ['pipe', 'w'];
+ if (\is_array($commandline)) {
+ // exec is mandatory to deal with sending a signal to the process
+ $commandline = 'exec '.$this->buildShellCommandline($commandline);
+ }
+
// See https://unix.stackexchange.com/questions/71205/background-process-pipe-input
$commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;';
$commandline .= 'pid=$!; echo $pid >&3; wait $pid 2>/dev/null; code=$?; echo $code >&3; exit $code';
@@ -344,10 +341,34 @@ class Process implements \IteratorAggregate
throw new RuntimeException(sprintf('The provided cwd "%s" does not exist.', $this->cwd));
}
- $process = @proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $this->options);
+ $lastError = null;
+ set_error_handler(function ($type, $msg) use (&$lastError) {
+ $lastError = $msg;
+
+ return true;
+ });
+
+ $oldMask = [];
+
+ if ($this->ignoredSignals && \function_exists('pcntl_sigprocmask')) {
+ // we block signals we want to ignore, as proc_open will use fork / posix_spawn which will copy the signal mask this allow to block
+ // signals in the child process
+ pcntl_sigprocmask(\SIG_BLOCK, $this->ignoredSignals, $oldMask);
+ }
+
+ try {
+ $process = @proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $this->options);
+ } finally {
+ if ($this->ignoredSignals && \function_exists('pcntl_sigprocmask')) {
+ // we restore the signal mask here to avoid any side effects
+ pcntl_sigprocmask(\SIG_SETMASK, $oldMask);
+ }
+
+ restore_error_handler();
+ }
if (!\is_resource($process)) {
- throw new RuntimeException('Unable to launch a new process.');
+ throw new ProcessStartFailedException($this, $lastError);
}
$this->process = $process;
$this->status = self::STATUS_STARTED;
@@ -372,8 +393,8 @@ class Process implements \IteratorAggregate
* @param callable|null $callback A PHP callback to run whenever there is some
* output available on STDOUT or STDERR
*
- * @throws RuntimeException When process can't be launched
- * @throws RuntimeException When process is already running
+ * @throws ProcessStartFailedException When process can't be launched
+ * @throws RuntimeException When process is already running
*
* @see start()
*
@@ -949,7 +970,7 @@ class Process implements \IteratorAggregate
*/
public function getCommandLine(): string
{
- return \is_array($this->commandline) ? implode(' ', array_map($this->escapeArgument(...), $this->commandline)) : $this->commandline;
+ return $this->buildShellCommandline($this->commandline);
}
/**
@@ -1141,11 +1162,9 @@ class Process implements \IteratorAggregate
* In case you run a background process (with the start method), you should
* trigger this method regularly to ensure the process timeout
*
- * @return void
- *
* @throws ProcessTimedOutException In case the timeout was reached
*/
- public function checkTimeout()
+ public function checkTimeout(): void
{
if (self::STATUS_STARTED !== $this->status) {
return;
@@ -1183,10 +1202,8 @@ class Process implements \IteratorAggregate
*
* Enabling the "create_new_console" option allows a subprocess to continue
* to run after the main process exited, on both Windows and *nix
- *
- * @return void
*/
- public function setOptions(array $options)
+ public function setOptions(array $options): void
{
if ($this->isRunning()) {
throw new RuntimeException('Setting options while the process is running is not possible.');
@@ -1204,6 +1221,20 @@ class Process implements \IteratorAggregate
}
}
+ /**
+ * Defines a list of posix signals that will not be propagated to the process.
+ *
+ * @param list<\SIG*> $signals
+ */
+ public function setIgnoredSignals(array $signals): void
+ {
+ if ($this->isRunning()) {
+ throw new RuntimeException('Setting ignored signals while the process is running is not possible.');
+ }
+
+ $this->ignoredSignals = $signals;
+ }
+
/**
* Returns whether TTY is supported on the current operating system.
*/
@@ -1280,10 +1311,8 @@ class Process implements \IteratorAggregate
* Updates the status of the process, reads pipes.
*
* @param bool $blocking Whether to use a blocking read call
- *
- * @return void
*/
- protected function updateStatus(bool $blocking)
+ protected function updateStatus(bool $blocking): void
{
if (self::STATUS_STARTED !== $this->status) {
return;
@@ -1455,6 +1484,11 @@ class Process implements \IteratorAggregate
*/
private function doSignal(int $signal, bool $throwException): bool
{
+ // Signal seems to be send when sigchild is enable, this allow blocking the signal correctly in this case
+ if ($this->isSigchildEnabled() && \in_array($signal, $this->ignoredSignals)) {
+ return false;
+ }
+
if (null === $pid = $this->getPid()) {
if ($throwException) {
throw new LogicException('Cannot send signal on a non running process.');
@@ -1497,8 +1531,18 @@ class Process implements \IteratorAggregate
return true;
}
- private function prepareWindowsCommandLine(string $cmd, array &$env): string
+ private function buildShellCommandline(string|array $commandline): string
{
+ if (\is_string($commandline)) {
+ return $commandline;
+ }
+
+ return implode(' ', array_map($this->escapeArgument(...), $commandline));
+ }
+
+ private function prepareWindowsCommandLine(string|array $cmd, array &$env): string
+ {
+ $cmd = $this->buildShellCommandline($cmd);
$uid = uniqid('', true);
$cmd = preg_replace_callback(
'/"(?:(
diff --git a/vendor/symfony/process/composer.json b/vendor/symfony/process/composer.json
index 317c07e7..dda5575e 100755
--- a/vendor/symfony/process/composer.json
+++ b/vendor/symfony/process/composer.json
@@ -16,7 +16,7 @@
}
],
"require": {
- "php": ">=8.1"
+ "php": ">=8.2"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Process\\": "" },
diff --git a/vendor/symfony/stopwatch/README.md b/vendor/symfony/stopwatch/README.md
index 13a9dfa5..824ddfd6 100755
--- a/vendor/symfony/stopwatch/README.md
+++ b/vendor/symfony/stopwatch/README.md
@@ -6,8 +6,8 @@ The Stopwatch component provides a way to profile code.
Getting Started
---------------
-```
-$ composer require symfony/stopwatch
+```bash
+composer require symfony/stopwatch
```
```php
diff --git a/vendor/symfony/stopwatch/Section.php b/vendor/symfony/stopwatch/Section.php
index 2a34db16..912e391f 100755
--- a/vendor/symfony/stopwatch/Section.php
+++ b/vendor/symfony/stopwatch/Section.php
@@ -23,8 +23,6 @@ class Section
*/
private array $events = [];
- private ?float $origin;
- private bool $morePrecision;
private ?string $id = null;
/**
@@ -36,10 +34,10 @@ class Section
* @param float|null $origin Set the origin of the events in this section, use null to set their origin to their start time
* @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
*/
- public function __construct(?float $origin = null, bool $morePrecision = false)
- {
- $this->origin = $origin;
- $this->morePrecision = $morePrecision;
+ public function __construct(
+ private ?float $origin = null,
+ private bool $morePrecision = false,
+ ) {
}
/**
diff --git a/vendor/symfony/stopwatch/Stopwatch.php b/vendor/symfony/stopwatch/Stopwatch.php
index 538898f1..53ef69f7 100755
--- a/vendor/symfony/stopwatch/Stopwatch.php
+++ b/vendor/symfony/stopwatch/Stopwatch.php
@@ -23,8 +23,6 @@ class_exists(Section::class);
*/
class Stopwatch implements ResetInterface
{
- private bool $morePrecision;
-
/**
* @var Section[]
*/
@@ -38,9 +36,9 @@ class Stopwatch implements ResetInterface
/**
* @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
*/
- public function __construct(bool $morePrecision = false)
- {
- $this->morePrecision = $morePrecision;
+ public function __construct(
+ private bool $morePrecision = false,
+ ) {
$this->reset();
}
@@ -57,11 +55,9 @@ class Stopwatch implements ResetInterface
*
* @param string|null $id The id of the session to re-open, null to create a new one
*
- * @return void
- *
* @throws \LogicException When the section to re-open is not reachable
*/
- public function openSection(?string $id = null)
+ public function openSection(?string $id = null): void
{
$current = end($this->activeSections);
@@ -81,11 +77,9 @@ class Stopwatch implements ResetInterface
*
* @see getSectionEvents()
*
- * @return void
- *
* @throws \LogicException When there's no started section to be stopped
*/
- public function stopSection(string $id)
+ public function stopSection(string $id): void
{
$this->stop('__section__');
@@ -149,10 +143,8 @@ class Stopwatch implements ResetInterface
/**
* Resets the stopwatch to its original state.
- *
- * @return void
*/
- public function reset()
+ public function reset(): void
{
$this->sections = $this->activeSections = ['__root__' => new Section(null, $this->morePrecision)];
}
diff --git a/vendor/symfony/stopwatch/StopwatchEvent.php b/vendor/symfony/stopwatch/StopwatchEvent.php
index 1a85d80c..08be4892 100755
--- a/vendor/symfony/stopwatch/StopwatchEvent.php
+++ b/vendor/symfony/stopwatch/StopwatchEvent.php
@@ -25,7 +25,6 @@ class StopwatchEvent
private float $origin;
private string $category;
- private bool $morePrecision;
/**
* @var float[]
@@ -42,11 +41,14 @@ class StopwatchEvent
*
* @throws \InvalidArgumentException When the raw time is not valid
*/
- public function __construct(float $origin, ?string $category = null, bool $morePrecision = false, ?string $name = null)
- {
+ public function __construct(
+ float $origin,
+ ?string $category = null,
+ private bool $morePrecision = false,
+ ?string $name = null,
+ ) {
$this->origin = $this->formatTime($origin);
$this->category = \is_string($category) ? $category : 'default';
- $this->morePrecision = $morePrecision;
$this->name = $name ?? 'default';
}
@@ -101,7 +103,7 @@ class StopwatchEvent
*/
public function isStarted(): bool
{
- return !empty($this->started);
+ return (bool) $this->started;
}
/**
@@ -116,10 +118,8 @@ class StopwatchEvent
/**
* Stops all non already stopped periods.
- *
- * @return void
*/
- public function ensureStopped()
+ public function ensureStopped(): void
{
while (\count($this->started)) {
$this->stop();
diff --git a/vendor/symfony/stopwatch/composer.json b/vendor/symfony/stopwatch/composer.json
index 4aa02b5f..35568695 100755
--- a/vendor/symfony/stopwatch/composer.json
+++ b/vendor/symfony/stopwatch/composer.json
@@ -16,7 +16,7 @@
}
],
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/service-contracts": "^2.5|^3"
},
"autoload": {
diff --git a/vendor/symfony/string/AbstractString.php b/vendor/symfony/string/AbstractString.php
index f55c7216..253d2dcb 100755
--- a/vendor/symfony/string/AbstractString.php
+++ b/vendor/symfony/string/AbstractString.php
@@ -39,8 +39,8 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public const PREG_SPLIT_DELIM_CAPTURE = \PREG_SPLIT_DELIM_CAPTURE;
public const PREG_SPLIT_OFFSET_CAPTURE = \PREG_SPLIT_OFFSET_CAPTURE;
- protected $string = '';
- protected $ignoreCase = false;
+ protected string $string = '';
+ protected ?bool $ignoreCase = false;
abstract public function __construct(string $string = '');
diff --git a/vendor/symfony/string/AbstractUnicodeString.php b/vendor/symfony/string/AbstractUnicodeString.php
index 4e085010..2cb2917c 100755
--- a/vendor/symfony/string/AbstractUnicodeString.php
+++ b/vendor/symfony/string/AbstractUnicodeString.php
@@ -155,7 +155,7 @@ abstract class AbstractUnicodeString extends AbstractString
public function camel(): static
{
$str = clone $this;
- $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?![A-Z]{2,})/u', static function ($m) {
+ $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?!\p{Lu})/u', static function ($m) {
static $i = 0;
return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8');
@@ -220,6 +220,21 @@ abstract class AbstractUnicodeString extends AbstractString
return $str;
}
+ /**
+ * @param string $locale In the format language_region (e.g. tr_TR)
+ */
+ public function localeLower(string $locale): static
+ {
+ if (null !== $transliterator = $this->getLocaleTransliterator($locale, 'Lower')) {
+ $str = clone $this;
+ $str->string = $transliterator->transliterate($str->string);
+
+ return $str;
+ }
+
+ return $this->lower();
+ }
+
public function match(string $regexp, int $flags = 0, int $offset = 0): array
{
$match = ((\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match';
@@ -346,8 +361,8 @@ abstract class AbstractUnicodeString extends AbstractString
public function snake(): static
{
- $str = clone $this;
- $str->string = str_replace(' ', '_', mb_strtolower(preg_replace(['/(\p{Lu}+)(\p{Lu}\p{Ll})/u', '/([\p{Ll}0-9])(\p{Lu})/u'], '\1 \2', $str->string), 'UTF-8'));
+ $str = $this->camel();
+ $str->string = mb_strtolower(preg_replace(['/(\p{Lu}+)(\p{Lu}\p{Ll})/u', '/([\p{Ll}0-9])(\p{Lu})/u'], '\1_\2', $str->string), 'UTF-8');
return $str;
}
@@ -363,6 +378,21 @@ abstract class AbstractUnicodeString extends AbstractString
return $str;
}
+ /**
+ * @param string $locale In the format language_region (e.g. tr_TR)
+ */
+ public function localeTitle(string $locale): static
+ {
+ if (null !== $transliterator = $this->getLocaleTransliterator($locale, 'Title')) {
+ $str = clone $this;
+ $str->string = $transliterator->transliterate($str->string);
+
+ return $str;
+ }
+
+ return $this->title();
+ }
+
public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): static
{
if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) {
@@ -450,6 +480,21 @@ abstract class AbstractUnicodeString extends AbstractString
return $str;
}
+ /**
+ * @param string $locale In the format language_region (e.g. tr_TR)
+ */
+ public function localeUpper(string $locale): static
+ {
+ if (null !== $transliterator = $this->getLocaleTransliterator($locale, 'Upper')) {
+ $str = clone $this;
+ $str->string = $transliterator->transliterate($str->string);
+
+ return $str;
+ }
+
+ return $this->upper();
+ }
+
public function width(bool $ignoreAnsiDecoration = true): int
{
$width = 0;
@@ -587,4 +632,33 @@ abstract class AbstractUnicodeString extends AbstractString
return $width;
}
+
+ private function getLocaleTransliterator(string $locale, string $id): ?\Transliterator
+ {
+ $rule = $locale.'-'.$id;
+ if (\array_key_exists($rule, self::$transliterators)) {
+ return self::$transliterators[$rule];
+ }
+
+ if (null !== $transliterator = self::$transliterators[$rule] = \Transliterator::create($rule)) {
+ return $transliterator;
+ }
+
+ // Try to find a parent locale (nl_BE -> nl)
+ if (false === $i = strpos($locale, '_')) {
+ return null;
+ }
+
+ $parentRule = substr_replace($locale, '-'.$id, $i);
+
+ // Parent locale was already cached, return and store as current locale
+ if (\array_key_exists($parentRule, self::$transliterators)) {
+ return self::$transliterators[$rule] = self::$transliterators[$parentRule];
+ }
+
+ // Create transliterator based on parent locale and cache the result on both initial and parent locale values
+ $transliterator = \Transliterator::create($parentRule);
+
+ return self::$transliterators[$rule] = self::$transliterators[$parentRule] = $transliterator;
+ }
}
diff --git a/vendor/symfony/string/ByteString.php b/vendor/symfony/string/ByteString.php
index 6389dbd1..e6b56ae1 100755
--- a/vendor/symfony/string/ByteString.php
+++ b/vendor/symfony/string/ByteString.php
@@ -11,6 +11,7 @@
namespace Symfony\Component\String;
+use Random\Randomizer;
use Symfony\Component\String\Exception\ExceptionInterface;
use Symfony\Component\String\Exception\InvalidArgumentException;
use Symfony\Component\String\Exception\RuntimeException;
@@ -55,6 +56,10 @@ class ByteString extends AbstractString
throw new InvalidArgumentException('The length of the alphabet must in the [2^1, 2^56] range.');
}
+ if (\PHP_VERSION_ID >= 80300) {
+ return new static((new Randomizer())->getBytesFromString($alphabet, $length));
+ }
+
$ret = '';
while ($length > 0) {
$urandomLength = (int) ceil(2 * $length * $bits / 8.0);
@@ -342,8 +347,8 @@ class ByteString extends AbstractString
public function snake(): static
{
- $str = clone $this;
- $str->string = str_replace(' ', '_', strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1 \2', $str->string)));
+ $str = $this->camel();
+ $str->string = strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $str->string));
return $str;
}
diff --git a/vendor/symfony/string/CHANGELOG.md b/vendor/symfony/string/CHANGELOG.md
index 31a3b54d..621cedfc 100755
--- a/vendor/symfony/string/CHANGELOG.md
+++ b/vendor/symfony/string/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========
+7.1
+---
+
+ * Add `localeLower()`, `localeUpper()`, `localeTitle()` methods to `AbstractUnicodeString`
+
6.2
---
diff --git a/vendor/symfony/string/LazyString.php b/vendor/symfony/string/LazyString.php
index 3d893ef9..8f2bbbf8 100755
--- a/vendor/symfony/string/LazyString.php
+++ b/vendor/symfony/string/LazyString.php
@@ -129,7 +129,7 @@ class LazyString implements \Stringable, \JsonSerializable
} elseif ($callback instanceof \Closure) {
$r = new \ReflectionFunction($callback);
- if (str_contains($r->name, '{closure') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
+ if ($r->isAnonymous() || !$class = $r->getClosureCalledClass()) {
return $r->name;
}
diff --git a/vendor/symfony/string/Slugger/AsciiSlugger.php b/vendor/symfony/string/Slugger/AsciiSlugger.php
index a9693d49..d2545329 100755
--- a/vendor/symfony/string/Slugger/AsciiSlugger.php
+++ b/vendor/symfony/string/Slugger/AsciiSlugger.php
@@ -11,7 +11,7 @@
namespace Symfony\Component\String\Slugger;
-use Symfony\Component\Intl\Transliterator\EmojiTransliterator;
+use Symfony\Component\Emoji\EmojiTransliterator;
use Symfony\Component\String\AbstractUnicodeString;
use Symfony\Component\String\UnicodeString;
use Symfony\Contracts\Translation\LocaleAwareInterface;
@@ -55,7 +55,6 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
'zh' => 'Han-Latin',
];
- private ?string $defaultLocale;
private \Closure|array $symbolsMap = [
'en' => ['@' => 'at', '&' => 'and'],
];
@@ -68,16 +67,14 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
*/
private array $transliterators = [];
- public function __construct(?string $defaultLocale = null, array|\Closure|null $symbolsMap = null)
- {
- $this->defaultLocale = $defaultLocale;
+ public function __construct(
+ private ?string $defaultLocale = null,
+ array|\Closure|null $symbolsMap = null,
+ ) {
$this->symbolsMap = $symbolsMap ?? $this->symbolsMap;
}
- /**
- * @return void
- */
- public function setLocale(string $locale)
+ public function setLocale(string $locale): void
{
$this->defaultLocale = $locale;
}
@@ -95,7 +92,7 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
public function withEmoji(bool|string $emoji = true): static
{
if (false !== $emoji && !class_exists(EmojiTransliterator::class)) {
- throw new \LogicException(sprintf('You cannot use the "%s()" method as the "symfony/intl" package is not installed. Try running "composer require symfony/intl".', __METHOD__));
+ throw new \LogicException(sprintf('You cannot use the "%s()" method as the "symfony/emoji" package is not installed. Try running "composer require symfony/emoji".', __METHOD__));
}
$new = clone $this;
diff --git a/vendor/symfony/string/UnicodeString.php b/vendor/symfony/string/UnicodeString.php
index 75af2da4..4b16caf9 100755
--- a/vendor/symfony/string/UnicodeString.php
+++ b/vendor/symfony/string/UnicodeString.php
@@ -362,10 +362,7 @@ class UnicodeString extends AbstractUnicodeString
return $prefix === grapheme_extract($this->string, \strlen($prefix), \GRAPHEME_EXTR_MAXBYTES);
}
- /**
- * @return void
- */
- public function __wakeup()
+ public function __wakeup(): void
{
if (!\is_string($this->string)) {
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
diff --git a/vendor/symfony/string/composer.json b/vendor/symfony/string/composer.json
index 56c13688..10d0ee62 100755
--- a/vendor/symfony/string/composer.json
+++ b/vendor/symfony/string/composer.json
@@ -16,18 +16,19 @@
}
],
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
- "symfony/error-handler": "^5.4|^6.0|^7.0",
- "symfony/intl": "^6.2|^7.0",
- "symfony/http-client": "^5.4|^6.0|^7.0",
+ "symfony/error-handler": "^6.4|^7.0",
+ "symfony/emoji": "^7.1",
+ "symfony/http-client": "^6.4|^7.0",
+ "symfony/intl": "^6.4|^7.0",
"symfony/translation-contracts": "^2.5|^3.0",
- "symfony/var-exporter": "^5.4|^6.0|^7.0"
+ "symfony/var-exporter": "^6.4|^7.0"
},
"conflict": {
"symfony/translation-contracts": "<2.5"