Skip to content
Merged

Dev #265

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
67 changes: 67 additions & 0 deletions .github/workflows/php81.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build PHP 8.1

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:

services:
sql.data:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
SA_PASSWORD: ${{ secrets.SA_PASSWORD }}
ACCEPT_EULA: Y
MSSQL_PID: Express
ports:
- "1433:1433"

steps:

- name: Shutdown Ubuntu MySQL
run: sudo service mysql stop

- name: Set up MySQL
uses: mirromutth/[email protected]
with:
mysql version: '5.7'
mysql database: 'testing_db'
mysql root password: ${{ secrets.MYSQL_ROOT_PASSWORD }}
mysql user: 'root'
mysql password: ${{ secrets.MYSQL_ROOT_PASSWORD }}

- name: Wait for MySQL
run: |
while ! mysqladmin ping --host=127.0.0.1 --password=${{ secrets.MYSQL_ROOT_PASSWORD }} --silent; do
sleep 1
done

- name: Setup MSSQL
run: |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt update
sudo apt install mssql-tools18
/opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P ${{ secrets.SA_PASSWORD }} -Q 'create database testing_db' -C

- name: Run Tests

uses: WebFiori/workflows/.github/workflows/test-php.yaml@main
with:
php-version: '8.1'


code-coverage:
name: Coverage
needs: test
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main
with:
php-version: '8.1'
coverage-file: 'php-8.1-coverage.xml'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}



75 changes: 0 additions & 75 deletions .github/workflows/php81.yml

This file was deleted.

10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ext-fileinfo": "*",
"ext-openssl": "*",
"webfiori/cache": "v1.1.0",
"webfiori/http": "v3.6.0",
"webfiori/http": "v3.6.1",
"webfiori/file": "v1.3.8",
"webfiori/jsonx": "v3.3.2",
"webfiori/ui": "v2.6.4",
Expand All @@ -33,7 +33,13 @@
"webfiori/mailer": "v1.3.1",
"webfiori/err": "v1.2.0"
},
"require-dev": {},
"scripts": {
"test": "phpunit --configuration tests/phpunit.xml",
"test-10": "phpunit --configuration tests/phpunit10.xml"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
"webfiori\\framework\\": "webfiori/framework/"
Expand Down
8 changes: 5 additions & 3 deletions tests/webfiori/framework/test/cli/AddCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public function testAddDBConnection00() {
''
]);


$connName = 'db-connection-'.(count(App::getConfig()->getDBConnections()) - 1);
$count = count(App::getConfig()->getDBConnections());
$connName = 'db-connection-'.$count;
$this->assertEquals([
"What would you like to add?\n",
"0: New database connection.\n",
Expand Down Expand Up @@ -139,7 +139,8 @@ public function testAddDBConnection02() {
'add'
]);
$this->assertEquals(0, $runner->start());
$connName = 'db-connection-'.count(App::getConfig()->getDBConnections());
$count = count(App::getConfig()->getDBConnections());
$connName = 'db-connection-'.($count);
$this->assertEquals([
"What would you like to add?\n",
"0: New database connection.\n",
Expand Down Expand Up @@ -285,4 +286,5 @@ private function removeClass($classPath) {
$file = new File(ROOT_PATH.$classPath.'.php');
$file->remove();
}

}
4 changes: 2 additions & 2 deletions webfiori/framework/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ public static function initFrameworkVersionInfo() {
*
* @since 2.1
*/
define('WF_VERSION', '3.0.0-Beta.27');
define('WF_VERSION', '3.0.0-Beta.28');
/**
* A constant that tells the type of framework version.
*
Expand All @@ -653,7 +653,7 @@ public static function initFrameworkVersionInfo() {
*
* @since 2.1
*/
define('WF_RELEASE_DATE', '2025-05-26');
define('WF_RELEASE_DATE', '2025-08-04');
}

/**
Expand Down
Loading