Update vendorja, restavrirana datoteka za socialna omrezja, popravki SN - V DELU

This commit is contained in:
pero1203 2021-04-02 10:09:23 +02:00
parent e8c3008974
commit 5d59f32c17
53 changed files with 1265 additions and 320 deletions

View File

@ -2029,7 +2029,7 @@ class SurveyAdmin
// Zavihki PODATKI // Zavihki PODATKI
elseif($_GET['a'] == 'data'){ elseif($_GET['a'] == 'data'){
if(!isset($_GET['m'])){ if(!isset($_GET['m']) || $_GET['m'] == 'view'){
$podstran = 'data'; $podstran = 'data';
} }
elseif($_GET['m'] == 'quick_edit'){ elseif($_GET['m'] == 'quick_edit'){

View File

@ -0,0 +1,615 @@
<?php
/**
* Created on Dec.2010
*
* @author: Gorazd Vesleič
*
* @desc: za kreacijo datoteke s podatki za SN (Alterji)
* Datoteko z alterji skreira iz obstoječe datoteke s podatki
*
* funkcije:
* - Init() - inicializacija
*
* CHANGELOG:
* - 9.12.2011
* Po novem bo potrebno ločit tabele za vsak SN loop. Zato se bo kreiralo tudi več datotek (koliko je pač glavnih loopov)
* Hkrati je potrebno navest za kateri krog atunučuja gre :)
* zato je na začetek dodana funkcija ki prešteje loope
*/
#KONSTANTE
define(EXPORT_FOLDER, "admin/survey/SurveyData");
DEFINE (STR_DLMT, "|");
class SurveySNDataFile {
private $surveyId = null; # Id ankete
private $folder = null; # pot do datotek s podatki
private $_HEADERS = null; # Header podatki
private $headFileName = null; # pot do header fajla
private $dataFileName = null; # pot do data fajla
private $dataFileStatus = null; # status data datoteke
private $SDF = null; # class za inkrementalno dodajanje fajlov
private $sn_loop_parents = null; #glavni loopi
private $sn_loop_spremenljivke = null; # loopi po spremenljivkah
private $sn_loop_data = null; # ime loop variable, antonucci...
private $snCreateFullTable = true; # Ali prikazujemo celotno tabelo
private $_VARS = array();
function __construct ($sid) {
# nastavimo privzeto pot do folderjev
global $site_path, $global_user_id;
$this->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 '<label><input id="snCreateFullTable" name="snCreateFullTable" onclick="setSnDisplayFullTableCheckbox();" type="checkbox"'.($this->snCreateFullTable==true?' checked="checked"':'').'>Prikaži razširjeno tabelo</label>';
}
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 '<div id="tableContainer" class="tableContainer">';
echo '<h3>'.$lang['srv_loop_for_variable'].' <b>['. $this->sn_loop_data[$lpid]['variable']. '] - '. $this->sn_loop_data[$lpid]['naslov']. '</b> ('.$lang['srv_loop_antonucci_circle'].' '.$this->sn_loop_data[$lpid]['antonucci'].')</h3>';
echo '<table id="dataTable" border="0" cellpadding="0" cellspacing="0" width="100%" class="scrollTable no_wrap_td social_network">';
echo '<thead class="fixedHeader">';
echo '<tr>';
# dodamo skrit stolpec uid
echo '<th class="data_uid">&nbsp;</th>';
$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 '<th colspan="'.$spremenljivka['cnt_all'].'" title="'.$spremenljivka['naslov'].'">';
echo '<div class="headerCell">'.$spremenljivka['naslov'].'</div>';
echo '</th>';
#}
}
$spr_cont++;
#}
} #end foreach $SN_HEADER AS $spid => $spremenljivka
# nova vrstica
echo '</tr><tr>';
# dodamo skrit stolpec uid
echo '<th class="data_uid">&nbsp;</th>';
$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 '<th colspan="'.$grid['cnt_vars'].'" title="'.$grid['naslov'].'">';
echo '<div class="headerCell">'.$grid['naslov'].'</div>';
echo '</th>';
}
}
#}
}
$spr_cont++;
#}
}
# nova vrstica
echo '</tr><tr>';
## dodamo skrit stolpec uid
echo '<th class="data_uid">&nbsp;</th>';
$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 '<th title="'.$variable['naslov'].($variable['other'] ? '&nbsp;(text)' : '').'">';
echo '<div class="dataCell">'.$variable['naslov'];
if ($variable['other'] == 1) {
echo '&nbsp;(text)';
}
/*// urejanje kalkulacije -- izracunane vrednosti v podatkih
if ($spremenljivka['tip'] == 22) {
echo ' <a href="" onclick="calculation_editing(\'-'.substr($spid, 0, strpos($spid, '_')).'\'); return false;">('.$lang['edit3'].')</a>';
}*/
echo '</div>';
echo '</th>';
}
}
} # end foreach
} #end if
# }
}
$spr_cont++;
#}
}
echo'</tr>';
echo '</thead>';
echo '</div>';
# dodamo podatke
if (file_exists($_sn_filename)) {
// zamenjamo | z </td><td>
if (IS_WINDOWS) {
$cmdLn3 = 'sed "s*'.STR_DLMT.'*</td><td>*g" '.$_sn_filename.' > '.$_sn_tmp1;
} else {
$cmdLn3 = 'sed \'s*'.STR_DLMT.'*</td><td>*g\' '.$_sn_filename.' > '.$_sn_tmp1;
}
$out3 = shell_exec($cmdLn3);
echo '<tbody class="scrollContent">';
$file_handler = fopen ($_sn_tmp1, 'r');
while ($line= fgets ($file_handler)) {
echo '<tr>';
echo '<td class="data_uid">'.$line.'</td></tr>';
}
echo '</tbody>';
echo '</table>';
echo '</div>';
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;
}
}
?>

53
composer.lock generated
View File

@ -308,16 +308,16 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "1.7.0", "version": "1.8.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1",
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -375,7 +375,7 @@
"uri", "uri",
"url" "url"
], ],
"time": "2020-09-30 07:37:11" "time": "2021-03-21 16:25:00"
}, },
{ {
"name": "maxmind-db/reader", "name": "maxmind-db/reader",
@ -753,20 +753,21 @@
"homepage": "https://github.com/paypal/paypalhttp_php/contributors" "homepage": "https://github.com/paypal/paypalhttp_php/contributors"
} }
], ],
"abandoned": true,
"time": "2019-11-06 21:27:12" "time": "2019-11-06 21:27:12"
}, },
{ {
"name": "phpmailer/phpmailer", "name": "phpmailer/phpmailer",
"version": "v6.3.0", "version": "v6.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git", "url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb" "reference": "050d430203105c27c30efd1dce7aa421ad882d01"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb", "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/050d430203105c27c30efd1dce7aa421ad882d01",
"reference": "4a08cf4cdd2c38d12ee2b9fa69e5d235f37a6dcb", "reference": "050d430203105c27c30efd1dce7aa421ad882d01",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -784,7 +785,7 @@
"yoast/phpunit-polyfills": "^0.2.0" "yoast/phpunit-polyfills": "^0.2.0"
}, },
"suggest": { "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", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging", "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", "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", "name": "psr/http-message",
@ -1021,16 +1022,16 @@
}, },
{ {
"name": "stripe/stripe-php", "name": "stripe/stripe-php",
"version": "v7.75.0", "version": "v7.76.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/stripe/stripe-php.git", "url": "https://github.com/stripe/stripe-php.git",
"reference": "d377a667cd789b99ccab768441a5a2160cc4ea80" "reference": "47e66d4186712be33c593fe820dccf270a04d5d6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/d377a667cd789b99ccab768441a5a2160cc4ea80", "url": "https://api.github.com/repos/stripe/stripe-php/zipball/47e66d4186712be33c593fe820dccf270a04d5d6",
"reference": "d377a667cd789b99ccab768441a5a2160cc4ea80", "reference": "47e66d4186712be33c593fe820dccf270a04d5d6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1074,7 +1075,7 @@
"payment processing", "payment processing",
"stripe" "stripe"
], ],
"time": "2021-02-22 14:31:21" "time": "2021-03-22 16:50:21"
}, },
{ {
"name": "symfony/polyfill-intl-idn", "name": "symfony/polyfill-intl-idn",
@ -1912,16 +1913,16 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "filp/whoops", "name": "filp/whoops",
"version": "2.10.0", "version": "2.12.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/filp/whoops.git", "url": "https://github.com/filp/whoops.git",
"reference": "6ecda5217bf048088b891f7403b262906be5a957" "reference": "d501fd2658d55491a2295ff600ae5978eaad7403"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/6ecda5217bf048088b891f7403b262906be5a957", "url": "https://api.github.com/repos/filp/whoops/zipball/d501fd2658d55491a2295ff600ae5978eaad7403",
"reference": "6ecda5217bf048088b891f7403b262906be5a957", "reference": "d501fd2658d55491a2295ff600ae5978eaad7403",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1969,7 +1970,7 @@
"throwable", "throwable",
"whoops" "whoops"
], ],
"time": "2021-03-16 12:00:00" "time": "2021-03-30 12:00:00"
}, },
{ {
"name": "kint-php/kint", "name": "kint-php/kint",
@ -2261,16 +2262,16 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v4.4.20", "version": "v4.4.21",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "a1eab2f69906dc83c5ddba4632180260d0ab4f7f" "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/a1eab2f69906dc83c5ddba4632180260d0ab4f7f", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0da0e174f728996f5d5072d6a9f0a42259dbc806",
"reference": "a1eab2f69906dc83c5ddba4632180260d0ab4f7f", "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2329,7 +2330,7 @@
"debug", "debug",
"dump" "dump"
], ],
"time": "2021-01-27 09:09:26" "time": "2021-03-27 19:49:03"
} }
], ],
"aliases": [], "aliases": [],

View File

@ -971,6 +971,7 @@ return array(
'SurveyRecoding' => $baseDir . '/admin/survey/classes/class.SurveyRecoding.php', 'SurveyRecoding' => $baseDir . '/admin/survey/classes/class.SurveyRecoding.php',
'SurveyReminderTracking' => $baseDir . '/admin/survey/classes/class.SurveyReminderTracking.php', 'SurveyReminderTracking' => $baseDir . '/admin/survey/classes/class.SurveyReminderTracking.php',
'SurveyRespondents' => $baseDir . '/admin/survey/classes/class.SurveyRespondents.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', 'SurveySession' => $baseDir . '/admin/survey/classes/class.SurveySession.php',
'SurveySessionDestructor' => $baseDir . '/admin/survey/classes/class.SurveySession.php', 'SurveySessionDestructor' => $baseDir . '/admin/survey/classes/class.SurveySession.php',
'SurveySetting' => $baseDir . '/admin/survey/classes/class.SurveySetting.php', 'SurveySetting' => $baseDir . '/admin/survey/classes/class.SurveySetting.php',

View File

@ -10,9 +10,9 @@ return array(
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php', '3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.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', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'2bf0564df058fbe21b5554296cc8571a' => $baseDir . '/main/survey/class.EvalvacijaMain.php', '2bf0564df058fbe21b5554296cc8571a' => $baseDir . '/main/survey/class.EvalvacijaMain.php',
'5bc35216aa4f6cb823ce4a5cec52fdce' => $baseDir . '/main/survey/mobile-detect/Mobile_Detect.php', '5bc35216aa4f6cb823ce4a5cec52fdce' => $baseDir . '/main/survey/mobile-detect/Mobile_Detect.php',

View File

@ -11,9 +11,9 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php', '3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.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', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'2bf0564df058fbe21b5554296cc8571a' => __DIR__ . '/../..' . '/main/survey/class.EvalvacijaMain.php', '2bf0564df058fbe21b5554296cc8571a' => __DIR__ . '/../..' . '/main/survey/class.EvalvacijaMain.php',
'5bc35216aa4f6cb823ce4a5cec52fdce' => __DIR__ . '/../..' . '/main/survey/mobile-detect/Mobile_Detect.php', '5bc35216aa4f6cb823ce4a5cec52fdce' => __DIR__ . '/../..' . '/main/survey/mobile-detect/Mobile_Detect.php',
@ -1175,6 +1175,7 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
'SurveyRecoding' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyRecoding.php', 'SurveyRecoding' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyRecoding.php',
'SurveyReminderTracking' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyReminderTracking.php', 'SurveyReminderTracking' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyReminderTracking.php',
'SurveyRespondents' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyRespondents.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', 'SurveySession' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySession.php',
'SurveySessionDestructor' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySession.php', 'SurveySessionDestructor' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySession.php',
'SurveySetting' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySetting.php', 'SurveySetting' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySetting.php',

View File

@ -58,74 +58,6 @@
"google authenticator" "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", "name": "web-token/jwt-util-ecc",
"version": "v1.3.10", "version": "v1.3.10",
@ -1131,79 +1063,6 @@
"response" "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", "name": "symfony/polyfill-php72",
"version": "v1.22.1", "version": "v1.22.1",
@ -1533,65 +1392,6 @@
"web" "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", "name": "composer/ca-bundle",
"version": "1.2.9", "version": "1.2.9",
@ -1856,7 +1656,8 @@
"name": "PayPal", "name": "PayPal",
"homepage": "https://github.com/paypal/paypalhttp_php/contributors" "homepage": "https://github.com/paypal/paypalhttp_php/contributors"
} }
] ],
"abandoned": true
}, },
{ {
"name": "paypal/paypal-checkout-sdk", "name": "paypal/paypal-checkout-sdk",
@ -1961,5 +1762,205 @@
"keywords": [ "keywords": [
"promise" "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"
]
} }
] ]

View File

@ -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

View File

@ -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

View File

@ -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

56
vendor/guzzlehttp/psr7/.php_cs.dist vendored Normal file
View File

@ -0,0 +1,56 @@
<?php
$config = PhpCsFixer\Config::create()
->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;

View File

@ -9,6 +9,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased] ## [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 ## [1.7.0] - 2020-09-30
### Added ### Added

View File

@ -8,6 +8,8 @@ use Psr\Http\Message\StreamInterface;
* Reads from multiple streams, one after the other. * Reads from multiple streams, one after the other.
* *
* This is a read-only stream decorator. * This is a read-only stream decorator.
*
* @final
*/ */
class AppendStream implements StreamInterface class AppendStream implements StreamInterface
{ {

View File

@ -11,6 +11,8 @@ use Psr\Http\Message\StreamInterface;
* This stream returns a "hwm" metadata value that tells upstream consumers * This stream returns a "hwm" metadata value that tells upstream consumers
* what the configured high water mark of the stream is, or the maximum * what the configured high water mark of the stream is, or the maximum
* preferred size of the buffer. * preferred size of the buffer.
*
* @final
*/ */
class BufferStream implements StreamInterface class BufferStream implements StreamInterface
{ {

View File

@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
/** /**
* Stream decorator that can cache previously read bytes from a sequentially * Stream decorator that can cache previously read bytes from a sequentially
* read stream. * read stream.
*
* @final
*/ */
class CachingStream implements StreamInterface class CachingStream implements StreamInterface
{ {
@ -21,7 +23,7 @@ class CachingStream implements StreamInterface
/** /**
* We will treat the buffer object as the body of the stream * 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 * @param StreamInterface $target Optionally specify where data is cached
*/ */
public function __construct( public function __construct(
@ -29,7 +31,7 @@ class CachingStream implements StreamInterface
StreamInterface $target = null StreamInterface $target = null
) { ) {
$this->remoteStream = $stream; $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() public function getSize()

View File

@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
/** /**
* Stream decorator that begins dropping data once the size of the underlying * Stream decorator that begins dropping data once the size of the underlying
* stream becomes too full. * stream becomes too full.
*
* @final
*/ */
class DroppingStream implements StreamInterface class DroppingStream implements StreamInterface
{ {

View File

@ -9,6 +9,8 @@ use Psr\Http\Message\StreamInterface;
* *
* Allows for easy testing and extension of a provided stream without needing * Allows for easy testing and extension of a provided stream without needing
* to create a concrete class for a simple extension point. * to create a concrete class for a simple extension point.
*
* @final
*/ */
class FnStream implements StreamInterface 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. * An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
*
* @throws \LogicException * @throws \LogicException
*/ */
public function __wakeup() public function __wakeup()

View File

@ -14,6 +14,8 @@ use Psr\Http\Message\StreamInterface;
* *
* @link http://tools.ietf.org/html/rfc1952 * @link http://tools.ietf.org/html/rfc1952
* @link http://php.net/manual/en/filters.compression.php * @link http://php.net/manual/en/filters.compression.php
*
* @final
*/ */
class InflateStream implements StreamInterface class InflateStream implements StreamInterface
{ {
@ -34,6 +36,7 @@ class InflateStream implements StreamInterface
/** /**
* @param StreamInterface $stream * @param StreamInterface $stream
* @param $header * @param $header
*
* @return int * @return int
*/ */
private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)

View File

@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
/** /**
* Lazily reads or writes to a file that is opened only after an IO operation * Lazily reads or writes to a file that is opened only after an IO operation
* take place on the stream. * take place on the stream.
*
* @final
*/ */
class LazyOpenStream implements StreamInterface class LazyOpenStream implements StreamInterface
{ {
@ -15,7 +17,7 @@ class LazyOpenStream implements StreamInterface
/** @var string File to open */ /** @var string File to open */
private $filename; private $filename;
/** @var string $mode */ /** @var string */
private $mode; private $mode;
/** /**

View File

@ -4,9 +4,10 @@ namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface; 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 class LimitStream implements StreamInterface
{ {

View File

@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
/** /**
* Stream that when read returns bytes for a streaming multipart or * Stream that when read returns bytes for a streaming multipart or
* multipart/form-data stream. * multipart/form-data stream.
*
* @final
*/ */
class MultipartStream implements StreamInterface class MultipartStream implements StreamInterface
{ {
@ -115,9 +117,11 @@ class MultipartStream implements StreamInterface
$disposition = $this->getHeader($headers, 'content-disposition'); $disposition = $this->getHeader($headers, 'content-disposition');
if (!$disposition) { if (!$disposition) {
$headers['Content-Disposition'] = ($filename === '0' || $filename) $headers['Content-Disposition'] = ($filename === '0' || $filename)
? sprintf('form-data; name="%s"; filename="%s"', ? sprintf(
'form-data; name="%s"; filename="%s"',
$name, $name,
basename($filename)) basename($filename)
)
: "form-data; name=\"{$name}\""; : "form-data; name=\"{$name}\"";
} }

View File

@ -5,7 +5,9 @@ namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface; 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 class NoSeekStream implements StreamInterface
{ {

View File

@ -13,6 +13,8 @@ use Psr\Http\Message\StreamInterface;
* returned by the provided callable is buffered internally until drained using * returned by the provided callable is buffered internally until drained using
* the read() function of the PumpStream. The provided callable MUST return * the read() function of the PumpStream. The provided callable MUST return
* false when there is no more data to read. * false when there is no more data to read.
*
* @final
*/ */
class PumpStream implements StreamInterface class PumpStream implements StreamInterface
{ {
@ -32,14 +34,14 @@ class PumpStream implements StreamInterface
private $buffer; private $buffer;
/** /**
* @param callable $source Source of the stream data. The callable MAY * @param callable $source Source of the stream data. The callable MAY
* accept an integer argument used to control the * accept an integer argument used to control the
* amount of data to return. The callable MUST * amount of data to return. The callable MUST
* return a string when called, or false on error * return a string when called, or false on error
* or EOF. * or EOF.
* @param array $options Stream options: * @param array $options Stream options:
* - metadata: Hash of metadata to use with stream. * - metadata: Hash of metadata to use with stream.
* - size: Size of the stream, if known. * - size: Size of the stream, if known.
*/ */
public function __construct(callable $source, array $options = []) public function __construct(callable $source, array $options = [])
{ {

View File

@ -34,7 +34,9 @@ final class Query
} elseif ($urlEncoding === PHP_QUERY_RFC1738) { } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
$decoder = 'urldecode'; $decoder = 'urldecode';
} else { } else {
$decoder = function ($str) { return $str; }; $decoder = function ($str) {
return $str;
};
} }
foreach (explode('&', $str) as $kvp) { 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 * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
* to encode using RFC3986, or PHP_QUERY_RFC1738 * to encode using RFC3986, or PHP_QUERY_RFC1738
* to encode using RFC1738. * to encode using RFC1738.
*
* @return string * @return string
*/ */
public static function build(array $params, $encoding = PHP_QUERY_RFC3986) public static function build(array $params, $encoding = PHP_QUERY_RFC3986)
@ -74,7 +77,9 @@ final class Query
} }
if ($encoding === false) { if ($encoding === false) {
$encoder = function ($str) { return $str; }; $encoder = function ($str) {
return $str;
};
} elseif ($encoding === PHP_QUERY_RFC3986) { } elseif ($encoding === PHP_QUERY_RFC3986) {
$encoder = 'rawurlencode'; $encoder = 'rawurlencode';
} elseif ($encoding === PHP_QUERY_RFC1738) { } elseif ($encoding === PHP_QUERY_RFC1738) {

View File

@ -17,7 +17,7 @@ class Request implements RequestInterface
/** @var string */ /** @var string */
private $method; private $method;
/** @var null|string */ /** @var string|null */
private $requestTarget; private $requestTarget;
/** @var UriInterface */ /** @var UriInterface */
@ -27,7 +27,7 @@ class Request implements RequestInterface
* @param string $method HTTP method * @param string $method HTTP method
* @param string|UriInterface $uri URI * @param string|UriInterface $uri URI
* @param array $headers Request headers * @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 string $version Protocol version
*/ */
public function __construct( public function __construct(

View File

@ -83,7 +83,7 @@ class Response implements ResponseInterface
/** /**
* @param int $status Status code * @param int $status Status code
* @param array $headers Response headers * @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 $version Protocol version
* @param string|null $reason Reason phrase (when empty a default will be used based on the status code) * @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
*/ */

View File

@ -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. * 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 * @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 * @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"; const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";

View File

@ -4,9 +4,9 @@ namespace GuzzleHttp\Psr7;
use InvalidArgumentException; use InvalidArgumentException;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UriInterface;
use Psr\Http\Message\StreamInterface; use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\UploadedFileInterface; use Psr\Http\Message\UploadedFileInterface;
use Psr\Http\Message\UriInterface;
/** /**
* Server-side HTTP request * Server-side HTTP request
@ -35,7 +35,7 @@ class ServerRequest extends Request implements ServerRequestInterface
private $cookieParams = []; private $cookieParams = [];
/** /**
* @var null|array|object * @var array|object|null
*/ */
private $parsedBody; private $parsedBody;
@ -58,7 +58,7 @@ class ServerRequest extends Request implements ServerRequestInterface
* @param string $method HTTP method * @param string $method HTTP method
* @param string|UriInterface $uri URI * @param string|UriInterface $uri URI
* @param array $headers Request headers * @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 string $version Protocol version
* @param array $serverParams Typically the $_SERVER superglobal * @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. * delegate to normalizeNestedFileSpec() and return that return value.
* *
* @param array $value $_FILES struct * @param array $value $_FILES struct
*
* @return array|UploadedFileInterface * @return array|UploadedFileInterface
*/ */
private static function createUploadedFileFromSpec(array $value) private static function createUploadedFileFromSpec(array $value)
@ -135,6 +136,7 @@ class ServerRequest extends Request implements ServerRequestInterface
* UploadedFileInterface instances. * UploadedFileInterface instances.
* *
* @param array $files * @param array $files
*
* @return UploadedFileInterface[] * @return UploadedFileInterface[]
*/ */
private static function normalizeNestedFileSpec(array $files = []) private static function normalizeNestedFileSpec(array $files = [])
@ -184,7 +186,7 @@ class ServerRequest extends Request implements ServerRequestInterface
private static function extractHostAndPortFromAuthority($authority) private static function extractHostAndPortFromAuthority($authority)
{ {
$uri = 'http://'.$authority; $uri = 'http://' . $authority;
$parts = parse_url($uri); $parts = parse_url($uri);
if (false === $parts) { if (false === $parts) {
return [null, null]; return [null, null];
@ -245,7 +247,6 @@ class ServerRequest extends Request implements ServerRequestInterface
return $uri; return $uri;
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@ -6,6 +6,7 @@ use Psr\Http\Message\StreamInterface;
/** /**
* Stream decorator trait * Stream decorator trait
*
* @property StreamInterface stream * @property StreamInterface stream
*/ */
trait StreamDecoratorTrait trait StreamDecoratorTrait

View File

@ -6,6 +6,8 @@ use Psr\Http\Message\StreamInterface;
/** /**
* Converts Guzzle streams into PHP stream resources. * Converts Guzzle streams into PHP stream resources.
*
* @final
*/ */
class StreamWrapper class StreamWrapper
{ {

View File

@ -39,7 +39,7 @@ class UploadedFile implements UploadedFileInterface
private $error; private $error;
/** /**
* @var null|string * @var string|null
*/ */
private $file; private $file;
@ -60,10 +60,10 @@ class UploadedFile implements UploadedFileInterface
/** /**
* @param StreamInterface|string|resource $streamOrFile * @param StreamInterface|string|resource $streamOrFile
* @param int $size * @param int $size
* @param int $errorStatus * @param int $errorStatus
* @param string|null $clientFilename * @param string|null $clientFilename
* @param string|null $clientMediaType * @param string|null $clientMediaType
*/ */
public function __construct( public function __construct(
$streamOrFile, $streamOrFile,
@ -144,7 +144,8 @@ class UploadedFile implements UploadedFileInterface
/** /**
* @param mixed $param * @param mixed $param
* @return boolean *
* @return bool
*/ */
private function isStringOrNull($param) private function isStringOrNull($param)
{ {
@ -153,7 +154,8 @@ class UploadedFile implements UploadedFileInterface
/** /**
* @param mixed $param * @param mixed $param
* @return boolean *
* @return bool
*/ */
private function isStringNotEmpty($param) private function isStringNotEmpty($param)
{ {
@ -195,7 +197,7 @@ class UploadedFile implements UploadedFileInterface
/** /**
* Return true if there is no upload error * Return true if there is no upload error
* *
* @return boolean * @return bool
*/ */
private function isOk() private function isOk()
{ {
@ -203,7 +205,7 @@ class UploadedFile implements UploadedFileInterface
} }
/** /**
* @return boolean * @return bool
*/ */
public function isMoved() public function isMoved()
{ {
@ -248,10 +250,10 @@ class UploadedFile implements UploadedFileInterface
* *
* @param string $targetPath Path to which to move the uploaded file. * @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 InvalidArgumentException if the $path specified is invalid.
* @throws RuntimeException on any error during the move operation, or on * @throws RuntimeException on any error during the move operation, or on
* the second or subsequent call to the method. * the second or subsequent call to the method.
*/ */
public function moveTo($targetPath) public function moveTo($targetPath)
{ {
@ -297,6 +299,7 @@ class UploadedFile implements UploadedFileInterface
* {@inheritdoc} * {@inheritdoc}
* *
* @see http://php.net/manual/en/features.file-upload.errors.php * @see http://php.net/manual/en/features.file-upload.errors.php
*
* @return int One of PHP's UPLOAD_ERR_XXX constants. * @return int One of PHP's UPLOAD_ERR_XXX constants.
*/ */
public function getError() public function getError()
@ -308,7 +311,7 @@ class UploadedFile implements UploadedFileInterface
* {@inheritdoc} * {@inheritdoc}
* *
* @return string|null The filename sent by the client or null if none * @return string|null The filename sent by the client or null if none
* was provided. * was provided.
*/ */
public function getClientFilename() public function getClientFilename()
{ {

View File

@ -67,7 +67,7 @@ class Uri implements UriInterface
{ {
// weak type check to also accept null until we can add scalar type hints // weak type check to also accept null until we can add scalar type hints
if ($uri != '') { if ($uri != '') {
$parts = parse_url($uri); $parts = self::parse($uri);
if ($parts === false) { if ($parts === false) {
throw new \InvalidArgumentException("Unable to parse URI: $uri"); 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() public function __toString()
{ {
return self::composeComponents( return self::composeComponents(
@ -167,6 +210,7 @@ class Uri implements UriInterface
* @param UriInterface $uri * @param UriInterface $uri
* *
* @return bool * @return bool
*
* @see Uri::isNetworkPathReference * @see Uri::isNetworkPathReference
* @see Uri::isAbsolutePathReference * @see Uri::isAbsolutePathReference
* @see Uri::isRelativePathReference * @see Uri::isRelativePathReference
@ -185,6 +229,7 @@ class Uri implements UriInterface
* @param UriInterface $uri * @param UriInterface $uri
* *
* @return bool * @return bool
*
* @link https://tools.ietf.org/html/rfc3986#section-4.2 * @link https://tools.ietf.org/html/rfc3986#section-4.2
*/ */
public static function isNetworkPathReference(UriInterface $uri) public static function isNetworkPathReference(UriInterface $uri)
@ -200,6 +245,7 @@ class Uri implements UriInterface
* @param UriInterface $uri * @param UriInterface $uri
* *
* @return bool * @return bool
*
* @link https://tools.ietf.org/html/rfc3986#section-4.2 * @link https://tools.ietf.org/html/rfc3986#section-4.2
*/ */
public static function isAbsolutePathReference(UriInterface $uri) public static function isAbsolutePathReference(UriInterface $uri)
@ -218,6 +264,7 @@ class Uri implements UriInterface
* @param UriInterface $uri * @param UriInterface $uri
* *
* @return bool * @return bool
*
* @link https://tools.ietf.org/html/rfc3986#section-4.2 * @link https://tools.ietf.org/html/rfc3986#section-4.2
*/ */
public static function isRelativePathReference(UriInterface $uri) 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 * @param UriInterface|null $base An optional base URI to compare against
* *
* @return bool * @return bool
*
* @link https://tools.ietf.org/html/rfc3986#section-4.4 * @link https://tools.ietf.org/html/rfc3986#section-4.4
*/ */
public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null)
@ -358,6 +406,7 @@ class Uri implements UriInterface
* @param array $parts * @param array $parts
* *
* @return UriInterface * @return UriInterface
*
* @link http://php.net/manual/en/function.parse-url.php * @link http://php.net/manual/en/function.parse-url.php
* *
* @throws \InvalidArgumentException If the components do not form a valid URI. * @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'); 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'); 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 UriInterface $uri
* @param array $keys * @param array $keys
* *
* @return array * @return array
*/ */
private static function getFilteredQueryString(UriInterface $uri, array $keys) private static function getFilteredQueryString(UriInterface $uri, array $keys)
@ -662,7 +711,7 @@ class Uri implements UriInterface
/** /**
* @param string $key * @param string $key
* @param string|null $value * @param string|null $value
* *
* @return string * @return string
*/ */
private static function generateQueryString($key, $value) 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.', 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
E_USER_DEPRECATED 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'); //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty');
} }
} }

View File

@ -115,6 +115,7 @@ final class UriNormalizer
* @param int $flags A bitmask of normalizations to apply, see constants * @param int $flags A bitmask of normalizations to apply, see constants
* *
* @return UriInterface The normalized URI * @return UriInterface The normalized URI
*
* @link https://tools.ietf.org/html/rfc3986#section-6.2 * @link https://tools.ietf.org/html/rfc3986#section-6.2
*/ */
public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS) 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 * @param int $normalizations A bitmask of normalizations to apply, see constants
* *
* @return bool * @return bool
*
* @link https://tools.ietf.org/html/rfc3986#section-6.1 * @link https://tools.ietf.org/html/rfc3986#section-6.1
*/ */
public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)

View File

@ -19,6 +19,7 @@ final class UriResolver
* @param string $path * @param string $path
* *
* @return string * @return string
*
* @link http://tools.ietf.org/html/rfc3986#section-5.2.4 * @link http://tools.ietf.org/html/rfc3986#section-5.2.4
*/ */
public static function removeDotSegments($path) public static function removeDotSegments($path)
@ -58,6 +59,7 @@ final class UriResolver
* @param UriInterface $rel Relative URI * @param UriInterface $rel Relative URI
* *
* @return UriInterface * @return UriInterface
*
* @link http://tools.ietf.org/html/rfc3986#section-5.2 * @link http://tools.ietf.org/html/rfc3986#section-5.2
*/ */
public static function resolve(UriInterface $base, UriInterface $rel) public static function resolve(UriInterface $base, UriInterface $rel)

View File

@ -75,6 +75,7 @@ final class Utils
* @param StreamInterface $stream Stream to read * @param StreamInterface $stream Stream to read
* @param int $maxLen Maximum number of bytes to read. Pass -1 * @param int $maxLen Maximum number of bytes to read. Pass -1
* to read the entire stream. * to read the entire stream.
*
* @return string * @return string
* *
* @throws \RuntimeException on error. * @throws \RuntimeException on error.
@ -181,7 +182,7 @@ final class Utils
$standardPorts = ['http' => 80, 'https' => 443]; $standardPorts = ['http' => 80, 'https' => 443];
$scheme = $changes['uri']->getScheme(); $scheme = $changes['uri']->getScheme();
if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { 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) { if ($request instanceof ServerRequestInterface) {
return (new ServerRequest( $new = (new ServerRequest(
isset($changes['method']) ? $changes['method'] : $request->getMethod(), isset($changes['method']) ? $changes['method'] : $request->getMethod(),
$uri, $uri,
$headers, $headers,
@ -216,6 +217,12 @@ final class Utils
->withQueryParams($request->getQueryParams()) ->withQueryParams($request->getQueryParams())
->withCookieParams($request->getCookieParams()) ->withCookieParams($request->getCookieParams())
->withUploadedFiles($request->getUploadedFiles()); ->withUploadedFiles($request->getUploadedFiles());
foreach ($request->getAttributes() as $key => $value) {
$new = $new->withAttribute($key, $value);
}
return $new;
} }
return new Request( return new Request(
@ -286,7 +293,7 @@ final class Utils
* number of requested bytes are available. Any additional bytes will be * number of requested bytes are available. Any additional bytes will be
* buffered and used in subsequent reads. * 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 * @param array $options Additional options
* *
* @return StreamInterface * @return StreamInterface
@ -296,7 +303,7 @@ final class Utils
public static function streamFor($resource = '', array $options = []) public static function streamFor($resource = '', array $options = [])
{ {
if (is_scalar($resource)) { if (is_scalar($resource)) {
$stream = fopen('php://temp', 'r+'); $stream = self::tryFopen('php://temp', 'r+');
if ($resource !== '') { if ($resource !== '') {
fwrite($stream, $resource); fwrite($stream, $resource);
fseek($stream, 0); fseek($stream, 0);
@ -306,6 +313,16 @@ final class Utils
switch (gettype($resource)) { switch (gettype($resource)) {
case '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); return new Stream($resource, $options);
case 'object': case 'object':
if ($resource instanceof StreamInterface) { if ($resource instanceof StreamInterface) {
@ -324,7 +341,7 @@ final class Utils
} }
break; break;
case 'NULL': case 'NULL':
return new Stream(fopen('php://temp', 'r+'), $options); return new Stream(self::tryFopen('php://temp', 'r+'), $options);
} }
if (is_callable($resource)) { if (is_callable($resource)) {
@ -352,14 +369,26 @@ final class Utils
$ex = null; $ex = null;
set_error_handler(function () use ($filename, $mode, &$ex) { set_error_handler(function () use ($filename, $mode, &$ex) {
$ex = new \RuntimeException(sprintf( $ex = new \RuntimeException(sprintf(
'Unable to open %s using mode %s: %s', 'Unable to open "%s" using mode "%s": %s',
$filename, $filename,
$mode, $mode,
func_get_args()[1] 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(); restore_error_handler();
if ($ex) { if ($ex) {

View File

@ -70,7 +70,7 @@ function uri_for($uri)
* number of requested bytes are available. Any additional bytes will be * number of requested bytes are available. Any additional bytes will be
* buffered and used in subsequent reads. * 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 * @param array $options Additional options
* *
* @return StreamInterface * @return StreamInterface
@ -187,6 +187,7 @@ function try_fopen($filename, $mode)
* @param StreamInterface $stream Stream to read * @param StreamInterface $stream Stream to read
* @param int $maxLen Maximum number of bytes to read. Pass -1 * @param int $maxLen Maximum number of bytes to read. Pass -1
* to read the entire stream. * to read the entire stream.
*
* @return string * @return string
* *
* @throws \RuntimeException on error. * @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 * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
* to encode using RFC3986, or PHP_QUERY_RFC1738 * to encode using RFC3986, or PHP_QUERY_RFC1738
* to encode using RFC1738. * to encode using RFC1738.
*
* @return string * @return string
* *
* @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead. * @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 * @return array
* *
* @internal * @internal
*
* @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead. * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead.
*/ */
function _parse_message($message) function _parse_message($message)
@ -377,6 +380,7 @@ function _parse_message($message)
* @return string * @return string
* *
* @internal * @internal
*
* @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead. * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead.
*/ */
function _parse_request_uri($path, array $headers) function _parse_request_uri($path, array $headers)
@ -409,6 +413,7 @@ function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
* @return array * @return array
* *
* @internal * @internal
*
* @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead. * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead.
*/ */
function _caseless_remove($keys, array $data) function _caseless_remove($keys, array $data)

View File

@ -2,7 +2,7 @@
# PHPMailer A full-featured email creation and transfer class for PHP # 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 ## Features
- Probably the world's most popular code for sending email from PHP! - 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/'); $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 ## 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. 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. Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained.
## Sponsorship ## 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.
<a href="https://info.smartmessages.net/"><img src="https://www.smartmessages.net/img/smartmessages-logo.svg" width="550" alt="Smartmessages.net privacy-first email marketing logo"></a> <a href="https://info.smartmessages.net/"><img src="https://www.smartmessages.net/img/smartmessages-logo.svg" width="550" alt="Smartmessages.net privacy-first email marketing logo"></a>
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 ## Changelog
See [changelog](changelog.md). See [changelog](changelog.md).

View File

@ -1,6 +1,6 @@
# Security notices relating to PHPMailer # 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. 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.

View File

@ -1 +1 @@
6.3.0 6.4.0

View File

@ -40,7 +40,7 @@
"yoast/phpunit-polyfills": "^0.2.0" "yoast/phpunit-polyfills": "^0.2.0"
}, },
"suggest": { "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", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging", "psr/log": "For optional PSR-3 debug logging",

View File

@ -48,10 +48,10 @@ use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
if (!isset($_GET['code']) && !isset($_GET['provider'])) { if (!isset($_GET['code']) && !isset($_GET['provider'])) {
?> ?>
<html> <html>
<body>Select Provider:<br/> <body>Select Provider:<br>
<a href='?provider=Google'>Google</a><br/> <a href='?provider=Google'>Google</a><br>
<a href='?provider=Yahoo'>Yahoo</a><br/> <a href='?provider=Yahoo'>Yahoo</a><br>
<a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br/> <a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br>
</body> </body>
</html> </html>
<?php <?php

View File

@ -0,0 +1,28 @@
<?php
/**
* Serbian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Александар Јевремовић <ajevremovic@gmail.com>
* @author Miloš Milanović <mmilanovic016@gmail.com>
*/
$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: ';

View File

@ -748,7 +748,7 @@ class PHPMailer
* *
* @var string * @var string
*/ */
const VERSION = '6.3.0'; const VERSION = '6.4.0';
/** /**
* Error severity: message only, continue processing. * Error severity: message only, continue processing.
@ -1199,7 +1199,11 @@ class PHPMailer
) )
) { ) {
//Decode the name part if it's present and encoded //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); $address->personal = mb_decode_mimeheader($address->personal);
} }
@ -1680,16 +1684,11 @@ class PHPMailer
//Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
//Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
//Example problem: https://www.drupal.org/node/1057954 //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'))) { if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
//PHP config has a sender address we can use //PHP config has a sender address we can use
$this->Sender = ini_get('sendmail_from'); $this->Sender = ini_get('sendmail_from');
} }
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. //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 (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) {
if ($this->Mailer === 'qmail') { if ($this->Mailer === 'qmail') {
$sendmailFmt = '%s -f%s'; $sendmailFmt = '%s -f%s';
@ -1697,8 +1696,12 @@ class PHPMailer
$sendmailFmt = '%s -oi -f%s -t'; $sendmailFmt = '%s -oi -f%s -t';
} }
} else { } else {
$this->edebug('Sender address unusable or missing: ' . $this->Sender); //allow sendmail to choose a default envelope sender. It may
return false; //seem preferable to force it to use the From header as with
//SMTP, but that introduces new problems (see
//<https://github.com/PHPMailer/PHPMailer/issues/2298>), and
//it has historically worked this way.
$sendmailFmt = '%s -oi -t';
} }
$sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); $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 //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
//Example problem: https://www.drupal.org/node/1057954 //Example problem: https://www.drupal.org/node/1057954
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. //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'))) { if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
//PHP config has a sender address we can use //PHP config has a sender address we can use
$this->Sender = ini_get('sendmail_from'); $this->Sender = ini_get('sendmail_from');

View File

@ -46,7 +46,7 @@ class POP3
* *
* @var string * @var string
*/ */
const VERSION = '6.3.0'; const VERSION = '6.4.0';
/** /**
* Default POP3 port number. * Default POP3 port number.

View File

@ -35,7 +35,7 @@ class SMTP
* *
* @var string * @var string
*/ */
const VERSION = '6.3.0'; const VERSION = '6.4.0';
/** /**
* SMTP line break constant. * SMTP line break constant.
@ -553,6 +553,8 @@ class SMTP
} }
//Send encoded username and password //Send encoded username and password
if ( 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( !$this->sendCommand(
'User & Password', 'User & Password',
base64_encode("\0" . $username . "\0" . $password), base64_encode("\0" . $username . "\0" . $password),

View File

@ -1,5 +1,10 @@
# Changelog # 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 ## 7.75.0 - 2021-02-22
* [#1094](https://github.com/stripe/stripe-php/pull/1094) Add support for Billing Portal Configuration API * [#1094](https://github.com/stripe/stripe-php/pull/1094) Add support for Billing Portal Configuration API

View File

@ -1 +1 @@
7.75.0 7.76.0

View File

@ -24,7 +24,7 @@ namespace Stripe;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @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 <a href="https://stripe.com/docs/payouts">Stripe supports in the account's country</a>. * @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that <a href="https://stripe.com/docs/payouts">Stripe supports in the account's country</a>.
* @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. * @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\Collection $external_accounts External accounts (bank accounts and debit cards) currently attached to this account
* @property \Stripe\Person $individual <p>This is an object representing a person associated with a Stripe account.</p><p>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 <a href="https://stripe.com/docs/connect/standard-accounts">Standard onboarding</a> or <a href="https://stripe.com/docs/connect/express-accounts">Express onboarding documentation</a> for information about platform pre-filling and account onboarding steps.</p><p>Related guide: <a href="https://stripe.com/docs/connect/identity-verification-api#person-information">Handling Identity Verification with the API</a>.</p> * @property \Stripe\Person $individual <p>This is an object representing a person associated with a Stripe account.</p><p>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 <a href="https://stripe.com/docs/connect/standard-accounts">Standard onboarding</a> or <a href="https://stripe.com/docs/connect/express-accounts">Express onboarding documentation</a> for information about platform pre-filling and account onboarding steps.</p><p>Related guide: <a href="https://stripe.com/docs/connect/identity-verification-api#person-information">Handling Identity Verification with the API</a>.</p>
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

View File

@ -26,15 +26,15 @@ if (!\defined('CURL_HTTP_VERSION_2TLS')) {
class CurlClient implements ClientInterface class CurlClient implements ClientInterface
{ {
private static $instance; protected static $instance;
public static function instance() public static function instance()
{ {
if (!self::$instance) { if (!static::$instance) {
self::$instance = new self(); static::$instance = new static();
} }
return self::$instance; return static::$instance;
} }
protected $defaultOptions; protected $defaultOptions;

View File

@ -59,7 +59,7 @@ namespace Stripe;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property null|\Stripe\StripeObject[] $custom_fields Custom fields displayed on the invoice. * @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 <code>customer.address</code>. Once the invoice is finalized, this field will no longer be updated. * @property null|\Stripe\StripeObject $customer_address The customer's address. Until the invoice is finalized, this field will equal <code>customer.address</code>. 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 <code>customer.email</code>. 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 <code>customer.email</code>. 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 <code>customer.name</code>. 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 <code>customer.name</code>. Once the invoice is finalized, this field will no longer be updated.

View File

@ -32,7 +32,7 @@ namespace Stripe;
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> 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 null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string.
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> 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 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 <code>interval</code> and <code>usage_type</code>. * @property null|\Stripe\StripeObject $recurring The recurring components of a price such as <code>interval</code> and <code>usage_type</code>.
* @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires <code>billing_scheme</code> to be set to <code>tiered</code>. See also the documentation for <code>billing_scheme</code>. * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires <code>billing_scheme</code> to be set to <code>tiered</code>. See also the documentation for <code>billing_scheme</code>.

View File

@ -30,13 +30,13 @@ namespace Stripe;
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> 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 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 <code>package_dimensions</code>. Only applicable to products of <code>type=good</code>. * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes.
* @property null|bool $shippable Whether this product is a shipped good. Only applicable to products of <code>type=good</code>. * @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 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 <code>good</code>, which is eligible for use with Orders and SKUs, or <code>service</code>, which is eligible for use with Subscriptions and Plans. * @property string $type The type of the product. The product is either of type <code>good</code>, which is eligible for use with Orders and SKUs, or <code>service</code>, 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 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 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 <code>type=good</code>. * @property null|string $url A URL of a publicly-accessible webpage for this product.
*/ */
class Product extends ApiResource class Product extends ApiResource
{ {

View File

@ -58,7 +58,7 @@ class Stripe
/** @var float Initial delay between retries, in seconds */ /** @var float Initial delay between retries, in seconds */
private static $initialNetworkRetryDelay = 0.5; private static $initialNetworkRetryDelay = 0.5;
const VERSION = '7.75.0'; const VERSION = '7.76.0';
/** /**
* @return string the API key used for requests * @return string the API key used for requests