diff --git a/.woodpecker/.continuous-deployment.yml b/.woodpecker/.continuous-deployment.yml index 4ff956b3b6..4ce8a70930 100644 --- a/.woodpecker/.continuous-deployment.yml +++ b/.woodpecker/.continuous-deployment.yml @@ -39,7 +39,7 @@ steps: branch: [ develop, '*-rc' ] event: push composer_install: - image: friendicaci/php7.4:php7.4.33 + image: friendicaci/php8.2:php8.2.16 commands: - export COMPOSER_HOME=.composer - composer validate diff --git a/.woodpecker/.database_checks.yml b/.woodpecker/.database_checks.yml index 7d25536749..390df0a6be 100644 --- a/.woodpecker/.database_checks.yml +++ b/.woodpecker/.database_checks.yml @@ -1,10 +1,11 @@ matrix: include: - - PHP_MAJOR_VERSION: 7.4 - PHP_VERSION: 7.4.33 + - PHP_MAJOR_VERSION: 8.2 + PHP_VERSION: 8.2.16 -branches: - exclude: [ stable ] +when: + - branch: + exclude: [ stable ] # This forces CI executions at the "opensocial" labeled location (because of much more power...) labels: diff --git a/.woodpecker/.messages.po_check.yml b/.woodpecker/.messages.po_check.yml index 9c25095940..d568aa49fe 100644 --- a/.woodpecker/.messages.po_check.yml +++ b/.woodpecker/.messages.po_check.yml @@ -8,5 +8,6 @@ steps: commands: - /check-messages.sh -branches: - exclude: [ stable ] +when: + - branch: + exclude: [ stable ] diff --git a/.woodpecker/.phpunit.yml b/.woodpecker/.phpunit.yml index 97ea09d374..7141ef8943 100644 --- a/.woodpecker/.phpunit.yml +++ b/.woodpecker/.phpunit.yml @@ -5,9 +5,11 @@ matrix: - PHP_MAJOR_VERSION: 8.0 PHP_VERSION: 8.0.30 - PHP_MAJOR_VERSION: 8.1 - PHP_VERSION: 8.1.23 + PHP_VERSION: 8.1.27 - PHP_MAJOR_VERSION: 8.2 - PHP_VERSION: 8.2.11 + PHP_VERSION: 8.2.16 + - PHP_MAJOR_VERSION: 8.3 + PHP_VERSION: 8.3.3 # This forces PHP Unit executions at the "opensocial" labeled location (because of much more power...) labels: @@ -16,7 +18,6 @@ labels: steps: php-lint: image: php:${PHP_MAJOR_VERSION} - group: lint commands: - find . -name \*.php -not -path './vendor/*' -not -path './view/asset/*' -print0 | xargs -0 -n1 php -l restore_cache: @@ -64,7 +65,7 @@ steps: - cp config/local-sample.config.php config/local.config.php - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql - - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica" ]; then + - if [ "${PHP_MAJOR_VERSION}" = "8.2" -a "${CI_REPO}" = "friendica/friendica" ]; then phpenmod xdebug; export XDEBUG_MODE=coverage; phpunit --configuration tests/phpunit.xml -d memory_limit=-1 --coverage-clover clover.xml; @@ -75,8 +76,8 @@ steps: image: friendicaci/codecov when: matrix: - PHP_MAJOR_VERSION: 7.4 - PHP_VERSION: 7.4.33 + PHP_MAJOR_VERSION: 8.2 + PHP_VERSION: 8.2.16 repo: - friendica/friendica commands: diff --git a/.woodpecker/.releaser.yml b/.woodpecker/.releaser.yml index 006bcfec37..175ab7d514 100644 --- a/.woodpecker/.releaser.yml +++ b/.woodpecker/.releaser.yml @@ -37,7 +37,7 @@ steps: branch: stable event: tag composer_install: - image: friendicaci/php7.4:php7.4.33 + image: friendicaci/php8.2:php8.2.16 commands: - export COMPOSER_HOME=.composer - composer validate diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 712c3c6dfd..f923e6c162 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -140,7 +140,7 @@ class Probe } else { $newdata[$field] = trim($data[$field]); } - } elseif (!in_array($field, $numeric_fields)) { + } elseif (!in_array($field, $numeric_fields) && !in_array($field, $boolean_fields)) { $newdata[$field] = ''; } else { $newdata[$field] = null; diff --git a/src/Protocol/Delivery.php b/src/Protocol/Delivery.php index 436e949f30..d479ad4422 100644 --- a/src/Protocol/Delivery.php +++ b/src/Protocol/Delivery.php @@ -338,16 +338,13 @@ class Delivery if ($public_dfrn) { Logger::info('Relay delivery to ' . $contact['url'] . ' with guid ' . $target_item['guid'] . ' returns ' . $deliver_status); - if ($cmd == Delivery::POST) { - if (($deliver_status >= 200) && ($deliver_status <= 299)) { - Post\DeliveryData::incrementQueueDone($target_item['uri-id'], $protocol); + $success = ($deliver_status >= 200) && ($deliver_status <= 299); - GServer::setProtocol($contact['gsid'] ?? 0, $protocol); - $success = true; - } else { - Post\DeliveryData::incrementQueueFailed($target_item['uri-id']); - $success = false; - } + if ($cmd == Delivery::POST) { + Post\DeliveryData::incrementQueueDone($target_item['uri-id'], $protocol); + GServer::setProtocol($contact['gsid'] ?? 0, $protocol); + } else { + Post\DeliveryData::incrementQueueFailed($target_item['uri-id']); } return $success; }