Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4 * Sort composer dependencies * Remove unused Aws S3 php library * Pin simplepie dependency to ^1.5 * Pin getid3 dependency to ^1.9 * Pin composer semver to ^3.2 * Pin php-amqplib to ^2.12 * Drop sentry logging support * Update composer dependencies * Move propel regenerate to Makefile * Regenerate propel files with v1.7.0 * Pin propel orm to ^1.7 * Regenerate propel files with v1.7.2 * fix: generator_version in airtime-conf-production.php * Replace propel/propel1 with jooola/propel1 * Regenerate propel files with v1.7.3-dev * Fix php7.4 compatibility Using php-cs-fixer: '@PhpCsFixer' => true, 'concat_space' => ['spacing' => 'one'], 'ordered_class_elements' => false, 'yoda_style' => false, '@PHP74Migration' => true, 'assign_null_coalescing_to_coalesce_equal' => false, 'ternary_to_null_coalescing' => false, 'heredoc_indentation' => false, '@PHP74Migration:risky' => true, 'declare_strict_types' => false, 'void_return' => false, 'use_arrow_functions' => false, * Fix pre-commit
This commit is contained in:
parent
30b3470a06
commit
5e8d8db6e9
90 changed files with 887 additions and 1310 deletions
|
@ -353,7 +353,7 @@ class Application_Service_CalendarService
|
|||
$con->beginTransaction();
|
||||
|
||||
//new starts,ends are in UTC
|
||||
list($newStartsDateTime, $newEndsDateTime) = $this->validateShowMove(
|
||||
[$newStartsDateTime, $newEndsDateTime] = $this->validateShowMove(
|
||||
$deltaDay,
|
||||
$deltaMin
|
||||
);
|
||||
|
|
|
@ -122,7 +122,7 @@ class Application_Service_HistoryService
|
|||
' FROM cc_files AS file' .
|
||||
') AS file_md';
|
||||
|
||||
$fileMd = str_replace('%NON_NULL_FILE_SELECT%', join(', ', $nonNullFileSelect), $fileMd);
|
||||
$fileMd = str_replace('%NON_NULL_FILE_SELECT%', implode(', ', $nonNullFileSelect), $fileMd);
|
||||
|
||||
//null files are from manually added data (filling in webstream info etc)
|
||||
$nullFile = '(' .
|
||||
|
@ -135,11 +135,11 @@ class Application_Service_HistoryService
|
|||
//building the file inner query
|
||||
|
||||
$fileSqlQuery =
|
||||
'SELECT ' . join(', ', $fileSelect) .
|
||||
'SELECT ' . implode(', ', $fileSelect) .
|
||||
" FROM {$historyFile}" .
|
||||
" LEFT JOIN {$fileMd} USING (file_id)" .
|
||||
' UNION' .
|
||||
' SELECT ' . join(', ', $nullFileSelect) .
|
||||
' SELECT ' . implode(', ', $nullFileSelect) .
|
||||
" FROM {$nullFile}";
|
||||
|
||||
foreach ($fileMdFilters as $filter) {
|
||||
|
@ -159,7 +159,7 @@ class Application_Service_HistoryService
|
|||
}
|
||||
|
||||
$mainSqlQuery .=
|
||||
'SELECT ' . join(', ', $mainSelect) .
|
||||
'SELECT ' . implode(', ', $mainSelect) .
|
||||
" FROM {$historyRange}";
|
||||
|
||||
if (isset($fileSqlQuery)) {
|
||||
|
@ -214,7 +214,7 @@ class Application_Service_HistoryService
|
|||
}
|
||||
|
||||
if (count($orderBys) > 0) {
|
||||
$orders = join(', ', $orderBys);
|
||||
$orders = implode(', ', $orderBys);
|
||||
|
||||
$mainSqlQuery .=
|
||||
" ORDER BY {$orders}";
|
||||
|
@ -340,7 +340,7 @@ class Application_Service_HistoryService
|
|||
LEFT JOIN cc_files AS file ON (file.id = playout.file_id)) AS summary';
|
||||
|
||||
$mainSqlQuery .=
|
||||
'SELECT ' . join(', ', $select) .
|
||||
'SELECT ' . implode(', ', $select) .
|
||||
" FROM {$fileSummaryTable}";
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
@ -373,7 +373,7 @@ class Application_Service_HistoryService
|
|||
}
|
||||
|
||||
if ($numOrderColumns > 0) {
|
||||
$orders = join(', ', $orderBys);
|
||||
$orders = implode(', ', $orderBys);
|
||||
|
||||
$mainSqlQuery .=
|
||||
" ORDER BY {$orders}";
|
||||
|
|
|
@ -111,12 +111,12 @@ class Application_Service_MediaService
|
|||
break; //Break out of the loop if we successfully read the file!
|
||||
} catch (LibreTimeFileNotFoundException $e) {
|
||||
//If we have no alternate filepaths left, then let the exception bubble up.
|
||||
if (sizeof($filePaths) == 0) {
|
||||
if (count($filePaths) == 0) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
//Retry with the next alternate filepath in the list
|
||||
} while (sizeof($filePaths) > 0);
|
||||
} while (count($filePaths) > 0);
|
||||
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -456,7 +456,7 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
|||
Logging::info($testenclosures);
|
||||
// we need to check if this is an array otherwise sizeof will fail and stop this whole script
|
||||
if (is_array($testenclosures)) {
|
||||
$numenclosures = sizeof($testenclosures);
|
||||
$numenclosures = count($testenclosures);
|
||||
// now we loop through and look for a audio file and then stop the loop at the first one we find
|
||||
for ($i = 0; $i < $numenclosures + 1; ++$i) {
|
||||
$enclosure_attribs = array_values($testenclosures[$i]['attribs'])[0];
|
||||
|
|
|
@ -82,7 +82,7 @@ class Application_Service_PodcastService
|
|||
array_push($categories, $category->get_scheme() . ':' . $category->get_term());
|
||||
}
|
||||
}
|
||||
$podcastArray['category'] = htmlspecialchars(implode($categories));
|
||||
$podcastArray['category'] = htmlspecialchars(implode('', $categories));
|
||||
|
||||
//TODO: put in constants
|
||||
$itunesChannel = 'http://www.itunes.com/dtds/podcast-1.0.dtd';
|
||||
|
|
|
@ -298,7 +298,7 @@ class Application_Service_SchedulerService
|
|||
$insert_sql = 'INSERT INTO cc_schedule (starts, ends, ' .
|
||||
'clip_length, fade_in, fade_out, cue_in, cue_out, ' .
|
||||
'file_id, stream_id, instance_id, position) VALUES ' .
|
||||
implode($values, ',');
|
||||
implode(',', $values);
|
||||
Application_Common_Database::prepareAndExecute(
|
||||
$insert_sql,
|
||||
[],
|
||||
|
|
|
@ -1138,7 +1138,7 @@ SQL;
|
|||
$time = explode(':', $rebroadcast['start_time']);
|
||||
$offset = ['days' => $days[0], 'hours' => $time[0], 'mins' => $time[1]];
|
||||
|
||||
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
|
||||
[$utcStartDateTime, $utcEndDateTime] = $this->createUTCStartEndDateTime(
|
||||
$showStartDate,
|
||||
$showDay->getDbDuration(),
|
||||
$offset
|
||||
|
@ -1168,7 +1168,7 @@ SQL;
|
|||
//DateTime object
|
||||
$start = $showDay->getLocalStartDateAndTime();
|
||||
|
||||
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
|
||||
[$utcStartDateTime, $utcEndDateTime] = $this->createUTCStartEndDateTime(
|
||||
$start,
|
||||
$showDay->getDbDuration()
|
||||
);
|
||||
|
@ -1253,7 +1253,7 @@ SQL;
|
|||
$previousDate = clone $start;
|
||||
|
||||
foreach ($datePeriod as $date) {
|
||||
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
|
||||
[$utcStartDateTime, $utcEndDateTime] = $this->createUTCStartEndDateTime(
|
||||
$date,
|
||||
$duration
|
||||
);
|
||||
|
@ -1338,7 +1338,7 @@ SQL;
|
|||
}
|
||||
|
||||
// We will only need this if the repeat type is MONTHLY_WEEKLY
|
||||
list($weekNumberOfMonth, $dayOfWeek) =
|
||||
[$weekNumberOfMonth, $dayOfWeek] =
|
||||
self::getMonthlyWeeklyRepeatInterval(
|
||||
new DateTime($first_show, new DateTimeZone($timezone))
|
||||
);
|
||||
|
@ -1353,7 +1353,7 @@ SQL;
|
|||
}
|
||||
|
||||
while ($start->getTimestamp() < $end->getTimestamp()) {
|
||||
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
|
||||
[$utcStartDateTime, $utcEndDateTime] = $this->createUTCStartEndDateTime(
|
||||
$start,
|
||||
$duration
|
||||
);
|
||||
|
@ -1932,7 +1932,7 @@ SQL;
|
|||
|
||||
$endDateTime = clone $startDateTime;
|
||||
$duration = explode(':', $duration);
|
||||
list($hours, $mins) = array_slice($duration, 0, 2);
|
||||
[$hours, $mins] = array_slice($duration, 0, 2);
|
||||
$endDateTime->add(new DateInterval("PT{$hours}H{$mins}M"));
|
||||
|
||||
$startDateTime->setTimezone(new DateTimeZone('UTC'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue