aboutsummaryrefslogtreecommitdiff
path: root/lib/php8backports.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2022-06-19 21:45:33 +0200
committerGravatar GitHub <noreply@github.com> 2022-06-19 21:45:33 +0200
commit8365a7a34dea6750fab4c29541ec1801cdbc83e4 (patch)
treeddece4e9d4e4f7f7e7e70b25827c9f3adf2ba643 /lib/php8backports.php
parent192dc4dae2b023acb17218e4ad330d082194489d (diff)
downloadrss-bridge-8365a7a34dea6750fab4c29541ec1801cdbc83e4.tar.gz
rss-bridge-8365a7a34dea6750fab4c29541ec1801cdbc83e4.tar.zst
rss-bridge-8365a7a34dea6750fab4c29541ec1801cdbc83e4.zip
chore: bump required php version to 7.4 (#2838)
* chore: require min php 7.4 * Revert "feat: backport php 7.3 functions (#2803)" This reverts commit 6df5a4bc14abd9aec4ed1936f2b032ce754af358. * [BandcampDaily] use array_key_first * hard fail on php versions below 7.4 * update phpcompat linter
Diffstat (limited to 'lib/php8backports.php')
-rw-r--r--lib/php8backports.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/php8backports.php b/lib/php8backports.php
index 367e3a8f..3b2bb966 100644
--- a/lib/php8backports.php
+++ b/lib/php8backports.php
@@ -50,37 +50,3 @@ if (!function_exists('str_contains')) {
return $needle !== '' && mb_strpos($haystack, $needle) !== false;
}
}
-
-// php 7.3 https://github.com/symfony/polyfill/blob/main/src/Php73/bootstrap.php
-//
-// Copyright (c) 2018-2019 Fabien Potencier
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is furnished
-// to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-if (!function_exists('array_key_first')) {
- function array_key_first(array $array) {
- foreach ($array as $key => $value) {
- return $key;
- }
- }
-}
-if (!function_exists('array_key_last')) {
- function array_key_last(array $array) {
- return key(array_slice($array, -1, 1, true));
- }
-}