diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php index eb92b7889..b99317170 100644 --- a/admin/survey/SurveyAdmin.php +++ b/admin/survey/SurveyAdmin.php @@ -2029,7 +2029,7 @@ class SurveyAdmin // Zavihki PODATKI elseif($_GET['a'] == 'data'){ - if(!isset($_GET['m'])){ + if(!isset($_GET['m']) || $_GET['m'] == 'view'){ $podstran = 'data'; } elseif($_GET['m'] == 'quick_edit'){ diff --git a/admin/survey/classes/surveyData/class.SurveySNDataFile.php b/admin/survey/classes/surveyData/class.SurveySNDataFile.php new file mode 100644 index 000000000..c4e5653ac --- /dev/null +++ b/admin/survey/classes/surveyData/class.SurveySNDataFile.php @@ -0,0 +1,615 @@ +surveyId = $sid; + $this->folder = $site_path . EXPORT_FOLDER.'/'; + + #inicializiramo class za datoteke + $this->SDF = SurveyDataFile::get_instance(); + $this->SDF->init($sid); + $this->headFileName = $this->SDF->getHeaderFileName(); + $this->dataFileName = $this->SDF->getDataFileName(); + $this->dataFileStatus = $this->SDF->getStatus(); + + session_start(); + + $this->snCreateFullTable = $_SESSION['sid_'.$sid]['snCreateFullTable']; + if ( $this->dataFileStatus == FILE_STATUS_NO_DATA + || $this->dataFileStatus == FILE_STATUS_SRV_DELETED) { + Common::noDataAlert(); + return false; + } + } + + public function setVars($_VARS) { + $this->_VARS = $_VARS; + } + public function setParameter($parameter,$value) { + $this->{$parameter} = $value; + } + /** Preštejemo loope + * + */ + function countLoops() { + if ($this->dataFileStatus >= 0 && $this->headFileName != '') { + $this -> _HEADERS = unserialize(file_get_contents($this->headFileName)) ; + # poiščemo skevence za vse variable loopa + #$_headers = $this -> _HEADERS; + $_headers = $this->getCleanHeader(); + + #preštejemo koliko loopov imamo + $this->sn_loop_parents = array(); + $this->sn_loop_spremenljivke = array(); + + if (count($_headers) > 0) { + foreach ($_headers as $spr => $spremenljivka) { + if ($spremenljivka['loop_parent'] > 0) { + $this->sn_loop_data[$spremenljivka['loop_parent']]['antonucci'] = $spremenljivka['antonucci']; + $this->sn_loop_data[$spremenljivka['loop_parent']]['spr'] = $spr; + $this->sn_loop_data[$spremenljivka['loop_parent']]['variable'] = $spremenljivka['variable']; + $this->sn_loop_data[$spremenljivka['loop_parent']]['naslov'] = $spremenljivka['naslov']; + } + # spremenljivka je parent za loop, preštejemo variable + if (is_countable($spremenljivka['grids']) && count($spremenljivka['grids']) > 0) { + foreach($spremenljivka['grids'] AS $gid => $grid) { + if (count($grid['variables']) > 0) { + foreach($grid['variables'] AS $vid => $variable) { + # če smo v loop parent + if ($spremenljivka['loop_parent'] > 0) { + $this->sn_loop_parents[$spremenljivka['loop_parent']][$variable['sequence']] = $variable['sequence']; + + } + # če smo v loop spremenljivki + if ($spremenljivka['parent_loop_id'] > 0) { + $this->sn_loop_spremenljivke[$spremenljivka['parent_loop_id']][$spremenljivka['loop_id']][$variable['sequence']] = $variable['sequence']; + } + } + } + } + } + } + } + } + } + + /** Skreira datoteko z alterji iz obstoječe datoteke s podatki + * + */ + function createSNDataFile($lpid, $sn_loop_parent,$_SN_head_file_name,$_sn_filename) { + if ($this->dataFileStatus >= 0 && $this->headFileName != '') { + # če kreiramo nove, pobrišemo morebitne obstoječe datoteke + $this->deleteOldSnFiles(); + + + #popucamo headers + $_headers = $this->getCleanHeader(); + + $sn_loop_spremenljivke = $this->sn_loop_spremenljivke; + + # resetiramo array za SN_HEADER + $_empty_name_filter = array(); + $SN_HEADER = array(); + + $sequences = array(); # kam shranimo sequence + $loop_header_cnt = 0; + + if (count($sn_loop_parent) > 0 ) { + foreach ($sn_loop_parent as $lsid => $loop_sequence) { + $loop_header_cnt ++; + $_new_sequence = 1; + + # poiščemo variable loopa + if (isset($sn_loop_spremenljivke[$lpid]) && count($sn_loop_spremenljivke[$lpid]) > 0) { + $_loop_cnt = array_shift($sn_loop_spremenljivke[$lpid]); + } else { + $_loop_cnt = array(); + } + + $sequences[$lpid.'_'.$lsid] = array(); + + # Zloopamo skozi vse spremenljivke in dodamo v primerno skupino + if (count($_headers) > 0) { + foreach ($_headers as $spr => $spremenljivka) { + + if ($loop_header_cnt === 1 ) { + $tmp_spremenljivka = $spremenljivka; + } + # odvisno ali smo v loopu ali ne dodamo primerne spremnljivke + if ((int)$spremenljivka['loop_parent'] > 0 || (int)$spremenljivka['parent_loop_id']) { + # ali smo v parent spremenljivki ali v loop spremenljivkah + if ((int)$spremenljivka['loop_parent'] > 0 && $lpid == (int)$spremenljivka['loop_parent']){ + + $_first_parent_variable = 0; + + #smo v parent splemenljivki, dodamo samo variablo z primerno sekvenco + if (count($spremenljivka['grids']) > 0) { + foreach($spremenljivka['grids'] AS $gid => $grid) { + if (count($grid['variables']) > 0) { + foreach($grid['variables'] AS $vid => $variable) { + + if ($variable['sequence'] == $loop_sequence) { + #$sequences[$lpid.'_'.$lsid][$spr] = $variable['sequence']; + $sequences[$lpid.'_'.$lsid][] = $variable['sequence']; + # v sn imenih imamo samo 1 variablo + if ($loop_header_cnt === 1 && $_first_parent_variable === 0) { + $_empty_name_filter[] = '($'.$_new_sequence .' != -1 && $'.$_new_sequence .' != -2 && $'.$_new_sequence .' != -3 && $'.$_new_sequence .' != -4 && $'.$_new_sequence .' != -5)'; + $tmp_spremenljivka['grids'][$gid]['variables'][$vid]['sequence'] = $_new_sequence; + $tmp_spremenljivka['sequences'] = $_new_sequence; + $tmp_spremenljivka['cnt_grids'] = 1; + $tmp_spremenljivka['cnt_all'] = 1; + $tmp_spremenljivka['grids']['0']['cnt_vars'] = 1; + + $_new_sequence++; + $_first_parent_variable ++; + + } + } + # odstranimo ostale variable + if ( $gid == 0 && $vid > 0) { + unset($tmp_spremenljivka['grids'][$gid]['variables'][$vid]); + } else if ( $gid > 0) { + unset($tmp_spremenljivka['grids'][$gid]); + } + + } + } + } + + } + + # dodamo spremenljivko v nov header + if ($loop_header_cnt === 1) { + $SN_HEADER[$spr] = $tmp_spremenljivka; + } + } + # ali smo v spremenljivki v loopu + if ((int)$spremenljivka['parent_loop_id'] > 0) { + $add_this_spr = false; + $sequenceses = array(); + # smo v loop spremenljivkah, dodamo variable s pravo frekvenco + if (count($spremenljivka['grids']) > 0) { + foreach($spremenljivka['grids'] AS $gid => $grid) { + if (count($grid['variables']) > 0) { + foreach($grid['variables'] AS $vid => $variable) { + if (isset($_loop_cnt[$variable['sequence']])) { + $add_this_spr = true; + #$sequences[$lpid.'_'.$lsid][$spr] = $variable['sequence']; + $sequences[$lpid.'_'.$lsid][] = $variable['sequence']; + if ($loop_header_cnt === 1) { + $tmp_spremenljivka['grids'][$gid]['variables'][$vid]['sequence'] = $_new_sequence; + $sequenceses[] = $_new_sequence; + $_new_sequence++; + } + } + } + } + } + } + + # dodamo spremenljivko v nov header + if ($loop_header_cnt === 1 && $add_this_spr == true) { + $SN_HEADER[$spr] = $tmp_spremenljivka; + $SN_HEADER[$spr]['sequences'] = implode('_',$sequenceses); + } + } + } else { + + # nismo v loopu + $sequenceses = array(); + if (is_countable($spremenljivka['grids']) && count($spremenljivka['grids']) > 0) { + foreach($spremenljivka['grids'] AS $gid => $grid) { + if (count($grid['variables']) > 0) { + foreach($grid['variables'] AS $vid => $variable) { + #$sequences[$lpid.'_'.$lsid][$spr] = $variable['sequence']; + $sequences[$lpid.'_'.$lsid][] = $variable['sequence']; + if ($loop_header_cnt === 1) { + $tmp_spremenljivka['grids'][$gid]['variables'][$vid]['sequence'] = $_new_sequence; + $sequenceses[] = $_new_sequence; + $_new_sequence++; + } + + } + } + } + } + + # dodamo spremenljivko v nov header + if ($loop_header_cnt === 1) { + $SN_HEADER[$spr] = $tmp_spremenljivka; + $SN_HEADER[$spr]['sequences'] = implode('_',$sequenceses); + } + } + } + } + } + } + + # zapišemo header za SN datoteko + if (is_array($SN_HEADER) && count($SN_HEADER) > 0) { + #zapišemo SN header datoteko + file_put_contents($_SN_head_file_name, serialize($SN_HEADER)); + + } + + # KREACIJA DATA DATOTEKE + # skreiramo fajle z potrebnimi skevencami + if (count($sequences) > 0) { + $_original_data_file = $this->dataFileName; + $_paste_files = ''; + + foreach ($sequences AS $skey => $sequence) { + + if (is_array($sequence) && count($sequence)>0) { + $_sequence = implode(",",$sequence); + + if (IS_WINDOWS) { + $cmdLn1 = 'cut -d "|" -f '.$_sequence.' '.$_original_data_file.' > '.$this->folder.'export_sn_data_'.$this->surveyId.'_'.$lpid.'_'.$skey.'.dat'; + } else { + $cmdLn1 = 'cut -d \'|\' -f '.$_sequence.' '.$_original_data_file.' > '.$this->folder.'export_sn_data_'.$this->surveyId.'_'.$lpid.'_'.$skey.'.dat'; + } + $out1 = shell_exec($cmdLn1); + $_paste_files .= $this->folder.'export_sn_data_'.$this->surveyId.'_'.$lpid.'_'.$skey.'.dat '; + } + } + + # združimo datoteke v eno + $_orig_date = explode("_",$_original_data_file); + $_orig_date = explode(".",$_orig_date[3]); + + #$_merged_file_name = $this->folder.'export_sn_data_'.$this->surveyId.'_'.$_orig_date[0].'.dat'; + $_merged_file_name = $_sn_filename; + $tmp_merged_file_name = $this->folder.'tmp_export_sn_data_'.$this->surveyId.'_'.$lpid.'_'.$_orig_date[0].'.dat'; + if (IS_WINDOWS) { + $cmdLn2 = 'paste -d "\n" '.$_paste_files .'> '.$tmp_merged_file_name; + } + else { + $cmdLn2 = 'paste -d \'\n\' '.$_paste_files. '>' .$tmp_merged_file_name; + } + $out2 = shell_exec($cmdLn2); + + # pripravimo filtre, za data datoteko, da odstranimo zapise ki nimajo imen ( če je nekdo dodal samo 2 imena nekdo pa 5) + $_empty_name_filter = implode(' && ',$_empty_name_filter); + + # sfiltriramo zapise ki nimajo imen + if (IS_WINDOWS) { + $cmdLn3 = 'awk -F"'.STR_DLMT.'" "BEGIN {OFS=\"\x7C\"} '.$_empty_name_filter.' { print $0 }" ' . $tmp_merged_file_name .' > ' . $_merged_file_name; + } + else { + $cmdLn3 = 'awk -F"'.STR_DLMT.'" \'BEGIN {OFS="\x7C"} '.$_empty_name_filter.' { print $0 }\' ' . $tmp_merged_file_name . ' > ' . $_merged_file_name; + } + $out3 = shell_exec($cmdLn3); + + # pobrišemo odvečne datoteke + foreach (explode(" ",$_paste_files) as $filename_to_delete) { + if (trim($filename_to_delete) != '') { + $this->SDF->deleteFile($filename_to_delete); + } + } + + if (trim($tmp_merged_file_name) != '') { + $this->SDF->deleteFile($tmp_merged_file_name); + } + } + } + } + + function displayFullTableCheckbox() { + global $lang; + session_start(); + echo ''; + } + + + function outputSNDataFile() { + global $lang; + $this->countLoops(); + + # forsamo novo kreiranje! malo slaba rešitev - mogoče dodat enako kontrolao na zadnjega userja v SN fajlih + $this->deleteOldSnFiles(); + + $_original_head_file = $this->headFileName; + $_original_data_file = $this->dataFileName; + + # timestam head datoteke + $_orig_date_h = explode("_",$_original_head_file); + $_orig_date_h = explode(".",$_orig_date_h[3]); + # združimo datoteke v eno + $_orig_date_d = explode("_",$_original_data_file); + $_orig_date_d = explode(".",$_orig_date_d[3]); + + + $this-> displayFullTableCheckbox(); + + # Tukaj začnemo loopat po glavnih loopih in nardimo ločene tabele za vsak loop + + # zloopamo tolikokrat koliko imamo variabel za loop ( v loop_parent) + if (count($this->sn_loop_parents) > 0) { + foreach ($this->sn_loop_parents as $lpid => $sn_loop_parent) { + + # head ime datoteke za loop + $_SN_head_file_name = $this->folder.'export_sn_header_'.$this->surveyId.'_'.$lpid.'_'.$_orig_date_h[0].'.dat'; + # data ime datoteke za loop + $_sn_filename = $this->folder.'export_sn_data_'.$this->surveyId.'_'.$lpid.'_'.$_orig_date_d[0].'.dat'; + # začasno ime datoteke za loop + $_sn_tmp1 = $this->folder.'tmp_1_export_sn_data_'.$this->surveyId.'_'.$lpid.'_'.$_orig_date_d[0].'.dat'; + # če SN header in SN data datoteka obstaja + if (!file_exists($_SN_head_file_name) || !file_exists($_sn_filename)) { + $this->createSNDataFile($lpid, $sn_loop_parent,$_SN_head_file_name,$_sn_filename); + } + + # če SN header in SN data datoteka obstaja + if (file_exists($_SN_head_file_name) && file_exists($_sn_filename)) { + + # naložimo header + $SN_HEADER = unserialize(file_get_contents($_SN_head_file_name)); + echo '
'; + echo '

'.$lang['srv_loop_for_variable'].' ['. $this->sn_loop_data[$lpid]['variable']. '] - '. $this->sn_loop_data[$lpid]['naslov']. ' ('.$lang['srv_loop_antonucci_circle'].' '.$this->sn_loop_data[$lpid]['antonucci'].')

'; + echo ''; + echo ''; + echo ''; + + # dodamo skrit stolpec uid + echo ''; + + $spr_cont = 0; + foreach ($SN_HEADER AS $spid => $spremenljivka) { + # if (isset(self::$_SVP_PV[$spid]) ) { + ## paginacija spremenljivk + # if (self::$_VARS['spr_limit'] == 'all' || ($spr_cont >= $_spr_on_pages_start && $spr_cont < $_spr_on_pages_stop)) { + if ($spr_cont > 0 && $spid != 'uid') { + echo ''; + #} + } + $spr_cont++; + #} + } #end foreach $SN_HEADER AS $spid => $spremenljivka + # nova vrstica + echo ''; + + # dodamo skrit stolpec uid + echo ''; + + $spr_cont = 0; + foreach ($SN_HEADER AS $spid => $spremenljivka) { + if ($spr_cont > 0 && $spid != 'uid') { + # if (isset(self::$_SVP_PV[$spid]) && (count($spremenljivka['grids']) > 0 )) { + ## paginacija spremenljivk + # if (self::$_VARS['spr_limit'] == 'all' || ($spr_cont >= $_spr_on_pages_start && $spr_cont < $_spr_on_pages_stop)) { + if (count($spremenljivka['grids']) > 0) { + foreach ($spremenljivka['grids'] AS $gid => $grid) { + echo ''; + } + } + #} + } + $spr_cont++; + #} + } + + # nova vrstica + echo ''; + + ## dodamo skrit stolpec uid + echo ''; + + $spr_cont = 0; + foreach ($SN_HEADER AS $spid => $spremenljivka) { + if ($spr_cont > 0 && $spid != 'uid') { + # if (isset(self::$_SVP_PV[$spid]) && count($spremenljivka['grids']) > 0) { + ## paginacija spremenljivk + # if (self::$_VARS['spr_limit'] == 'all' || ($spr_cont >= $_spr_on_pages_start && $spr_cont < $_spr_on_pages_stop)) { + if (count($spremenljivka['grids']) > 0){ + foreach ($spremenljivka['grids'] AS $gid => $grid) { + if (count ($grid['variables']) > 0) { + foreach ($grid['variables'] AS $vid => $variable ){ + echo ''; + } + } + } # end foreach + } #end if + # } + } + $spr_cont++; + #} + } + echo''; + echo ''; + echo ''; + + # dodamo podatke + if (file_exists($_sn_filename)) { + + // zamenjamo | z '; + $file_handler = fopen ($_sn_tmp1, 'r'); + while ($line= fgets ($file_handler)) { + echo ''; + echo ''; + } + echo ''; + echo '
 '; + echo '
'.$spremenljivka['naslov'].'
'; + echo '
 '; + echo '
'.$grid['naslov'].'
'; + echo '
 '; + echo '
'.$variable['naslov']; + if ($variable['other'] == 1) { + echo ' (text)'; + } + /*// urejanje kalkulacije -- izracunane vrednosti v podatkih + if ($spremenljivka['tip'] == 22) { + echo ' ('.$lang['edit3'].')'; + }*/ + echo '
'; + + echo '
+ if (IS_WINDOWS) { + $cmdLn3 = 'sed "s*'.STR_DLMT.'**g" '.$_sn_filename.' > '.$_sn_tmp1; + } else { + $cmdLn3 = 'sed \'s*'.STR_DLMT.'**g\' '.$_sn_filename.' > '.$_sn_tmp1; + } + $out3 = shell_exec($cmdLn3); + + echo '
'.$line.'
'; + echo '
'; + if ($file_handler) { + fclose($file_handler); + } + + # pobrišemo tmp falj + if (trim($_sn_tmp1) != '') { + $this->SDF->deleteFile($_sn_tmp1); + } + } + } + + } + } + + } + /** Pobriše morebitne stare SN daoteke + * + */ + function deleteOldSnFiles() { + if ($this->surveyId > 0) { + + # odstranimo morebitne SN datoteke - header + $files = glob($this->folder.'export_sn_header_'.$this->surveyId.'_*.dat'); + if(count($files ) > 0) { + foreach ($files AS $file) { + unlink($file); + } + } + # odstranimo morebitne SN datoteke - data + $files = glob($this->folder.'export_sn_data_'.$this->surveyId.'_*.dat'); + if(count($files ) > 0) { + foreach ($files AS $file) { + unlink($file); + } + } + + } + } + + /* Tukaj pripravimo redosled in prikaz glavnih spremenljivk + * + */ + function getCleanHeader() { + # poiščemo skevence za vse variable loopa + $header = $this -> _HEADERS; + $cleanHeader = array(); + if (count($header) > 0) { + foreach ($header AS $spr_id => $spremenljivka) { + + if ($this->_VARS[VAR_DATA] == '1') { + $add_data = true; + } else { + $add_data = false; + } + + # preverimo ali delamo kompleksno tabelo al samo simpl + if ($this->snCreateFullTable == false) { + $add_data = $add_data && ((int)$spremenljivka['loop_parent'] > 0 || (int)$spremenljivka['parent_loop_id'] > 0); + } + if ( $spremenljivka['tip'] == 'm' || $spremenljivka['tip'] == 'sm') { + $add_data = false; + switch ($spremenljivka['variable']) { + case 'uid': + case 'recnum': + $add_data = true; + break; + case 'code': + # ce prikazujemo sistemske ne prikazujemo recnumber + if (!$this->_VARS[VAR_SHOW_SYSTEM] && $this->_VARS[VAR_META] && $this->_VARS[VAR_METAFULL]) { + $add_data = true; + } + break; + case 'status': + case 'lurker': + if ($this->_VARS[VAR_META] && $this->_VARS[VAR_METAFULL]) { + $add_data = true; + } + break; + case 'relevance': + if ($this->_VARS[VAR_RELEVANCE] && $this->canDisplayRelevance) { + $add_data = true; + } + break; + case 'invitation': + if ($this->_VARS[VAR_EMAIL]) { + $add_data = true; + } + break; + case 'testdata': + $header = $this->SDF->getHeader(); + if (isset($header['testdata'])) { + $add_data = true; + } + break; + case 'smeta': + case 'meta': + if ($this->_VARS[VAR_METAFULL]) { + $add_data = true; + } + break; + case 'itime': + if ($this->showItime == true) { + $add_data = true; + } + break; + } + } + if ($spremenljivka['hide_system'] == '1') { + $add_data = false; + } + if ($add_data == true ) { + $cleanHeader[$spr_id] = $spremenljivka; + } + } + } + return $cleanHeader; + } +} +?> \ No newline at end of file diff --git a/composer.lock b/composer.lock index ce873ecd5..47e1f3cfc 100644 --- a/composer.lock +++ b/composer.lock @@ -308,16 +308,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.7.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", "shasum": "" }, "require": { @@ -375,7 +375,7 @@ "uri", "url" ], - "time": "2020-09-30 07:37:11" + "time": "2021-03-21 16:25:00" }, { "name": "maxmind-db/reader", @@ -753,20 +753,21 @@ "homepage": "https://github.com/paypal/paypalhttp_php/contributors" } ], + "abandoned": true, "time": "2019-11-06 21:27:12" }, { "name": "phpmailer/phpmailer", - "version": "v6.3.0", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb" + "reference": "050d430203105c27c30efd1dce7aa421ad882d01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb", - "reference": "4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/050d430203105c27c30efd1dce7aa421ad882d01", + "reference": "050d430203105c27c30efd1dce7aa421ad882d01", "shasum": "" }, "require": { @@ -784,7 +785,7 @@ "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { - "ext-mbstring": "Needed to send email in multibyte encoding charset", + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication", "psr/log": "For optional PSR-3 debug logging", @@ -819,7 +820,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2021-02-19 15:28:08" + "time": "2021-03-31 20:06:42" }, { "name": "psr/http-message", @@ -1021,16 +1022,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.75.0", + "version": "v7.76.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "d377a667cd789b99ccab768441a5a2160cc4ea80" + "reference": "47e66d4186712be33c593fe820dccf270a04d5d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/d377a667cd789b99ccab768441a5a2160cc4ea80", - "reference": "d377a667cd789b99ccab768441a5a2160cc4ea80", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/47e66d4186712be33c593fe820dccf270a04d5d6", + "reference": "47e66d4186712be33c593fe820dccf270a04d5d6", "shasum": "" }, "require": { @@ -1074,7 +1075,7 @@ "payment processing", "stripe" ], - "time": "2021-02-22 14:31:21" + "time": "2021-03-22 16:50:21" }, { "name": "symfony/polyfill-intl-idn", @@ -1912,16 +1913,16 @@ "packages-dev": [ { "name": "filp/whoops", - "version": "2.10.0", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "6ecda5217bf048088b891f7403b262906be5a957" + "reference": "d501fd2658d55491a2295ff600ae5978eaad7403" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/6ecda5217bf048088b891f7403b262906be5a957", - "reference": "6ecda5217bf048088b891f7403b262906be5a957", + "url": "https://api.github.com/repos/filp/whoops/zipball/d501fd2658d55491a2295ff600ae5978eaad7403", + "reference": "d501fd2658d55491a2295ff600ae5978eaad7403", "shasum": "" }, "require": { @@ -1969,7 +1970,7 @@ "throwable", "whoops" ], - "time": "2021-03-16 12:00:00" + "time": "2021-03-30 12:00:00" }, { "name": "kint-php/kint", @@ -2261,16 +2262,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.20", + "version": "v4.4.21", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "a1eab2f69906dc83c5ddba4632180260d0ab4f7f" + "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/a1eab2f69906dc83c5ddba4632180260d0ab4f7f", - "reference": "a1eab2f69906dc83c5ddba4632180260d0ab4f7f", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0da0e174f728996f5d5072d6a9f0a42259dbc806", + "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806", "shasum": "" }, "require": { @@ -2329,7 +2330,7 @@ "debug", "dump" ], - "time": "2021-01-27 09:09:26" + "time": "2021-03-27 19:49:03" } ], "aliases": [], diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 2ea0928c1..1a547e406 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -971,6 +971,7 @@ return array( 'SurveyRecoding' => $baseDir . '/admin/survey/classes/class.SurveyRecoding.php', 'SurveyReminderTracking' => $baseDir . '/admin/survey/classes/class.SurveyReminderTracking.php', 'SurveyRespondents' => $baseDir . '/admin/survey/classes/class.SurveyRespondents.php', + 'SurveySNDataFile' => $baseDir . '/admin/survey/classes/surveyData/class.SurveySNDataFile.php', 'SurveySession' => $baseDir . '/admin/survey/classes/class.SurveySession.php', 'SurveySessionDestructor' => $baseDir . '/admin/survey/classes/class.SurveySession.php', 'SurveySetting' => $baseDir . '/admin/survey/classes/class.SurveySetting.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 876c615d4..f3cbbea7c 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -10,9 +10,9 @@ return array( '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', '3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php', - 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '2bf0564df058fbe21b5554296cc8571a' => $baseDir . '/main/survey/class.EvalvacijaMain.php', '5bc35216aa4f6cb823ce4a5cec52fdce' => $baseDir . '/main/survey/mobile-detect/Mobile_Detect.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 24a1f8404..e715f65e5 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -11,9 +11,9 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779 '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', '3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php', - 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '2bf0564df058fbe21b5554296cc8571a' => __DIR__ . '/../..' . '/main/survey/class.EvalvacijaMain.php', '5bc35216aa4f6cb823ce4a5cec52fdce' => __DIR__ . '/../..' . '/main/survey/mobile-detect/Mobile_Detect.php', @@ -1175,6 +1175,7 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779 'SurveyRecoding' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyRecoding.php', 'SurveyReminderTracking' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyReminderTracking.php', 'SurveyRespondents' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyRespondents.php', + 'SurveySNDataFile' => __DIR__ . '/../..' . '/admin/survey/classes/surveyData/class.SurveySNDataFile.php', 'SurveySession' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySession.php', 'SurveySessionDestructor' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySession.php', 'SurveySetting' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySetting.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index ac0ec526a..9a252ddf9 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -58,74 +58,6 @@ "google authenticator" ] }, - { - "name": "phpmailer/phpmailer", - "version": "v6.3.0", - "version_normalized": "6.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb", - "reference": "4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "php": ">=5.5.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.2", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" - }, - "suggest": { - "ext-mbstring": "Needed to send email in multibyte encoding charset", - "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", - "league/oauth2-google": "Needed for Google XOAUTH2 authentication", - "psr/log": "For optional PSR-3 debug logging", - "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" - }, - "time": "2021-02-19 15:28:08", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "PHPMailer\\PHPMailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-only" - ], - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP" - }, { "name": "web-token/jwt-util-ecc", "version": "v1.3.10", @@ -1131,79 +1063,6 @@ "response" ] }, - { - "name": "guzzlehttp/psr7", - "version": "1.7.0", - "version_normalized": "1.7.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "time": "2020-09-30 07:37:11", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ] - }, { "name": "symfony/polyfill-php72", "version": "v1.22.1", @@ -1533,65 +1392,6 @@ "web" ] }, - { - "name": "stripe/stripe-php", - "version": "v7.75.0", - "version_normalized": "7.75.0.0", - "source": { - "type": "git", - "url": "https://github.com/stripe/stripe-php.git", - "reference": "d377a667cd789b99ccab768441a5a2160cc4ea80" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/d377a667cd789b99ccab768441a5a2160cc4ea80", - "reference": "d377a667cd789b99ccab768441a5a2160cc4ea80", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=5.6.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "2.17.1", - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5.7", - "squizlabs/php_codesniffer": "^3.3", - "symfony/process": "~3.4" - }, - "time": "2021-02-22 14:31:21", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Stripe\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stripe and contributors", - "homepage": "https://github.com/stripe/stripe-php/contributors" - } - ], - "description": "Stripe PHP Library", - "homepage": "https://stripe.com/", - "keywords": [ - "api", - "payment processing", - "stripe" - ] - }, { "name": "composer/ca-bundle", "version": "1.2.9", @@ -1856,7 +1656,8 @@ "name": "PayPal", "homepage": "https://github.com/paypal/paypalhttp_php/contributors" } - ] + ], + "abandoned": true }, { "name": "paypal/paypal-checkout-sdk", @@ -1961,5 +1762,205 @@ "keywords": [ "promise" ] + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.4.0", + "version_normalized": "6.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "050d430203105c27c30efd1dce7aa421ad882d01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/050d430203105c27c30efd1dce7aa421ad882d01", + "reference": "050d430203105c27c30efd1dce7aa421ad882d01", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.5.6", + "yoast/phpunit-polyfills": "^0.2.0" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "time": "2021-03-31 20:06:42", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP" + }, + { + "name": "stripe/stripe-php", + "version": "v7.76.0", + "version_normalized": "7.76.0.0", + "source": { + "type": "git", + "url": "https://github.com/stripe/stripe-php.git", + "reference": "47e66d4186712be33c593fe820dccf270a04d5d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/47e66d4186712be33c593fe820dccf270a04d5d6", + "reference": "47e66d4186712be33c593fe820dccf270a04d5d6", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "2.17.1", + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.3", + "symfony/process": "~3.4" + }, + "time": "2021-03-22 16:50:21", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Stripe\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stripe and contributors", + "homepage": "https://github.com/stripe/stripe-php/contributors" + } + ], + "description": "Stripe PHP Library", + "homepage": "https://stripe.com/", + "keywords": [ + "api", + "payment processing", + "stripe" + ] + }, + { + "name": "guzzlehttp/psr7", + "version": "1.8.1", + "version_normalized": "1.8.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "time": "2021-03-21 16:25:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ] } ] diff --git a/vendor/guzzlehttp/psr7/.github/workflows/bc.yml b/vendor/guzzlehttp/psr7/.github/workflows/bc.yml new file mode 100644 index 000000000..9eaedbce7 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.github/workflows/bc.yml @@ -0,0 +1,16 @@ +name: BC Check + +on: + pull_request: + +jobs: + roave-bc-check: + name: Roave BC Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Roave BC Check + uses: docker://nyholm/roave-bc-check-ga diff --git a/vendor/guzzlehttp/psr7/.github/workflows/ci.yml b/vendor/guzzlehttp/psr7/.github/workflows/ci.yml new file mode 100644 index 000000000..da7414e57 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + pull_request: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + matrix: + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: 'none' + extensions: mbstring + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: composer update --no-interaction --no-progress --prefer-dist + + - name: Run tests + run: make test diff --git a/vendor/guzzlehttp/psr7/.github/workflows/integration.yml b/vendor/guzzlehttp/psr7/.github/workflows/integration.yml new file mode 100644 index 000000000..b6e0eb241 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.github/workflows/integration.yml @@ -0,0 +1,37 @@ +name: Integration + +on: + pull_request: + +jobs: + + build: + name: Test + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + matrix: + php: ['7.2', '7.3', '7.4', '8.0'] + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Download dependencies + uses: ramsey/composer-install@v1 + with: + composer-options: --no-interaction --prefer-dist --optimize-autoloader + + - name: Start server + run: php -S 127.0.0.1:10002 tests/Integration/server.php & + + - name: Run tests + env: + TEST_SERVER: 127.0.0.1:10002 + run: ./vendor/bin/phpunit --testsuite Integration diff --git a/vendor/guzzlehttp/psr7/.php_cs.dist b/vendor/guzzlehttp/psr7/.php_cs.dist new file mode 100644 index 000000000..e4f0bd535 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.php_cs.dist @@ -0,0 +1,56 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'concat_space' => ['spacing' => 'one'], + 'declare_strict_types' => false, + 'final_static_access' => true, + 'fully_qualified_strict_types' => true, + 'header_comment' => false, + 'is_null' => ['use_yoda_style' => true], + 'list_syntax' => ['syntax' => 'long'], + 'lowercase_cast' => true, + 'magic_method_casing' => true, + 'modernize_types_casting' => true, + 'multiline_comment_opening_closing' => true, + 'no_alias_functions' => true, + 'no_alternative_syntax' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, + 'no_leading_import_slash' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unset_cast' => true, + 'no_unused_imports' => true, + 'no_whitespace_in_blank_line' => true, + 'ordered_imports' => true, + 'php_unit_ordered_covers' => true, + 'php_unit_test_annotation' => ['style' => 'prefix'], + 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], + 'phpdoc_align' => ['align' => 'vertical'], + 'phpdoc_no_useless_inheritdoc' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_trim' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_types' => true, + 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], + 'phpdoc_var_without_name' => true, + 'single_trait_insert_per_statement' => true, + 'standardize_not_equals' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') + ->name('*.php') + ) +; + +return $config; diff --git a/vendor/guzzlehttp/psr7/CHANGELOG.md b/vendor/guzzlehttp/psr7/CHANGELOG.md index b441d3666..a608aa419 100644 --- a/vendor/guzzlehttp/psr7/CHANGELOG.md +++ b/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -9,6 +9,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.8.1] - 2021-03-21 + +### Fixed + +- Issue parsing IPv6 URLs +- Issue modifying ServerRequest lost all its attributes + +## [1.8.0] - 2021-03-21 + +### Added + +- Locale independent URL parsing +- Most classes got a `@final` annotation to prepare for 2.0 + +### Fixed + +- Issue when creating stream from `php://input` and curl-ext is not installed +- Broken `Utils::tryFopen()` on PHP 8 + ## [1.7.0] - 2020-09-30 ### Added diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php index 86e7a23ba..fa9153d78 100644 --- a/vendor/guzzlehttp/psr7/src/AppendStream.php +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -8,6 +8,8 @@ use Psr\Http\Message\StreamInterface; * Reads from multiple streams, one after the other. * * This is a read-only stream decorator. + * + * @final */ class AppendStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php index 627e4a5f1..783859c19 100644 --- a/vendor/guzzlehttp/psr7/src/BufferStream.php +++ b/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -11,6 +11,8 @@ use Psr\Http\Message\StreamInterface; * This stream returns a "hwm" metadata value that tells upstream consumers * what the configured high water mark of the stream is, or the maximum * preferred size of the buffer. + * + * @final */ class BufferStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/CachingStream.php b/vendor/guzzlehttp/psr7/src/CachingStream.php index 244d2a063..fe749e981 100644 --- a/vendor/guzzlehttp/psr7/src/CachingStream.php +++ b/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface; /** * Stream decorator that can cache previously read bytes from a sequentially * read stream. + * + * @final */ class CachingStream implements StreamInterface { @@ -21,7 +23,7 @@ class CachingStream implements StreamInterface /** * We will treat the buffer object as the body of the stream * - * @param StreamInterface $stream Stream to cache + * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream. * @param StreamInterface $target Optionally specify where data is cached */ public function __construct( @@ -29,7 +31,7 @@ class CachingStream implements StreamInterface StreamInterface $target = null ) { $this->remoteStream = $stream; - $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); + $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); } public function getSize() diff --git a/vendor/guzzlehttp/psr7/src/DroppingStream.php b/vendor/guzzlehttp/psr7/src/DroppingStream.php index e125642d3..9f7420c40 100644 --- a/vendor/guzzlehttp/psr7/src/DroppingStream.php +++ b/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface; /** * Stream decorator that begins dropping data once the size of the underlying * stream becomes too full. + * + * @final */ class DroppingStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php index 407577a37..76a8cc7ba 100644 --- a/vendor/guzzlehttp/psr7/src/FnStream.php +++ b/vendor/guzzlehttp/psr7/src/FnStream.php @@ -9,6 +9,8 @@ use Psr\Http\Message\StreamInterface; * * Allows for easy testing and extension of a provided stream without needing * to create a concrete class for a simple extension point. + * + * @final */ class FnStream implements StreamInterface { @@ -56,6 +58,7 @@ class FnStream implements StreamInterface /** * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. + * * @throws \LogicException */ public function __wakeup() diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php index c98b96f25..0cbd2cce2 100644 --- a/vendor/guzzlehttp/psr7/src/InflateStream.php +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -14,6 +14,8 @@ use Psr\Http\Message\StreamInterface; * * @link http://tools.ietf.org/html/rfc1952 * @link http://php.net/manual/en/filters.compression.php + * + * @final */ class InflateStream implements StreamInterface { @@ -34,6 +36,7 @@ class InflateStream implements StreamInterface /** * @param StreamInterface $stream * @param $header + * * @return int */ private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php index 13c7af5c8..911e127d3 100644 --- a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface; /** * Lazily reads or writes to a file that is opened only after an IO operation * take place on the stream. + * + * @final */ class LazyOpenStream implements StreamInterface { @@ -15,7 +17,7 @@ class LazyOpenStream implements StreamInterface /** @var string File to open */ private $filename; - /** @var string $mode */ + /** @var string */ private $mode; /** diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php index bef9161ea..1173ec40d 100644 --- a/vendor/guzzlehttp/psr7/src/LimitStream.php +++ b/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -4,9 +4,10 @@ namespace GuzzleHttp\Psr7; use Psr\Http\Message\StreamInterface; - /** - * Decorator used to return only a subset of a stream + * Decorator used to return only a subset of a stream. + * + * @final */ class LimitStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php index 0cbfea35d..5a6079a89 100644 --- a/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface; /** * Stream that when read returns bytes for a streaming multipart or * multipart/form-data stream. + * + * @final */ class MultipartStream implements StreamInterface { @@ -115,9 +117,11 @@ class MultipartStream implements StreamInterface $disposition = $this->getHeader($headers, 'content-disposition'); if (!$disposition) { $headers['Content-Disposition'] = ($filename === '0' || $filename) - ? sprintf('form-data; name="%s"; filename="%s"', + ? sprintf( + 'form-data; name="%s"; filename="%s"', $name, - basename($filename)) + basename($filename) + ) : "form-data; name=\"{$name}\""; } diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php index 4b04b4c0a..d66bdde46 100644 --- a/vendor/guzzlehttp/psr7/src/NoSeekStream.php +++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -5,7 +5,9 @@ namespace GuzzleHttp\Psr7; use Psr\Http\Message\StreamInterface; /** - * Stream decorator that prevents a stream from being seeked + * Stream decorator that prevents a stream from being seeked. + * + * @final */ class NoSeekStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/PumpStream.php b/vendor/guzzlehttp/psr7/src/PumpStream.php index fbd8726b4..44c7b582c 100644 --- a/vendor/guzzlehttp/psr7/src/PumpStream.php +++ b/vendor/guzzlehttp/psr7/src/PumpStream.php @@ -13,6 +13,8 @@ use Psr\Http\Message\StreamInterface; * returned by the provided callable is buffered internally until drained using * the read() function of the PumpStream. The provided callable MUST return * false when there is no more data to read. + * + * @final */ class PumpStream implements StreamInterface { @@ -32,14 +34,14 @@ class PumpStream implements StreamInterface private $buffer; /** - * @param callable $source Source of the stream data. The callable MAY - * accept an integer argument used to control the - * amount of data to return. The callable MUST - * return a string when called, or false on error - * or EOF. - * @param array $options Stream options: - * - metadata: Hash of metadata to use with stream. - * - size: Size of the stream, if known. + * @param callable $source Source of the stream data. The callable MAY + * accept an integer argument used to control the + * amount of data to return. The callable MUST + * return a string when called, or false on error + * or EOF. + * @param array $options Stream options: + * - metadata: Hash of metadata to use with stream. + * - size: Size of the stream, if known. */ public function __construct(callable $source, array $options = []) { diff --git a/vendor/guzzlehttp/psr7/src/Query.php b/vendor/guzzlehttp/psr7/src/Query.php index 99e093050..5a7cc0359 100644 --- a/vendor/guzzlehttp/psr7/src/Query.php +++ b/vendor/guzzlehttp/psr7/src/Query.php @@ -34,7 +34,9 @@ final class Query } elseif ($urlEncoding === PHP_QUERY_RFC1738) { $decoder = 'urldecode'; } else { - $decoder = function ($str) { return $str; }; + $decoder = function ($str) { + return $str; + }; } foreach (explode('&', $str) as $kvp) { @@ -65,6 +67,7 @@ final class Query * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 * to encode using RFC3986, or PHP_QUERY_RFC1738 * to encode using RFC1738. + * * @return string */ public static function build(array $params, $encoding = PHP_QUERY_RFC3986) @@ -74,7 +77,9 @@ final class Query } if ($encoding === false) { - $encoder = function ($str) { return $str; }; + $encoder = function ($str) { + return $str; + }; } elseif ($encoding === PHP_QUERY_RFC3986) { $encoder = 'rawurlencode'; } elseif ($encoding === PHP_QUERY_RFC1738) { diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php index 89fbb1e62..c1cdaebff 100644 --- a/vendor/guzzlehttp/psr7/src/Request.php +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -17,7 +17,7 @@ class Request implements RequestInterface /** @var string */ private $method; - /** @var null|string */ + /** @var string|null */ private $requestTarget; /** @var UriInterface */ @@ -27,7 +27,7 @@ class Request implements RequestInterface * @param string $method HTTP method * @param string|UriInterface $uri URI * @param array $headers Request headers - * @param string|null|resource|StreamInterface $body Request body + * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version */ public function __construct( diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php index 36b85fb78..8c01a0f5a 100644 --- a/vendor/guzzlehttp/psr7/src/Response.php +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -83,7 +83,7 @@ class Response implements ResponseInterface /** * @param int $status Status code * @param array $headers Response headers - * @param string|null|resource|StreamInterface $body Response body + * @param string|resource|StreamInterface|null $body Response body * @param string $version Protocol version * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) */ diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php index 505e4742b..51b571f24 100644 --- a/vendor/guzzlehttp/psr7/src/Rfc7230.php +++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -11,6 +11,7 @@ final class Rfc7230 * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons. * * @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15 + * * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE */ const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php index 72c5566cf..e6d26f5ff 100644 --- a/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -4,9 +4,9 @@ namespace GuzzleHttp\Psr7; use InvalidArgumentException; use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Message\UriInterface; use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UploadedFileInterface; +use Psr\Http\Message\UriInterface; /** * Server-side HTTP request @@ -35,7 +35,7 @@ class ServerRequest extends Request implements ServerRequestInterface private $cookieParams = []; /** - * @var null|array|object + * @var array|object|null */ private $parsedBody; @@ -58,7 +58,7 @@ class ServerRequest extends Request implements ServerRequestInterface * @param string $method HTTP method * @param string|UriInterface $uri URI * @param array $headers Request headers - * @param string|null|resource|StreamInterface $body Request body + * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version * @param array $serverParams Typically the $_SERVER superglobal */ @@ -111,6 +111,7 @@ class ServerRequest extends Request implements ServerRequestInterface * delegate to normalizeNestedFileSpec() and return that return value. * * @param array $value $_FILES struct + * * @return array|UploadedFileInterface */ private static function createUploadedFileFromSpec(array $value) @@ -135,6 +136,7 @@ class ServerRequest extends Request implements ServerRequestInterface * UploadedFileInterface instances. * * @param array $files + * * @return UploadedFileInterface[] */ private static function normalizeNestedFileSpec(array $files = []) @@ -184,7 +186,7 @@ class ServerRequest extends Request implements ServerRequestInterface private static function extractHostAndPortFromAuthority($authority) { - $uri = 'http://'.$authority; + $uri = 'http://' . $authority; $parts = parse_url($uri); if (false === $parts) { return [null, null]; @@ -245,7 +247,6 @@ class ServerRequest extends Request implements ServerRequestInterface return $uri; } - /** * {@inheritdoc} */ diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php index 093023b1c..5025dd67b 100644 --- a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -6,6 +6,7 @@ use Psr\Http\Message\StreamInterface; /** * Stream decorator trait + * * @property StreamInterface stream */ trait StreamDecoratorTrait diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php index eac653539..fc7cb969b 100644 --- a/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -6,6 +6,8 @@ use Psr\Http\Message\StreamInterface; /** * Converts Guzzle streams into PHP stream resources. + * + * @final */ class StreamWrapper { diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php index a0ea59e09..bf342c4de 100644 --- a/vendor/guzzlehttp/psr7/src/UploadedFile.php +++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -39,7 +39,7 @@ class UploadedFile implements UploadedFileInterface private $error; /** - * @var null|string + * @var string|null */ private $file; @@ -60,10 +60,10 @@ class UploadedFile implements UploadedFileInterface /** * @param StreamInterface|string|resource $streamOrFile - * @param int $size - * @param int $errorStatus - * @param string|null $clientFilename - * @param string|null $clientMediaType + * @param int $size + * @param int $errorStatus + * @param string|null $clientFilename + * @param string|null $clientMediaType */ public function __construct( $streamOrFile, @@ -144,7 +144,8 @@ class UploadedFile implements UploadedFileInterface /** * @param mixed $param - * @return boolean + * + * @return bool */ private function isStringOrNull($param) { @@ -153,7 +154,8 @@ class UploadedFile implements UploadedFileInterface /** * @param mixed $param - * @return boolean + * + * @return bool */ private function isStringNotEmpty($param) { @@ -195,7 +197,7 @@ class UploadedFile implements UploadedFileInterface /** * Return true if there is no upload error * - * @return boolean + * @return bool */ private function isOk() { @@ -203,7 +205,7 @@ class UploadedFile implements UploadedFileInterface } /** - * @return boolean + * @return bool */ public function isMoved() { @@ -248,10 +250,10 @@ class UploadedFile implements UploadedFileInterface * * @param string $targetPath Path to which to move the uploaded file. * - * @throws RuntimeException if the upload was not successful. + * @throws RuntimeException if the upload was not successful. * @throws InvalidArgumentException if the $path specified is invalid. - * @throws RuntimeException on any error during the move operation, or on - * the second or subsequent call to the method. + * @throws RuntimeException on any error during the move operation, or on + * the second or subsequent call to the method. */ public function moveTo($targetPath) { @@ -297,6 +299,7 @@ class UploadedFile implements UploadedFileInterface * {@inheritdoc} * * @see http://php.net/manual/en/features.file-upload.errors.php + * * @return int One of PHP's UPLOAD_ERR_XXX constants. */ public function getError() @@ -308,7 +311,7 @@ class UploadedFile implements UploadedFileInterface * {@inheritdoc} * * @return string|null The filename sent by the client or null if none - * was provided. + * was provided. */ public function getClientFilename() { diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php index a0d73917e..ab201c1d1 100644 --- a/vendor/guzzlehttp/psr7/src/Uri.php +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -67,7 +67,7 @@ class Uri implements UriInterface { // weak type check to also accept null until we can add scalar type hints if ($uri != '') { - $parts = parse_url($uri); + $parts = self::parse($uri); if ($parts === false) { throw new \InvalidArgumentException("Unable to parse URI: $uri"); } @@ -75,6 +75,49 @@ class Uri implements UriInterface } } + /** + * UTF-8 aware \parse_url() replacement. + * + * The internal function produces broken output for non ASCII domain names + * (IDN) when used with locales other than "C". + * + * On the other hand, cURL understands IDN correctly only when UTF-8 locale + * is configured ("C.UTF-8", "en_US.UTF-8", etc.). + * + * @see https://bugs.php.net/bug.php?id=52923 + * @see https://www.php.net/manual/en/function.parse-url.php#114817 + * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING + * + * @param string $url + * + * @return array|false + */ + private static function parse($url) + { + // If IPv6 + $prefix = ''; + if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { + $prefix = $matches[1]; + $url = $matches[2]; + } + + $encodedUrl = preg_replace_callback( + '%[^:/@?&=#]+%usD', + static function ($matches) { + return urlencode($matches[0]); + }, + $url + ); + + $result = parse_url($prefix.$encodedUrl); + + if ($result === false) { + return false; + } + + return array_map('urldecode', $result); + } + public function __toString() { return self::composeComponents( @@ -167,6 +210,7 @@ class Uri implements UriInterface * @param UriInterface $uri * * @return bool + * * @see Uri::isNetworkPathReference * @see Uri::isAbsolutePathReference * @see Uri::isRelativePathReference @@ -185,6 +229,7 @@ class Uri implements UriInterface * @param UriInterface $uri * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isNetworkPathReference(UriInterface $uri) @@ -200,6 +245,7 @@ class Uri implements UriInterface * @param UriInterface $uri * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isAbsolutePathReference(UriInterface $uri) @@ -218,6 +264,7 @@ class Uri implements UriInterface * @param UriInterface $uri * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isRelativePathReference(UriInterface $uri) @@ -238,6 +285,7 @@ class Uri implements UriInterface * @param UriInterface|null $base An optional base URI to compare against * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-4.4 */ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) @@ -358,6 +406,7 @@ class Uri implements UriInterface * @param array $parts * * @return UriInterface + * * @link http://php.net/manual/en/function.parse-url.php * * @throws \InvalidArgumentException If the components do not form a valid URI. @@ -576,7 +625,7 @@ class Uri implements UriInterface throw new \InvalidArgumentException('Scheme must be a string'); } - return strtolower($scheme); + return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); } /** @@ -612,7 +661,7 @@ class Uri implements UriInterface throw new \InvalidArgumentException('Host must be a string'); } - return strtolower($host); + return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); } /** @@ -641,7 +690,7 @@ class Uri implements UriInterface /** * @param UriInterface $uri * @param array $keys - * + * * @return array */ private static function getFilteredQueryString(UriInterface $uri, array $keys) @@ -662,7 +711,7 @@ class Uri implements UriInterface /** * @param string $key * @param string|null $value - * + * * @return string */ private static function generateQueryString($key, $value) @@ -754,7 +803,7 @@ class Uri implements UriInterface 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', E_USER_DEPRECATED ); - $this->path = '/'. $this->path; + $this->path = '/' . $this->path; //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); } } diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php index 2b9174a5e..81419ead4 100644 --- a/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -115,6 +115,7 @@ final class UriNormalizer * @param int $flags A bitmask of normalizations to apply, see constants * * @return UriInterface The normalized URI + * * @link https://tools.ietf.org/html/rfc3986#section-6.2 */ public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS) @@ -171,6 +172,7 @@ final class UriNormalizer * @param int $normalizations A bitmask of normalizations to apply, see constants * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-6.1 */ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php index 26cecd53a..a3cb15d57 100644 --- a/vendor/guzzlehttp/psr7/src/UriResolver.php +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -19,6 +19,7 @@ final class UriResolver * @param string $path * * @return string + * * @link http://tools.ietf.org/html/rfc3986#section-5.2.4 */ public static function removeDotSegments($path) @@ -58,6 +59,7 @@ final class UriResolver * @param UriInterface $rel Relative URI * * @return UriInterface + * * @link http://tools.ietf.org/html/rfc3986#section-5.2 */ public static function resolve(UriInterface $base, UriInterface $rel) diff --git a/vendor/guzzlehttp/psr7/src/Utils.php b/vendor/guzzlehttp/psr7/src/Utils.php index 86960dde2..7c7cc3eb6 100644 --- a/vendor/guzzlehttp/psr7/src/Utils.php +++ b/vendor/guzzlehttp/psr7/src/Utils.php @@ -75,6 +75,7 @@ final class Utils * @param StreamInterface $stream Stream to read * @param int $maxLen Maximum number of bytes to read. Pass -1 * to read the entire stream. + * * @return string * * @throws \RuntimeException on error. @@ -181,7 +182,7 @@ final class Utils $standardPorts = ['http' => 80, 'https' => 443]; $scheme = $changes['uri']->getScheme(); if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':'.$port; + $changes['set_headers']['Host'] .= ':' . $port; } } } @@ -202,7 +203,7 @@ final class Utils } if ($request instanceof ServerRequestInterface) { - return (new ServerRequest( + $new = (new ServerRequest( isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, @@ -216,6 +217,12 @@ final class Utils ->withQueryParams($request->getQueryParams()) ->withCookieParams($request->getCookieParams()) ->withUploadedFiles($request->getUploadedFiles()); + + foreach ($request->getAttributes() as $key => $value) { + $new = $new->withAttribute($key, $value); + } + + return $new; } return new Request( @@ -286,7 +293,7 @@ final class Utils * number of requested bytes are available. Any additional bytes will be * buffered and used in subsequent reads. * - * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data + * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data * @param array $options Additional options * * @return StreamInterface @@ -296,7 +303,7 @@ final class Utils public static function streamFor($resource = '', array $options = []) { if (is_scalar($resource)) { - $stream = fopen('php://temp', 'r+'); + $stream = self::tryFopen('php://temp', 'r+'); if ($resource !== '') { fwrite($stream, $resource); fseek($stream, 0); @@ -306,6 +313,16 @@ final class Utils switch (gettype($resource)) { case 'resource': + /* + * The 'php://input' is a special stream with quirks and inconsistencies. + * We avoid using that stream by reading it into php://temp + */ + if (\stream_get_meta_data($resource)['uri'] === 'php://input') { + $stream = self::tryFopen('php://temp', 'w+'); + fwrite($stream, stream_get_contents($resource)); + fseek($stream, 0); + $resource = $stream; + } return new Stream($resource, $options); case 'object': if ($resource instanceof StreamInterface) { @@ -324,7 +341,7 @@ final class Utils } break; case 'NULL': - return new Stream(fopen('php://temp', 'r+'), $options); + return new Stream(self::tryFopen('php://temp', 'r+'), $options); } if (is_callable($resource)) { @@ -352,14 +369,26 @@ final class Utils $ex = null; set_error_handler(function () use ($filename, $mode, &$ex) { $ex = new \RuntimeException(sprintf( - 'Unable to open %s using mode %s: %s', + 'Unable to open "%s" using mode "%s": %s', $filename, $mode, func_get_args()[1] )); + + return true; }); - $handle = fopen($filename, $mode); + try { + $handle = fopen($filename, $mode); + } catch (\Throwable $e) { + $ex = new \RuntimeException(sprintf( + 'Unable to open "%s" using mode "%s": %s', + $filename, + $mode, + $e->getMessage() + ), 0, $e); + } + restore_error_handler(); if ($ex) { diff --git a/vendor/guzzlehttp/psr7/src/functions.php b/vendor/guzzlehttp/psr7/src/functions.php index e4cc13619..b0901fadd 100644 --- a/vendor/guzzlehttp/psr7/src/functions.php +++ b/vendor/guzzlehttp/psr7/src/functions.php @@ -70,7 +70,7 @@ function uri_for($uri) * number of requested bytes are available. Any additional bytes will be * buffered and used in subsequent reads. * - * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data + * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data * @param array $options Additional options * * @return StreamInterface @@ -187,6 +187,7 @@ function try_fopen($filename, $mode) * @param StreamInterface $stream Stream to read * @param int $maxLen Maximum number of bytes to read. Pass -1 * to read the entire stream. + * * @return string * * @throws \RuntimeException on error. @@ -311,6 +312,7 @@ function parse_query($str, $urlEncoding = true) * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 * to encode using RFC3986, or PHP_QUERY_RFC1738 * to encode using RFC1738. + * * @return string * * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead. @@ -361,6 +363,7 @@ function mimetype_from_extension($extension) * @return array * * @internal + * * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead. */ function _parse_message($message) @@ -377,6 +380,7 @@ function _parse_message($message) * @return string * * @internal + * * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead. */ function _parse_request_uri($path, array $headers) @@ -409,6 +413,7 @@ function get_message_body_summary(MessageInterface $message, $truncateAt = 120) * @return array * * @internal + * * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead. */ function _caseless_remove($keys, array $data) diff --git a/vendor/phpmailer/phpmailer/README.md b/vendor/phpmailer/phpmailer/README.md index 45da2ec32..fa27d2f68 100644 --- a/vendor/phpmailer/phpmailer/README.md +++ b/vendor/phpmailer/phpmailer/README.md @@ -2,7 +2,7 @@ # PHPMailer – A full-featured email creation and transfer class for PHP -[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions) [![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![Latest Unstable Version](https://poser.pugx.org/phpmailer/phpmailer/v/unstable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/) +[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions) [![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/) ## Features - Probably the world's most popular code for sending email from PHP! @@ -142,7 +142,7 @@ PHPMailer defaults to English, but in the [language](https://github.com/PHPMaile $mail->setLanguage('fr', '/optional/path/to/language/directory/'); ``` -We welcome corrections and new languages – if you're looking for corrections to do, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations. +We welcome corrections and new languages – if you're looking for corrections, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations. ## Documentation Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated. @@ -185,12 +185,20 @@ git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained. ## Sponsorship -Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), the world's only privacy-first email marketing system. +Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), the world's only privacy-first email marketing system. Smartmessages.net privacy-first email marketing logo +Donations are very welcome, whether in beer 🍺, T-shirts 👕, or cold, hard cash 💰. Sponsorship through GitHub is a simple and convenient way to say "thank you" to PHPMailer's maintainers and contributors – just click the "Sponsor" button [on the project page](https://github.com/PHPMailer/PHPMailer). If your company uses PHPMailer, consider taking part in Tidelift's enterprise support programme. -Contributions are very welcome, whether in beer 🍺, T-shirts 👕, or cold, hard cash 💰. Sponsorship through GitHub is a simple and convenient way to say "thank you" to PHPMailer's maintainers and contributors – just click the "Sponsor" button [on the project page](https://github.com/PHPMailer/PHPMailer). +## PHPMailer For Enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of PHPMailer and thousands of other packages are working with Tidelift to deliver commercial +support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and +improve code health, while paying the maintainers of the exact packages you +use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-phpmailer?utm_source=packagist-phpmailer-phpmailer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) ## Changelog See [changelog](changelog.md). diff --git a/vendor/phpmailer/phpmailer/SECURITY.md b/vendor/phpmailer/phpmailer/SECURITY.md index fc3e61c20..2552df8a3 100644 --- a/vendor/phpmailer/phpmailer/SECURITY.md +++ b/vendor/phpmailer/phpmailer/SECURITY.md @@ -1,6 +1,6 @@ # Security notices relating to PHPMailer -Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately. +Please disclose any security issues or vulnerabilities found through [Tidelift's coordinated disclosure system](https://tidelift.com/security) or to the maintainers privately. PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security. diff --git a/vendor/phpmailer/phpmailer/VERSION b/vendor/phpmailer/phpmailer/VERSION index e7e42a4b5..c0be8a799 100644 --- a/vendor/phpmailer/phpmailer/VERSION +++ b/vendor/phpmailer/phpmailer/VERSION @@ -1 +1 @@ -6.3.0 \ No newline at end of file +6.4.0 \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/composer.json b/vendor/phpmailer/phpmailer/composer.json index 7388bd98b..b8aa5cfcc 100644 --- a/vendor/phpmailer/phpmailer/composer.json +++ b/vendor/phpmailer/phpmailer/composer.json @@ -40,7 +40,7 @@ "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { - "ext-mbstring": "Needed to send email in multibyte encoding charset", + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication", "psr/log": "For optional PSR-3 debug logging", diff --git a/vendor/phpmailer/phpmailer/get_oauth_token.php b/vendor/phpmailer/phpmailer/get_oauth_token.php index ad8c5a621..befdc34a5 100644 --- a/vendor/phpmailer/phpmailer/get_oauth_token.php +++ b/vendor/phpmailer/phpmailer/get_oauth_token.php @@ -48,10 +48,10 @@ use Stevenmaguire\OAuth2\Client\Provider\Microsoft; if (!isset($_GET['code']) && !isset($_GET['provider'])) { ?> -Select Provider:
-Google
-Yahoo
-Microsoft/Outlook/Hotmail/Live/Office365
+Select Provider:
+Google
+Yahoo
+Microsoft/Outlook/Hotmail/Live/Office365
+ * @author Miloš Milanović + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP greška: autentifikacija nije uspela.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP greška: povezivanje sa SMTP serverom nije uspelo.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP greška: podaci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznato kodiranje: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP greška: slanje sa sledećih adresa nije uspelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP greška: slanje na sledeće adrese nije uspelo: '; +$PHPMAILER_LANG['instantiate'] = 'Nije moguće pokrenuti mail funkciju.'; +$PHPMAILER_LANG['invalid_address'] = 'Poruka nije poslata. Neispravna adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' majler nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definišite bar jednu adresu primaoca.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Povezivanje sa SMTP serverom nije uspelo.'; +$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP servera: '; +$PHPMAILER_LANG['variable_set'] = 'Nije moguće zadati niti resetovati promenljivu: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: '; diff --git a/vendor/phpmailer/phpmailer/src/PHPMailer.php b/vendor/phpmailer/phpmailer/src/PHPMailer.php index 62553fd46..1a65cfd8d 100644 --- a/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -748,7 +748,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.3.0'; + const VERSION = '6.4.0'; /** * Error severity: message only, continue processing. @@ -1199,7 +1199,11 @@ class PHPMailer ) ) { //Decode the name part if it's present and encoded - if (property_exists($address, 'personal') && preg_match('/^=\?.*\?=$/', $address->personal)) { + if ( + property_exists($address, 'personal') && + extension_loaded('mbstring') && + preg_match('/^=\?.*\?=$/', $address->personal) + ) { $address->personal = mb_decode_mimeheader($address->personal); } @@ -1680,16 +1684,11 @@ class PHPMailer //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html //Example problem: https://www.drupal.org/node/1057954 - //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. - if ('' === $this->Sender) { - $this->Sender = $this->From; - } if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. - //But sendmail requires this param, so fail without it if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) { if ($this->Mailer === 'qmail') { $sendmailFmt = '%s -f%s'; @@ -1697,8 +1696,12 @@ class PHPMailer $sendmailFmt = '%s -oi -f%s -t'; } } else { - $this->edebug('Sender address unusable or missing: ' . $this->Sender); - return false; + //allow sendmail to choose a default envelope sender. It may + //seem preferable to force it to use the From header as with + //SMTP, but that introduces new problems (see + //), and + //it has historically worked this way. + $sendmailFmt = '%s -oi -t'; } $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); @@ -1858,9 +1861,6 @@ class PHPMailer //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html //Example problem: https://www.drupal.org/node/1057954 //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. - if ('' === $this->Sender) { - $this->Sender = $this->From; - } if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); diff --git a/vendor/phpmailer/phpmailer/src/POP3.php b/vendor/phpmailer/phpmailer/src/POP3.php index 0c2059069..9bd319865 100644 --- a/vendor/phpmailer/phpmailer/src/POP3.php +++ b/vendor/phpmailer/phpmailer/src/POP3.php @@ -46,7 +46,7 @@ class POP3 * * @var string */ - const VERSION = '6.3.0'; + const VERSION = '6.4.0'; /** * Default POP3 port number. diff --git a/vendor/phpmailer/phpmailer/src/SMTP.php b/vendor/phpmailer/phpmailer/src/SMTP.php index 68f3aeccc..9d85929dd 100644 --- a/vendor/phpmailer/phpmailer/src/SMTP.php +++ b/vendor/phpmailer/phpmailer/src/SMTP.php @@ -35,7 +35,7 @@ class SMTP * * @var string */ - const VERSION = '6.3.0'; + const VERSION = '6.4.0'; /** * SMTP line break constant. @@ -553,6 +553,8 @@ class SMTP } //Send encoded username and password if ( + //Format from https://tools.ietf.org/html/rfc4616#section-2 + //We skip the first field (it's forgery), so the string starts with a null byte !$this->sendCommand( 'User & Password', base64_encode("\0" . $username . "\0" . $password), diff --git a/vendor/stripe/stripe-php/CHANGELOG.md b/vendor/stripe/stripe-php/CHANGELOG.md index 4004bcd7f..51c39dfc0 100644 --- a/vendor/stripe/stripe-php/CHANGELOG.md +++ b/vendor/stripe/stripe-php/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 7.76.0 - 2021-03-22 +* [#1100](https://github.com/stripe/stripe-php/pull/1100) Update PHPDocs + * Added support for `amount_shipping` on `Checkout.Session.total_details` +* [#1088](https://github.com/stripe/stripe-php/pull/1088) Make possibility to extend CurlClient + ## 7.75.0 - 2021-02-22 * [#1094](https://github.com/stripe/stripe-php/pull/1094) Add support for Billing Portal Configuration API diff --git a/vendor/stripe/stripe-php/VERSION b/vendor/stripe/stripe-php/VERSION index 547bef6c7..d7e7a341b 100644 --- a/vendor/stripe/stripe-php/VERSION +++ b/vendor/stripe/stripe-php/VERSION @@ -1 +1 @@ -7.75.0 +7.76.0 diff --git a/vendor/stripe/stripe-php/lib/Account.php b/vendor/stripe/stripe-php/lib/Account.php index bc752fdad..669b1003b 100644 --- a/vendor/stripe/stripe-php/lib/Account.php +++ b/vendor/stripe/stripe-php/lib/Account.php @@ -24,7 +24,7 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that Stripe supports in the account's country. * @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. - * @property null|string $email The primary user's email address. + * @property null|string $email An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. * @property \Stripe\Collection $external_accounts External accounts (bank accounts and debit cards) currently attached to this account * @property \Stripe\Person $individual

This is an object representing a person associated with a Stripe account.

A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.

Related guide: Handling Identity Verification with the API.

* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. diff --git a/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php b/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php index b82451857..bae042897 100644 --- a/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php +++ b/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php @@ -26,15 +26,15 @@ if (!\defined('CURL_HTTP_VERSION_2TLS')) { class CurlClient implements ClientInterface { - private static $instance; + protected static $instance; public static function instance() { - if (!self::$instance) { - self::$instance = new self(); + if (!static::$instance) { + static::$instance = new static(); } - return self::$instance; + return static::$instance; } protected $defaultOptions; diff --git a/vendor/stripe/stripe-php/lib/Invoice.php b/vendor/stripe/stripe-php/lib/Invoice.php index ff0e5c623..455d7c8e0 100644 --- a/vendor/stripe/stripe-php/lib/Invoice.php +++ b/vendor/stripe/stripe-php/lib/Invoice.php @@ -59,7 +59,7 @@ namespace Stripe; * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|\Stripe\StripeObject[] $custom_fields Custom fields displayed on the invoice. - * @property string|\Stripe\Customer $customer The ID of the customer who will be billed. + * @property null|string|\Stripe\Customer $customer The ID of the customer who will be billed. * @property null|\Stripe\StripeObject $customer_address The customer's address. Until the invoice is finalized, this field will equal customer.address. Once the invoice is finalized, this field will no longer be updated. * @property null|string $customer_email The customer's email. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated. * @property null|string $customer_name The customer's name. Until the invoice is finalized, this field will equal customer.name. Once the invoice is finalized, this field will no longer be updated. diff --git a/vendor/stripe/stripe-php/lib/Price.php b/vendor/stripe/stripe-php/lib/Price.php index a7893b577..4ac5bd33c 100644 --- a/vendor/stripe/stripe-php/lib/Price.php +++ b/vendor/stripe/stripe-php/lib/Price.php @@ -32,7 +32,7 @@ namespace Stripe; * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - * @property null|string $nickname A brief description of the plan, hidden from customers. + * @property null|string $nickname A brief description of the price, hidden from customers. * @property string|\Stripe\Product $product The ID of the product this price is associated with. * @property null|\Stripe\StripeObject $recurring The recurring components of a price such as interval and usage_type. * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. diff --git a/vendor/stripe/stripe-php/lib/Product.php b/vendor/stripe/stripe-php/lib/Product.php index 5afe1f137..265326a88 100644 --- a/vendor/stripe/stripe-php/lib/Product.php +++ b/vendor/stripe/stripe-php/lib/Product.php @@ -30,13 +30,13 @@ namespace Stripe; * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property string $name The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. - * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own package_dimensions. Only applicable to products of type=good. - * @property null|bool $shippable Whether this product is a shipped good. Only applicable to products of type=good. + * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes. + * @property null|bool $shippable Whether this product is shipped (i.e., physical goods). * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. * @property string $type The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans. * @property null|string $unit_label A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. - * @property null|string $url A URL of a publicly-accessible webpage for this product. Only applicable to products of type=good. + * @property null|string $url A URL of a publicly-accessible webpage for this product. */ class Product extends ApiResource { diff --git a/vendor/stripe/stripe-php/lib/Stripe.php b/vendor/stripe/stripe-php/lib/Stripe.php index 2f70e46a6..53f362d31 100644 --- a/vendor/stripe/stripe-php/lib/Stripe.php +++ b/vendor/stripe/stripe-php/lib/Stripe.php @@ -58,7 +58,7 @@ class Stripe /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '7.75.0'; + const VERSION = '7.76.0'; /** * @return string the API key used for requests