Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 47 additions & 44 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,50 @@ on:
- "master"

jobs:
code-coverage:
name: "Code Coverage"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "8.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v6"

- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "xdebug"
extensions: "none, curl, dom, json, mbstring, tokenizer, xml, xmlwriter, iconv"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""

- name: "Determine composer cache directory"
run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v5"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-"

- name: "Install dependencies with composer"
run: "composer install --ansi --no-interaction --no-progress"

- name: "Collect code coverage from running unit tests with phpunit/phpunit"
env:
XDEBUG_MODE: "coverage"
run: "vendor/bin/phpunit --colors=always --configuration=tests/phpunit.xml --coverage-text --testsuite=unit"
# code-coverage:
# name: "Code Coverage"
#
# runs-on: "ubuntu-latest"
#
# strategy:
# matrix:
# php-version:
# - "8.4"
#
# steps:
# - name: "Checkout"
# uses: "actions/checkout@v6"
#
# - name: "Set up PHP"
# uses: "shivammathur/setup-php@v2"
# with:
# coverage: "xdebug"
# extensions: "none, curl, dom, json, mbstring, tokenizer, xml, xmlwriter, iconv"
# php-version: "${{ matrix.php-version }}"
#
# - name: "Set up problem matchers for PHP"
# run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""
#
# - name: "Set up problem matchers for phpunit/phpunit"
# run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""
#
# - name: "Determine composer cache directory"
# run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
#
# - name: "Cache dependencies installed with composer"
# uses: "actions/cache@v5"
# with:
# path: "${{ env.COMPOSER_CACHE_DIR }}"
# key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
# restore-keys: "php-${{ matrix.php-version }}-composer-"
#
# - name: "Install dependencies with composer"
# run: "composer install --ansi --no-interaction --no-progress"
#
# - name: "Collect code coverage from running unit tests with phpunit/phpunit"
# env:
# XDEBUG_MODE: "coverage"
# run: "vendor/bin/phpunit --colors=always --configuration=tests/phpunit.xml --coverage-text --testsuite=unit"

coding-standards:
name: "Coding Standards"
Expand Down Expand Up @@ -193,6 +193,9 @@ jobs:
- name: "Install dependencies with composer"
run: "composer install --ansi --no-interaction --no-progress"

- name: "Execute build step"
run: "php bin/build.php"

- name: "Run unit tests with phpunit/phpunit"
run: "vendor/bin/phpunit --colors=always --configuration=tests/phpunit.xml --testsuite=unit"

Expand Down
9 changes: 9 additions & 0 deletions bin/build.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

use phpweb\Framework\Build\BuildTools;

(PHP_SAPI === 'cli') or die("Please run this script using the cli sapi");

require_once __DIR__ . '/../src/autoload.php';

exit(BuildTools::executeBuild());
13 changes: 8 additions & 5 deletions bin/bumpRelease
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
#!/usr/bin/env php
<?php

use phpweb\Releases\Branches;

(PHP_SAPI === 'cli') or die("Please run this script using the cli sapi");

require_once __DIR__ . "/../include/branches.inc";
require_once __DIR__ . "/../include/version.inc";
require_once __DIR__ . "/../include/releases.inc";
require __DIR__ . '/../include/releases.inc';
require __DIR__ . '/../src/autoload.php';

if ($_SERVER['argc'] < 1) {
fwrite(STDERR, "Usage: {$_SERVER['argv'][0]} major_version [ minor_version ]\n");
exit(1);
}

$RELEASES = Branches::getReleaseData();
$major = (int) $_SERVER['argv'][1];
isset($RELEASES[$major]) or die("Unknown major version $major");
$minor = isset($_SERVER['argv'][2]) ? (int) $_SERVER['argv'][2] : null;

$version = get_current_release_for_branch($major, $minor);
$version = Branches::getCurrentReleaseForBranch($major, $minor);
$info = $RELEASES[$major][$version] ?? null;

if ($info === null) {
Expand All @@ -34,7 +37,7 @@ $OLDRELEASES[$major] = array_merge(
);

file_put_contents(__DIR__ . "/../include/releases.inc", [
"<?php\n\$OLDRELEASES = ",
"<?php\nreturn \$OLDRELEASES = ",
var_export($OLDRELEASES, true),
";\n",
]);
Expand Down
11 changes: 9 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
"source": "https://github.com/php/web-php"
},
"require": {
"php": "~8.4.0"
"php": "~8.4",
"ext-dom": "*",
"monolog/monolog": "^3.10",
"symfony/config": "^7.4",
"symfony/dependency-injection": "^7.4",
"symfony/http-foundation": "^7.4",
"symfony/http-kernel": "^7.4",
"symfony/routing": "^7.4"
},
"require-dev": {
"ext-curl": "*",
Expand All @@ -30,7 +37,7 @@
},
"config": {
"platform": {
"php": "8.4.0"
"php": "8.4.1"
},
"sort-packages": true,
"allow-plugins": {
Expand Down
Loading
Loading