Skip to content
Merged

Dev #18

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
09827af
chore: Updated Composer Dependencies
usernane Dec 4, 2024
546eec2
chore: Updated Dependencies
usernane Dec 4, 2024
ed7c3b0
refactor: Simplify the Code on Index
usernane Dec 4, 2024
930cf54
ci: Added Release Please
usernane Dec 4, 2024
c82b989
chore: release v3.0.0-Beta.18
usernane Dec 4, 2024
d287aab
chore(dev): release 3.0.0-Beta.18
github-actions[bot] Dec 4, 2024
e7613c5
Merge pull request #17 from WebFiori/release-please--branches--dev
usernane Dec 4, 2024
7416076
chore: Updated Framework Version
usernane Apr 8, 2025
c64cd1a
Update bootstrap.php
usernane Apr 8, 2025
0092277
Update php.yml
usernane Apr 9, 2025
2a95eef
Update php.yml
usernane Apr 9, 2025
4a08ff5
Update php.yml
usernane Apr 9, 2025
8c969b0
Update index.php
usernane Apr 9, 2025
49010d0
Update .gitattributes
usernane Apr 9, 2025
8663e0b
Create release-commit.php
usernane Apr 9, 2025
e21bbf5
chore: release v3.0.0-Beta.26
usernane Apr 9, 2025
f48d970
chore(dev): release 3.0.0-Beta.26
github-actions[bot] Apr 9, 2025
1511b06
Merge pull request #19 from WebFiori/release-please--branches--dev
usernane Apr 9, 2025
10d6166
Update WebFioriV108.php
usernane Oct 23, 2025
bdadb77
Update index.php
usernane Oct 23, 2025
f1c88e5
Update composer.json
usernane Oct 23, 2025
53a7712
chore: Updated Dependencies
usernane Mar 30, 2026
1e098bc
chore: Updated Dependencies
usernane Mar 30, 2026
0a59617
chore: Updated Dependencies
usernane Apr 8, 2026
2787322
test: Updated Sample Tests and Bootstrap
usernane Apr 8, 2026
2156f3f
chore: Updated `index.php`
usernane Apr 8, 2026
7d8d57f
chore: Updated GitIgnore
usernane Apr 9, 2026
3020451
chore: Run CS Fixer
usernane Apr 9, 2026
f9b1a8a
chore: No Longer Needed
usernane Apr 9, 2026
d17e3b6
Delete s.temp
usernane Apr 9, 2026
2e4b526
chore: Updated Dependencies
usernane Apr 9, 2026
081c2f9
chore: Added PHP CS Fixer Config
usernane Apr 9, 2026
6b77a54
chore: Updated Release Content
usernane Apr 9, 2026
dd8171a
docs: Updated README
usernane Apr 9, 2026
e1bb424
Delete composer.lock
usernane Apr 9, 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
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
/tests export-ignore
/.github export-ignore
/README.md export-ignore
/CHANGELOG.md export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml export-ignore
/sonar-project.properties export-ignore
/sonar-project.properties export-ignore
/release-commit.php export-ignore
38 changes: 33 additions & 5 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,54 @@ on:
branches: [ main ]

jobs:
build:

test:
name: Run Tests
runs-on: ubuntu-latest

strategy:
fail-fast: true

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@2.30.0
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, sqlsrv, iconv
tools: phpunit, composer
tools: phpunit:9.5.20, composer

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Execute Tests
run: phpunit --configuration tests/phpunit.xml

release_staging:
name: Prepare Beta Release Branch
needs:
- "test"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev'
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/release-please-action@v3
with:
release-type: php
default-branch: dev
config-file: release-please-config.json
token: ${{ secrets.GITHUB_TOKEN }}
release_prod:
name: Prepare Production Release Branch
needs:
- "test"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/release-please-action@v3
with:
release-type: php
config-file: release-please-config.json
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/nbproject/*
app/storage/*
vendor/*
app/sto
.idea/*
.vscode/*
tests/.phpunit.result.cache
*/config/*
*/Storage/*
*.cache
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

## [3.0.0-Beta.26](https://github.com/WebFiori/app/compare/v3.0.0-Beta.18...v3.0.0-Beta.26) (2025-04-09)


### Miscellaneous Chores

* release v3.0.0-Beta.26 ([e21bbf5](https://github.com/WebFiori/app/commit/e21bbf5aedcbccaf83faff0e336561adaa72049c))
* Updated Framework Version ([7416076](https://github.com/WebFiori/app/commit/74160762dafa7509d7bfd531062be1886979f7b2))

## [3.0.0-Beta.18](https://github.com/WebFiori/app/compare/v3.0.0-RC7...v3.0.0-Beta.18) (2024-12-04)


### Miscellaneous Chores

* release v3.0.0-Beta.18 ([c82b989](https://github.com/WebFiori/app/commit/c82b98939167749b143c8bc86a325609ae6c4b5e))
* Updated Composer Dependencies ([09827af](https://github.com/WebFiori/app/commit/09827af2d4d70b5e7d44d5c1234221528a70e3cf))
* Updated Core Framework Version ([b6e00a3](https://github.com/WebFiori/app/commit/b6e00a3b8883d5736c2ccd96b8c0b8c5e0c025b1))
* Updated Core Framework Version ([48623e3](https://github.com/WebFiori/app/commit/48623e383356957b2008fd09c90be94afdb7da29))
* Updated Core Framework Version ([20ed7ea](https://github.com/WebFiori/app/commit/20ed7ea9939e2cf9339b10964ad5e0cc4b028749))
* Updated Dependencies ([546eec2](https://github.com/WebFiori/app/commit/546eec25bff1736a0b3434243b80ed55df05e532))
* Updated Framework Version ([bf81d5d](https://github.com/WebFiori/app/commit/bf81d5d746103d3491fd2e4ac54179dd587dbbce))
* Updated Framework Version ([2df0e28](https://github.com/WebFiori/app/commit/2df0e2846121f7ed57350da2dc10488592362a89))
* Updated Framework Version ([333ee5c](https://github.com/WebFiori/app/commit/333ee5c3f8d73388dc9d5889006568ce2413d20f))
* Updated Framework Version ([17fb434](https://github.com/WebFiori/app/commit/17fb434209b611e7cfab5a6e6cd288fae924ab23))
* Updated Framework Version ([57f362c](https://github.com/WebFiori/app/commit/57f362c61e572c5b3a1fe4d66c2f7bf9b89c7806))
155 changes: 72 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,118 +1,107 @@
# WebFiori Framework
# WebFiori App Template

<p align="center">
<img width="90px" hight="90px" src="https://webfiori.com/assets/images/favicon.png">
<img width="90px" height="90px" src="https://webfiori.com/assets/images/favicon.png" alt="WebFiori Logo">
</p>

<p align="center">
<a href="https://github.com/WebFiori/framework/actions"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%208.2/badge.svg?branch=master"></a>
<a href="https://codecov.io/gh/WebFiori/framework">
<img src="https://codecov.io/gh/WebFiori/framework/branch/master/graph/badge.svg" />
</a>
<a href="https://sonarcloud.io/dashboard?id=WebFiori_framework">
<img src="https://sonarcloud.io/api/project_badges/measure?project=WebFiori_framework&metric=alert_status" />
</a>
<a href="https://github.com/WebFiori/framework/releases">
<img src="https://img.shields.io/github/release/WebFiori/framework.svg?label=latest" />
</a>
<a href="https://packagist.org/packages/webfiori/framework">
<img src="https://img.shields.io/packagist/dt/webfiori/framework?color=light-green">
</a>
<a href="https://github.com/WebFiori/app/actions"><img src="https://github.com/WebFiori/app/workflows/PHP%20Build/badge.svg?branch=main" alt="Build Status"></a>
<a href="https://github.com/WebFiori/app/releases"><img src="https://img.shields.io/github/release/WebFiori/app.svg?label=latest" alt="Latest Release"></a>
<a href="https://packagist.org/packages/webfiori/app"><img src="https://img.shields.io/packagist/dt/webfiori/app?color=light-green" alt="Downloads"></a>
</p>

## What is WebFiori Framework?
The default application template for [WebFiori Framework](https://github.com/WebFiori/framework). Use this as a starting point to create new WebFiori projects.

WebFiori Framework is a mini web development framework which is built using PHP language. The framework is fully object-oriented (OOP). It uses semi-MVC model, but it does not force it. The framework comes with many features which can help in making your website or web application up and running in no time.
## Requirements

## Supported PHP Versions
| Build Status |
|:-----------:|
|<a target="_blank" href="https://github.com/WebFiori/framework/actions/workflows/php70.yml"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%207.0/badge.svg?branch=master"></a>|
|<a target="_blank" href="https://github.com/WebFiori/framework/actions/workflows/php71.yml"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%207.1/badge.svg?branch=master"></a>|
|<a target="_blank" href="https://github.com/WebFiori/framework/actions/workflows/php72.yml"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%207.2/badge.svg?branch=master"></a>|
|<a target="_blank" href="https://github.com/WebFiori/framework/actions/workflows/php73.yml"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%207.3/badge.svg?branch=master"></a>|
|<a target="_blank" href="https://github.com/WebFiori/framework/actions/workflows/php74.yml"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%207.4/badge.svg?branch=master"></a>|
|<a target="_blank" href="https://github.com/WebFiori/framework/actions/workflows/php80.yml"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%208.0/badge.svg?branch=master"></a>|
|<a target="_blank" href="https://github.com/WebFiori/framework/actions/workflows/php81.yml"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%208.1/badge.svg?branch=master"></a>|
|<a target="_blank" href="https://github.com/WebFiori/framework/actions/workflows/php82.yml"><img src="https://github.com/WebFiori/framework/workflows/Build%20PHP%208.2/badge.svg?branch=master"></a><br>|
- PHP >= 8.1
- [Composer](https://getcomposer.org/)

## Quick Start

## Key Features
```bash
composer create-project webfiori/app my-site
cd my-site
php -S localhost:8080 -t public
```

* Provide minimum utilities to setup a small/medium web application.
* Theming and the ability to create multiple UIs for the same web app using any CSS or JavaScript framework.
* Building and manipulating the DOM of a web page inside PHP.
* Basic template engine.
* Fast and simple routing engine.
* Creation of web services (or APIs) that supports JSON with data filtering and validation.
* Middleware support for HTTP requests filtering before reaching application level.
* Basic support for MySQL and MSSQL schema and query building.
* Lightweight. The total size of framework core files is less than 3 megabytes.
* Access management by assigning system user a set of privileges.
* Customized sessions manager.
* Support for creating and sending nice-looking HTML emails.
* Autoload of user defined classes (loading composer packages also supported).
* Ability to create background tasks and let them run in specific time using CRON.
* Well-defined file upload and file handling sub-system.
* Basic support for creating CLI Applications.
Then open http://localhost:8080 in your browser.

## Standard Libraries
## Project Structure

Following table shows build status of the standard libraries that the framework is composed of. The build is based on the latest stable PHP release.
```
├── public/ # Web server document root
│ ├── index.php # Application entry point
│ ├── .htaccess # Apache rewrite rules
│ ├── web.config # IIS rewrite rules
│ └── assets/ # Static files (CSS, JS, images)
├── tests/ # PHPUnit tests
│ ├── bootstrap.php # Test bootstrap
│ └── phpunit.xml # PHPUnit configuration
├── composer.json
├── php_cs.php.dist # PHP CS Fixer configuration
├── webfiori # CLI entry point (Linux/macOS)
└── webfiori.bat # CLI entry point (Windows)
```

| Library | Build | Latest |
|----|----|----|
| [HTTP](https://github.com/WebFiori/http) | <a href="https://github.com/WebFiori/http/actions"><img src="https://github.com/WebFiori/http/workflows/Build%20PHP%208.2/badge.svg?branch=master"></a> | <a href="https://github.com/WebFiori/http/releases"><img src="https://img.shields.io/github/release/WebFiori/http.svg" /></a> |
| [File](https://github.com/WebFiori/file) | <a href="https://github.com/WebFiori/file/actions"><img src="https://github.com/WebFiori/file/workflows/Build%20PHP%208.2/badge.svg?branch=main"></a> | <a href="https://github.com/WebFiori/file/releases"><img src="https://img.shields.io/github/release/WebFiori/file.svg" /></a> |
| [Json](https://github.com/WebFiori/json) | <a href="https://github.com/WebFiori/json/actions"><img src="https://github.com/WebFiori/json/workflows/Build%20PHP%208.2/badge.svg?branch=master"></a> | <a href="https://github.com/WebFiori/json/releases"><img src="https://img.shields.io/github/release/WebFiori/json.svg" /></a> |
| [UI](https://github.com/WebFiori/ui) | <a href="https://github.com/WebFiori/ui/actions"><img src="https://github.com/WebFiori/ui/workflows/Build%20PHP%208.2/badge.svg?branch=master"></a> | <a href="https://github.com/WebFiori/ui/releases"><img src="https://img.shields.io/github/release/WebFiori/ui.svg" /></a> |
| [Collections](https://github.com/WebFiori/collections) | <a href="https://github.com/WebFiori/collections/actions"><img src="https://github.com/WebFiori/collections/workflows/Build%20PHP%208.2/badge.svg?branch=master"></a> | <a href="https://github.com/WebFiori/collections/releases"><img src="https://img.shields.io/github/release/WebFiori/collections.svg" /></a> |
| [Database](https://github.com/WebFiori/database) | <a href="https://github.com/WebFiori/database/actions"><img src="https://github.com/WebFiori/database/workflows/Build%20PHP%208.2/badge.svg?branch=main"></a> | <a href="https://github.com/WebFiori/database/releases"><img src="https://img.shields.io/github/release/WebFiori/database.svg" /></a> |
| [CLI](https://github.com/WebFiori/cli) | <a href="https://github.com/WebFiori/cli/actions"><img src="https://github.com/WebFiori/cli/workflows/Build%20PHP%208.2/badge.svg?branch=main"></a> | <a href="https://github.com/WebFiori/cli/releases"><img src="https://img.shields.io/github/release/WebFiori/cli.svg" /></a> |
| [Mailer](https://github.com/WebFiori/mail) | <a href="https://github.com/WebFiori/mail/actions"><img src="https://github.com/WebFiori/err/workflows/Build%20PHP%208.2/badge.svg?branch=main"></a> | <a href="https://github.com/WebFiori/mail/releases"><img src="https://img.shields.io/github/release/WebFiori/mail.svg" /></a> |
| [Errors and Exceptions Handler](https://github.com/WebFiori/err) | <a href="https://github.com/WebFiori/err/actions"><img src="https://github.com/WebFiori/err/workflows/Build%20PHP%208.2/badge.svg?branch=main"></a> | <a href="https://github.com/WebFiori/err/releases"><img src="https://img.shields.io/github/release/WebFiori/err.svg" /></a> |
After running `composer create-project`, the framework will generate an `App/` directory containing your application code (routes, middleware, commands, etc.).

## Problems Solved
## Customizing the App Directory

One of the things that any developer cares about any software project is the problem or problems it solves. As for WebFiori framework, It can help in solving the following problems:
* The ability to create a customized links to web pages as needed by using [Routing](https://webfiori.com/learn/routing).
* No need for touching HTML to play with the DOM by using [UI Library](https://webfiori.com/learn/ui-package) of the framework.
* Run PHP code as a CRON task through HTTP protocol or through terminal as a [Background Job](https://webfiori.com/learn/background-tasks).
* Changing whole user interface by changing one line of code through [Theming](https://webfiori.com/learn/themes).
* Ability to move the source code of the web application without having to do a lot of re-configuration.
* [Sending HTML email](https://webfiori.com/learn/sending-emails) messages with attachments without having to write a lot of code.
* Solved the issues which are found in default PHP session management implementation by implementing a custom [Sessions Management System](https://webfiori.com/learn/sessions-management).
* Reduce the number of dependencies at which a developer need to set up a web application.
By default, the framework uses `App/` as the application root directory. To change this, edit the first parameter of `App::initiate()` in `public/index.php`:

## Getting Started
```php
App::initiate('MyApp', 'public', __DIR__);
```

To learn the basics of how to use the framework, please head on to https://webfiori.com/learn. You can also read same docs which can be found in [docs repo](https://github.com/usernane/wf-docs). In addition to that, you can read the API docs of the framework at [the official website](https://webfiori.com/docs).
Reasons you might want to rename it:

- Gives your project a distinct identity instead of a generic `App/` folder.
- Avoids naming conflicts if you're integrating WebFiori into an existing project that already has an `App/` directory.
- Makes it easier to distinguish between multiple WebFiori-based projects in the same workspace.

## Setup
## Running Tests

### Local Development Environment
```bash
composer test
```

If you plan to test the framework on your local machine, the recommended way is to have AMP stack (Apache, MySQL and PHP). There are many available online. We suggest to use the ones that are offered by Bitnami. You can go to https://bitnami.com/stacks/infrastructure to check the available options.
## Code Style

After installing AMP stack, you can either use composer to install the framework or install it manually by download it through https://webfiori.com/download. If you plan to use composer, then you must first download composer from their website: https://getcomposer.org/download/. Once downloaded, place the `.phar` file in the folder `htdocs` or your server root. Once you do that, run the terminal in `htdocs` and run the following command:
This project uses [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) for code style enforcement.

```bash
composer cs-check # Check for violations (dry run)
composer cs-fix # Auto-fix violations
```
php composer.phar create-project --prefer-dist webfiori/app my-site

## CLI Usage

WebFiori includes a CLI tool for common tasks:

```bash
# Linux/macOS
php webfiori

# Windows
webfiori.bat
```
This command will create new folder with the name `my-site` and install the framework inside it.

For more information about how to set up the framework, [check here](https://webfiori.com/learn/installation).
## Documentation

- [Getting Started](https://webfiori.com/learn)
- [API Reference](https://webfiori.com/docs)
- [Framework Repository](https://github.com/WebFiori/framework)

## Contributing

## Contribution
For information on how to contribute, see [the contribution guide](https://webfiori.com/contribute).

For information on how to contribute to the project, [check here](https://webfiori.com/contribute).
## Reporting Issues

## Notes
* If you think that there is a better way of doing things or wants new feature, feel free to [drop an issue](https://github.com/WebFiori/framework/issues/new).
* To report security vulnerabilities, please email [ibrahim@webfiori.com](mailto:ibrahim@webfiori.com).
- For bugs and feature requests, [open an issue](https://github.com/WebFiori/app/issues/new).
- For security vulnerabilities, please email [ibrahim@webfiori.com](mailto:ibrahim@webfiori.com).

## License

The project is licensed under MIT license.
This project is licensed under the [MIT License](LICENSE).
39 changes: 0 additions & 39 deletions app/config/app-config-prod.json

This file was deleted.

43 changes: 0 additions & 43 deletions app/config/app-config-staging.json

This file was deleted.

Loading
Loading