Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
c4af2aa
ci: Updated Workflows
usernane Jan 15, 2026
9f9aff6
ci: Update PHPUnit Version for PHP 8.5
usernane Jan 15, 2026
778128f
ci: Added Concurrency Control
usernane Jan 15, 2026
41c42ca
docs(readme): Updated PHP Version
usernane Jan 15, 2026
29a9e00
chore: Remove Funding Info
usernane Jan 15, 2026
868e123
fix: Request Method not Allowed
usernane Jan 19, 2026
c67616e
refactor: Migrations Creation Process
usernane Jan 19, 2026
237dd96
refactor: Migrations System Refactor
usernane Jan 19, 2026
3b1c77e
Create AttributeTableWriter.php
usernane Jan 20, 2026
92b86f6
Create DomainEntityWriter.php
usernane Jan 20, 2026
3754c03
Create RepositoryWriter.php
usernane Jan 20, 2026
5067f41
Create RestServiceWriter.php
usernane Jan 20, 2026
8faefd7
Create CreateDomainEntity.php
usernane Jan 20, 2026
6f4a7fc
feat: Create Attributes Table
usernane Jan 20, 2026
71d34ec
Create CreateRestService.php
usernane Jan 20, 2026
2a88eb7
Update RepositoryWriter.php
usernane Jan 20, 2026
980209f
Create CreateRepository.php
usernane Jan 20, 2026
74b6959
Update CreateCommand.php
usernane Jan 20, 2026
d142174
Create CreateDomainEntityTest.php
usernane Jan 20, 2026
f00a100
Create CreateRepositoryTest.php
usernane Jan 20, 2026
eee51ca
refactor: How to Locate `ClassLoader`
usernane Jan 20, 2026
d505785
Update .gitignore
usernane Jan 20, 2026
153732c
refactor: Use of Lines Instead of String Concat
usernane Jan 20, 2026
18da8fa
refactor: Added Code Normalization
usernane Jan 20, 2026
4d486b2
feat: Add New Method" `method`
usernane Jan 20, 2026
bebe151
feat: Add `property` and `constant`
usernane Jan 20, 2026
0eb7760
feat: Doc-block Builder
usernane Jan 20, 2026
ff37c27
feat: Added `getCode`
usernane Jan 20, 2026
9e11d2b
feat: Attributes
usernane Jan 20, 2026
57656d7
refactor: Throw Exceptions on Errors
usernane Jan 20, 2026
f54ed91
feat: Code Reuse Helpers
usernane Jan 20, 2026
d3b2407
feat: Chaining
usernane Jan 20, 2026
9c06b94
chore: Merge pull request #277 from WebFiori/refactor-create
usernane Jan 21, 2026
240a415
refactor: Multiple Enhancements
usernane Jan 21, 2026
acaea2d
refactor: Removal of Create Command
usernane Jan 21, 2026
3a09c01
refactor: Locating `ClassLoader`
usernane Jan 26, 2026
128ee8f
refactor: Fix `writeConstructor`
usernane Jan 26, 2026
39c6391
refactor: No Longer Needed
usernane Jan 28, 2026
c603b74
test: Removed Deprecated Test Cases
usernane Jan 28, 2026
e1a6e81
fix(cli): object-to-string conversion errors
usernane Jan 28, 2026
0e6efc7
test: Fix test Expectations
usernane Jan 28, 2026
0d8058d
refactor(cli): Split `add` Command
usernane Jan 29, 2026
2b189be
feat: Create Middleware Command
usernane Jan 29, 2026
fab0c39
feat: Create Background Task Command
usernane Jan 29, 2026
3c88ecf
feat: Create CLI Command
usernane Jan 29, 2026
3c4944c
feat: Create Domain Entity
usernane Jan 29, 2026
ff39f02
feat: Web Services Writer
usernane Jan 29, 2026
6fe3be5
feat: Create Table Command
usernane Jan 29, 2026
498c214
feat: Create Repo
usernane Jan 29, 2026
78d5ecf
feat: Create CRUD Resource
usernane Jan 29, 2026
4f87f0d
chore: Added CS Fixer
usernane Feb 3, 2026
78f8c36
refactor: Enhanced Starter Page
usernane Feb 3, 2026
6e74dd2
Update RestServiceWriter.php
usernane Feb 3, 2026
3e64be3
chore: Remove Non-Needed Files
usernane Feb 4, 2026
e281dfa
chore: CS Fixer
usernane Feb 4, 2026
3198d56
refactor: Rename Initialization Class
usernane Feb 8, 2026
94775c5
chore: Run CS Fixer
usernane Feb 8, 2026
3afeaec
chore: Rename Folders
usernane Feb 8, 2026
ff3f35e
chore: Rename Folders
usernane Feb 8, 2026
5767cdd
test: Fix Test Case
usernane Feb 8, 2026
f598610
fix: Method Call
usernane Feb 8, 2026
e5f845c
fix: Check for Empty `--class-name`
usernane Feb 8, 2026
e82be41
test: Updated Test Cases
usernane Feb 8, 2026
192c2f0
fix: Initialization Path
usernane Feb 9, 2026
11d4f04
refactor: Move `run` Migrations
usernane Feb 9, 2026
56b5443
refactor: Move `rollback` Migrations
usernane Feb 9, 2026
9ac070d
refactor: Move `init` Migrations
usernane Feb 9, 2026
a4eb634
refactor: Move `dry-run` Migrations
usernane Feb 9, 2026
cbd6b29
refactor: Move `status` Migrations
usernane Feb 9, 2026
e0d6490
test: Move test Cases
usernane Feb 9, 2026
3781a6a
refactor: Remove Old Migrations Command
usernane Feb 9, 2026
47d6a27
test: Added More Migrations Tests
usernane Feb 9, 2026
d5f732b
feat: Added `migrations:fresh` Command
usernane Feb 9, 2026
989cf6d
feat: Create Migration
usernane Feb 9, 2026
b3038d0
feat: Create Seeder
usernane Feb 9, 2026
e3950b6
feat: Add Dependencies and Envs
usernane Feb 9, 2026
67d8a9f
test: Updated Test Cases
usernane Feb 11, 2026
2183643
refactor: Masked Password For DB
usernane Feb 11, 2026
240e0dd
refactor: use of `getSupportedDataTypes`
usernane Feb 11, 2026
1d6340c
feat: Added Options to `AttributeTableWriter`
usernane Feb 11, 2026
12a88a9
refactor: Use of Masked Input
usernane Feb 11, 2026
9915709
Merge branch 'dev' into feat-env-vars
usernane Feb 17, 2026
95acf48
Merge pull request #278 from WebFiori/refactor-create
usernane Feb 17, 2026
a816705
Merge branch 'dev' into feat-env-vars
usernane Feb 17, 2026
f28f977
feat: Env Vars for Json Driver
usernane Feb 17, 2026
e9ad0f4
test: Added Env Vars Test Config
usernane Feb 17, 2026
f0ee1a7
test: Added Scheduler Password Test
usernane Feb 17, 2026
b34cd18
feat: Optional Config Var
usernane Feb 17, 2026
32da35f
docs: Updated PHP Docs For Config
usernane Feb 17, 2026
89cd39d
feat: Add `env:` to Class Driver
usernane Feb 17, 2026
e7429c1
Update JsonDriverTest.php
usernane Feb 17, 2026
a8ee667
fix: App Directories Creation
usernane Feb 17, 2026
4c40c32
Merge pull request #279 from WebFiori/feat-env-vars
usernane Feb 17, 2026
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
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/php81.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Build PHP 8.1
name: PHP 8.1

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

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -104,7 +109,7 @@ jobs:
code-coverage:
name: Coverage
needs: test
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@v1.2.1
with:
php-version: '8.1'
coverage-file: 'php-8.1-coverage.xml'
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/php82.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Build PHP 8.2
name: PHP 8.2

on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -105,7 +109,7 @@ jobs:
code-coverage:
name: Coverage
needs: test
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@v1.2.1
with:
php-version: '8.2'
coverage-file: 'php-8.2-coverage.xml'
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/php83.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Build PHP 8.3
name: PHP 8.3

on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -105,7 +109,7 @@ jobs:
code-coverage:
name: Coverage
needs: test
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@v1.2.1
with:
php-version: '8.3'
coverage-file: 'php-8.3-coverage.xml'
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/php84.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -106,23 +110,9 @@ jobs:
code-coverage:
name: Coverage
needs: test
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@main
uses: WebFiori/workflows/.github/workflows/coverage-codecov.yaml@v1.2.1
with:
php-version: '8.4'
coverage-file: 'php-8.4-coverage.xml'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

code-quality:
name: Code Quality
needs: test
uses: WebFiori/workflows/.github/workflows/quality-sonarcloud.yaml@main
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

release-prod:
name: Prepare Production Release Branch / Publish Release
needs: [code-coverage, code-quality]
uses: WebFiori/workflows/.github/workflows/release-php.yaml@main
with:
branch: 'main'
132 changes: 132 additions & 0 deletions .github/workflows/php85.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: PHP 8.5

on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10

env:
SA_SQL_SERVER_PASSWORD: ${{ secrets.SA_SQL_SERVER_PASSWORD }}
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}

services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
SA_PASSWORD: ${{ secrets.SA_SQL_SERVER_PASSWORD }}
ACCEPT_EULA: Y
MSSQL_PID: Express
ports:
- "1433:1433"
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}
MYSQL_DATABASE: testing_db
MYSQL_ROOT_HOST: '%'
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: true

name: Run PHPUnit Tests

steps:
- name: Clone Repo
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.5
extensions: mysqli, mbstring, sqlsrv
tools: phpunit:12.5.4, composer

- name: Install ODBC Driver for SQL Server
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 ACCEPT_EULA=Y apt install mssql-tools18 unixodbc-dev msodbcsql18

- name: Wait for SQL Server
run: |
for i in {1..12}; do
if /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P '${{ secrets.SA_SQL_SERVER_PASSWORD }}' -Q 'SELECT 1' -C > /dev/null 2>&1; then
echo "SQL Server is ready"
break
fi
echo "Waiting for SQL Server... ($i/12)"
sleep 10
done

- name: Create SQL Server Database
run: /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P '${{ secrets.SA_SQL_SERVER_PASSWORD }}' -Q 'create database testing_db' -C

- name: Setup MySQL Client
run: |
sudo apt update
sudo apt install mysql-client-core-8.0

- name: Wait for MySQL
run: |
until mysqladmin ping -h 127.0.0.1 --silent; do
echo 'waiting for mysql...'
sleep 1
done

- name: Create MySQL Database
run: |
mysql -h 127.0.0.1 -u root -p${{ secrets.MYSQL_ROOT_PASSWORD }} -e "CREATE DATABASE IF NOT EXISTS testing_db;"

- name: Install Dependencies
run: composer install --prefer-source --no-interaction

- name: Execute Tests
run: phpunit --configuration=tests/phpunit10.xml --coverage-clover=clover.xml

- name: Rename coverage report
run: |
mv clover.xml php-8.5-coverage.xml

- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: php-8.5-coverage.xml


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

code-quality:
name: Code Quality
needs: test
uses: WebFiori/workflows/.github/workflows/quality-sonarcloud.yaml@v1.2.1
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

release-prod:
name: Prepare Production Release Branch / Publish Release
needs: [code-coverage, code-quality]
uses: WebFiori/workflows/.github/workflows/release-php.yaml@v1.2.1
with:
branch: 'main'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ App/Config/*
*.Identifier
tests/clover.xml
/.vscode
/App
69 changes: 69 additions & 0 deletions App/Config/config-with-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"base-url":"DYNAMIC",
"theme":null,
"home-page":"BASE_URL",
"primary-lang":"env:LANG",
"titles":{
"AR":"افتراضي",
"EN":"Default"
},
"name-separator":"|",
"scheduler-password":"env:SCHEDULER_PASS",
"app-names":{
"AR":"تطبيق",
"EN":"Application"
},
"app-descriptions":{
"AR":"",
"EN":""
},
"version-info":{
"version":"1.0",
"version-type":"Stable",
"release-date":"2023-10-30"
},
"env-vars":{
"WF_VERBOSE_2":{
"value":"env:VERBOSE",
"description":"Configure the verbosity of error messsages at run-time. This should be set to true in testing and false in production."
},
"CLI_HTTP_HOST_2":{
"value":"example.com",
"description":"Host name that will be used when runing the application as command line utility."
},
"HOST":"env:HOST"
},
"smtp-connections":{
"conn00": {
"host":"smtp.outlook.com",
"port":"244",
"username":"env:SMTP_00_USER",
"password":"env:SMTP_00_PASS",
"address":"env:SMTP_00_ADDRESS",
"sender-name":"env:SMTP_00_NAME",
"access-token":"env:SMTP_TOKEN"
}
},
"database-connections":{
"New_Connection":{
"type":"mysql",
"host":"env:DB_HOST_1",
"port":3306,
"username":"cool",
"database":"env:DB_NAME_1",
"password":"env:DB_PASS_1",
"extras":{
}
},
"New_Connection_2":{
"type":"mysql",
"host":"env:DB_HOST_2",
"port":3306,
"database":"env:DB_NAME_2",
"password":"env:DB_PASS_2",
"username":"cool",
"extras":{
}
}
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ public function __construct() {
parent::__construct('Third One', 2);
}
/**
* Performs the action that will apply the migration.
*
* Performs the action that will revert back the migration.
*
* @param Database $schema The database at which the migration will be applied to.
*/
public function up(Database $schema) : void {
//TODO: Implement the action which will apply the migration to database.
public function down(Database $schema) : void {
//TODO: Implement the action which will revert back the migration.
}
/**
* Performs the action that will revert back the migration.
*
* Performs the action that will apply the migration.
*
* @param Database $schema The database at which the migration will be applied to.
*/
public function down(Database $schema) : void {
//TODO: Implement the action which will revert back the migration.
public function up(Database $schema) : void {
//TODO: Implement the action which will apply the migration to database.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ public function __construct() {
parent::__construct('Second one', 1);
}
/**
* Performs the action that will apply the migration.
*
* Performs the action that will revert back the migration.
*
* @param Database $schema The database at which the migration will be applied to.
*/
public function up(Database $schema) : void {
//TODO: Implement the action which will apply the migration to database.
public function down(Database $schema) : void {
//TODO: Implement the action which will revert back the migration.
}
/**
* Performs the action that will revert back the migration.
*
* Performs the action that will apply the migration.
*
* @param Database $schema The database at which the migration will be applied to.
*/
public function down(Database $schema) : void{
//TODO: Implement the action which will revert back the migration.
public function up(Database $schema) : void {
//TODO: Implement the action which will apply the migration to database.
}
}
Loading
Loading