Skip to content

Commit 897a8c9

Browse files
authored
chore: Merge pull request #18 from WebFiori/dev
Release-As: v3.0.0-RC0
2 parents 354cc88 + e1bb424 commit 897a8c9

46 files changed

Lines changed: 418 additions & 4081 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
/tests export-ignore
33
/.github export-ignore
44
/README.md export-ignore
5+
/CHANGELOG.md export-ignore
56
/.gitignore export-ignore
67
/.travis.yml export-ignore
78
/phpunit.xml export-ignore
8-
/sonar-project.properties export-ignore
9+
/sonar-project.properties export-ignore
10+
/release-commit.php export-ignore

.github/workflows/php.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,54 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
build:
11-
10+
test:
11+
name: Run Tests
1212
runs-on: ubuntu-latest
1313

1414
strategy:
1515
fail-fast: true
1616

1717
steps:
1818

19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- name: Setup PHP
22-
uses: shivammathur/setup-php@2.30.0
22+
uses: shivammathur/setup-php@v2
2323
with:
2424
php-version: 8.3
2525
extensions: mbstring, sqlsrv, iconv
26-
tools: phpunit, composer
26+
tools: phpunit:9.5.20, composer
2727

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

3131
- name: Execute Tests
3232
run: phpunit --configuration tests/phpunit.xml
33+
34+
release_staging:
35+
name: Prepare Beta Release Branch
36+
needs:
37+
- "test"
38+
runs-on: ubuntu-latest
39+
if: github.ref == 'refs/heads/dev'
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: google-github-actions/release-please-action@v3
43+
with:
44+
release-type: php
45+
default-branch: dev
46+
config-file: release-please-config.json
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
release_prod:
49+
name: Prepare Production Release Branch
50+
needs:
51+
- "test"
52+
runs-on: ubuntu-latest
53+
if: github.ref == 'refs/heads/main'
54+
steps:
55+
- uses: actions/checkout@v4
56+
- uses: google-github-actions/release-please-action@v3
57+
with:
58+
release-type: php
59+
config-file: release-please-config.json
60+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/nbproject/*
2-
app/storage/*
32
vendor/*
4-
app/sto
53
.idea/*
64
.vscode/*
75
tests/.phpunit.result.cache
86
*/config/*
7+
*/Storage/*
8+
*.cache

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changelog
2+
3+
## [3.0.0-Beta.26](https://github.com/WebFiori/app/compare/v3.0.0-Beta.18...v3.0.0-Beta.26) (2025-04-09)
4+
5+
6+
### Miscellaneous Chores
7+
8+
* release v3.0.0-Beta.26 ([e21bbf5](https://github.com/WebFiori/app/commit/e21bbf5aedcbccaf83faff0e336561adaa72049c))
9+
* Updated Framework Version ([7416076](https://github.com/WebFiori/app/commit/74160762dafa7509d7bfd531062be1886979f7b2))
10+
11+
## [3.0.0-Beta.18](https://github.com/WebFiori/app/compare/v3.0.0-RC7...v3.0.0-Beta.18) (2024-12-04)
12+
13+
14+
### Miscellaneous Chores
15+
16+
* release v3.0.0-Beta.18 ([c82b989](https://github.com/WebFiori/app/commit/c82b98939167749b143c8bc86a325609ae6c4b5e))
17+
* Updated Composer Dependencies ([09827af](https://github.com/WebFiori/app/commit/09827af2d4d70b5e7d44d5c1234221528a70e3cf))
18+
* Updated Core Framework Version ([b6e00a3](https://github.com/WebFiori/app/commit/b6e00a3b8883d5736c2ccd96b8c0b8c5e0c025b1))
19+
* Updated Core Framework Version ([48623e3](https://github.com/WebFiori/app/commit/48623e383356957b2008fd09c90be94afdb7da29))
20+
* Updated Core Framework Version ([20ed7ea](https://github.com/WebFiori/app/commit/20ed7ea9939e2cf9339b10964ad5e0cc4b028749))
21+
* Updated Dependencies ([546eec2](https://github.com/WebFiori/app/commit/546eec25bff1736a0b3434243b80ed55df05e532))
22+
* Updated Framework Version ([bf81d5d](https://github.com/WebFiori/app/commit/bf81d5d746103d3491fd2e4ac54179dd587dbbce))
23+
* Updated Framework Version ([2df0e28](https://github.com/WebFiori/app/commit/2df0e2846121f7ed57350da2dc10488592362a89))
24+
* Updated Framework Version ([333ee5c](https://github.com/WebFiori/app/commit/333ee5c3f8d73388dc9d5889006568ce2413d20f))
25+
* Updated Framework Version ([17fb434](https://github.com/WebFiori/app/commit/17fb434209b611e7cfab5a6e6cd288fae924ab23))
26+
* Updated Framework Version ([57f362c](https://github.com/WebFiori/app/commit/57f362c61e572c5b3a1fe4d66c2f7bf9b89c7806))

README.md

Lines changed: 72 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,107 @@
1-
# WebFiori Framework
1+
# WebFiori App Template
22

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

77
<p align="center">
8-
<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>
9-
<a href="https://codecov.io/gh/WebFiori/framework">
10-
<img src="https://codecov.io/gh/WebFiori/framework/branch/master/graph/badge.svg" />
11-
</a>
12-
<a href="https://sonarcloud.io/dashboard?id=WebFiori_framework">
13-
<img src="https://sonarcloud.io/api/project_badges/measure?project=WebFiori_framework&metric=alert_status" />
14-
</a>
15-
<a href="https://github.com/WebFiori/framework/releases">
16-
<img src="https://img.shields.io/github/release/WebFiori/framework.svg?label=latest" />
17-
</a>
18-
<a href="https://packagist.org/packages/webfiori/framework">
19-
<img src="https://img.shields.io/packagist/dt/webfiori/framework?color=light-green">
20-
</a>
8+
<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>
9+
<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>
10+
<a href="https://packagist.org/packages/webfiori/app"><img src="https://img.shields.io/packagist/dt/webfiori/app?color=light-green" alt="Downloads"></a>
2111
</p>
2212

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

25-
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.
15+
## Requirements
2616

27-
## Supported PHP Versions
28-
| Build Status |
29-
|:-----------:|
30-
|<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>|
31-
|<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>|
32-
|<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>|
33-
|<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>|
34-
|<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>|
35-
|<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>|
36-
|<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>|
37-
|<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>|
17+
- PHP >= 8.1
18+
- [Composer](https://getcomposer.org/)
3819

20+
## Quick Start
3921

40-
## Key Features
22+
```bash
23+
composer create-project webfiori/app my-site
24+
cd my-site
25+
php -S localhost:8080 -t public
26+
```
4127

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

59-
## Standard Libraries
30+
## Project Structure
6031

61-
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.
32+
```
33+
├── public/ # Web server document root
34+
│ ├── index.php # Application entry point
35+
│ ├── .htaccess # Apache rewrite rules
36+
│ ├── web.config # IIS rewrite rules
37+
│ └── assets/ # Static files (CSS, JS, images)
38+
├── tests/ # PHPUnit tests
39+
│ ├── bootstrap.php # Test bootstrap
40+
│ └── phpunit.xml # PHPUnit configuration
41+
├── composer.json
42+
├── php_cs.php.dist # PHP CS Fixer configuration
43+
├── webfiori # CLI entry point (Linux/macOS)
44+
└── webfiori.bat # CLI entry point (Windows)
45+
```
6246

63-
| Library | Build | Latest |
64-
|----|----|----|
65-
| [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> |
66-
| [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> |
67-
| [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> |
68-
| [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> |
69-
| [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> |
70-
| [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> |
71-
| [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> |
72-
| [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> |
73-
| [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> |
47+
After running `composer create-project`, the framework will generate an `App/` directory containing your application code (routes, middleware, commands, etc.).
7448

75-
## Problems Solved
49+
## Customizing the App Directory
7650

77-
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:
78-
* The ability to create a customized links to web pages as needed by using [Routing](https://webfiori.com/learn/routing).
79-
* No need for touching HTML to play with the DOM by using [UI Library](https://webfiori.com/learn/ui-package) of the framework.
80-
* Run PHP code as a CRON task through HTTP protocol or through terminal as a [Background Job](https://webfiori.com/learn/background-tasks).
81-
* Changing whole user interface by changing one line of code through [Theming](https://webfiori.com/learn/themes).
82-
* Ability to move the source code of the web application without having to do a lot of re-configuration.
83-
* [Sending HTML email](https://webfiori.com/learn/sending-emails) messages with attachments without having to write a lot of code.
84-
* 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).
85-
* Reduce the number of dependencies at which a developer need to set up a web application.
51+
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`:
8652

87-
## Getting Started
53+
```php
54+
App::initiate('MyApp', 'public', __DIR__);
55+
```
8856

89-
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).
57+
Reasons you might want to rename it:
9058

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

92-
## Setup
63+
## Running Tests
9364

94-
### Local Development Environment
65+
```bash
66+
composer test
67+
```
9568

96-
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.
69+
## Code Style
9770

98-
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:
71+
This project uses [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) for code style enforcement.
9972

73+
```bash
74+
composer cs-check # Check for violations (dry run)
75+
composer cs-fix # Auto-fix violations
10076
```
101-
php composer.phar create-project --prefer-dist webfiori/app my-site
77+
78+
## CLI Usage
79+
80+
WebFiori includes a CLI tool for common tasks:
81+
82+
```bash
83+
# Linux/macOS
84+
php webfiori
85+
86+
# Windows
87+
webfiori.bat
10288
```
103-
This command will create new folder with the name `my-site` and install the framework inside it.
10489

105-
For more information about how to set up the framework, [check here](https://webfiori.com/learn/installation).
90+
## Documentation
91+
92+
- [Getting Started](https://webfiori.com/learn)
93+
- [API Reference](https://webfiori.com/docs)
94+
- [Framework Repository](https://github.com/WebFiori/framework)
10695

96+
## Contributing
10797

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

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

112-
## Notes
113-
* 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).
114-
* To report security vulnerabilities, please email [ibrahim@webfiori.com](mailto:ibrahim@webfiori.com).
102+
- For bugs and feature requests, [open an issue](https://github.com/WebFiori/app/issues/new).
103+
- For security vulnerabilities, please email [ibrahim@webfiori.com](mailto:ibrahim@webfiori.com).
115104

116105
## License
117106

118-
The project is licensed under MIT license.
107+
This project is licensed under the [MIT License](LICENSE).

app/config/app-config-prod.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

app/config/app-config-staging.json

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)