Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f7610f8
add trim_trailing_whitespace and insert_final_newline to .editorconfig
fadrian06 Mar 26, 2026
b312f61
set indent_size 4 in phpunit-watcher.yml
fadrian06 Mar 26, 2026
f9b7c6b
delete index.php
fadrian06 Mar 26, 2026
cc5d162
ignore README.md from composer install
fadrian06 Mar 26, 2026
6ece1ed
allow !is_array() in contributions (cleaner and readable code)
fadrian06 Mar 26, 2026
f1a8c81
reset default phpcs psr12 rules
fadrian06 Mar 26, 2026
6cd027e
clean .gitignore
fadrian06 Mar 26, 2026
7f20704
update broken packagist homepage
fadrian06 Mar 26, 2026
eac46db
update contributors homepages
fadrian06 Mar 26, 2026
42e8166
ignore .phpunit.result.cache, phpcs.xml, phpstan.neon and phpunit.xml
fadrian06 Mar 26, 2026
c8e7855
rename flight -> src
fadrian06 Mar 26, 2026
4f6080f
add psr-4
fadrian06 Mar 26, 2026
450eea8
simplify autoload-dev to a single psr-4 autoload
fadrian06 Mar 26, 2026
a19a627
allow to set phpunit-watcher options per contributor
fadrian06 Mar 26, 2026
3046bf7
fix coverage generation
fadrian06 Mar 26, 2026
b0b3e09
remove test-coverage:win
fadrian06 Mar 26, 2026
17e0224
simplify lint and beautify scripts
fadrian06 Mar 26, 2026
d2d1d05
update GEMINI.md and copilot-instructions.md
fadrian06 Mar 26, 2026
26ce749
remove ignored required_once __DIR__ . '/core/Loader.php'
fadrian06 Mar 26, 2026
7b1e414
update Loader docblock
fadrian06 Mar 26, 2026
6784507
refactor step 1 of Loader
fadrian06 Mar 26, 2026
886e584
remove v2 loader in favor of psr-4
fadrian06 Mar 26, 2026
07d72d2
remove Loader::autoload in favor of psr-4
fadrian06 Mar 26, 2026
78b8c4b
remove directory loading in favor of psr-4
fadrian06 Mar 26, 2026
7a73e0e
simplify ref object
fadrian06 Mar 26, 2026
a9ce596
refactor LoaderTest
fadrian06 Mar 26, 2026
701e0e7
fix TypeError
fadrian06 Mar 26, 2026
dd201d1
replace Exception for Throwable
fadrian06 Mar 26, 2026
95262bd
refactor EventDispatcher
fadrian06 Mar 26, 2026
9dca6fb
ignore phpunit-watcher.yml.dist from composer install
fadrian06 Mar 26, 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
5 changes: 2 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
indent_size = 2

[tests/views/*.php]
insert_final_newline = false
5 changes: 2 additions & 3 deletions .gemini/GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ This is the main FlightPHP core library for building fast, simple, and extensibl
- Run tests: `composer test` (uses phpunit/phpunit and spatie/phpunit-watcher)
- Run test server: `composer test-server` or `composer test-server-v2`
- Lint code: `composer lint` (uses phpstan/phpstan, level 6)
- Beautify code: `composer beautify` (uses squizlabs/php_codesniffer, PSR1)
- Check code style: `composer phpcs`
- Format code: `composer format` (uses squizlabs/php_codesniffer, PSR12)
- Test coverage: `composer test-coverage`

## Coding Standards
- Follow PSR1 coding standards (enforced by PHPCS)
- Follow PSR12 coding standards (enforced by PHPCS)
- Use strict comparisons (`===`, `!==`)
- PHPStan level 6 compliance
- Focus on PHP 7.4 compatibility (avoid PHP 8+ only features)
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/CONTRIBUTING.md export-ignore
/index.php export-ignore
/phpcs.xml.dist export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.dist.neon export-ignore
/phpunit-watcher.yml export-ignore
/phpunit-watcher.yml.dist export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
5 changes: 2 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ This is the main FlightPHP core library for building fast, simple, and extensibl
- Run tests: `composer test` (uses phpunit/phpunit and spatie/phpunit-watcher)
- Run test server: `composer test-server` or `composer test-server-v2`
- Lint code: `composer lint` (uses phpstan/phpstan, level 6)
- Beautify code: `composer beautify` (uses squizlabs/php_codesniffer, PSR1)
- Check code style: `composer phpcs`
- Format code: `composer format` (uses squizlabs/php_codesniffer, PSR12)
- Test coverage: `composer test-coverage`

## Coding Standards
- Follow PSR1 coding standards (enforced by PHPCS)
- Follow PSR12 coding standards (enforced by PHPCS)
- Use strict comparisons (`===`, `!==`)
- PHPStan level 6 compliance
- Focus on PHP 7.4 compatibility (avoid PHP 8+ only features)
16 changes: 5 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
.idea/
.vscode/
vendor/
composer.phar
composer.lock
.phpunit.result.cache
coverage/
*.sublime*
clover.xml
.phpunit.result.cache
/coverage/
/vendor/
composer.lock
phpcs.xml
phpstan.neon
phpunit-watcher.yml
phpunit.xml
.runway-config.json
.runway-creds.json
.DS_Store
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Flight aims to be simple and fast. Anything that compromises either of those two

* **Coding Standards** - We use PSR1 coding standards enforced by PHPCS. Some standards that either need additional configuration or need to be manually done are:
* PHPStan is at level 6.
* `===` instead of truthy or falsey statements like `==` or `!is_array()`.
* `===` instead of truthy or falsey statements like `==`.

* **PHP 7.4 Focused** - We do not make PHP 8+ focused enhancements on the framework as the focus is maintaining PHP 7.4.

Expand Down
60 changes: 27 additions & 33 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "flightphp/core",
"description": "Flight is a fast, simple, extensible framework for PHP. Flight enables you to quickly and easily build RESTful web applications. This is the maintained fork of mikecao/flight",
"homepage": "http://flightphp.com",
"homepage": "https://docs.flightphp.com/",
"license": "MIT",
"authors": [
{
"name": "Mike Cao",
"email": "mike@mikecao.com",
"homepage": "http://www.mikecao.com/",
"homepage": "https://mikecao.com/",
"role": "Original Developer"
},
{
"name": "Franyer Sánchez",
"email": "franyeradriansanchez@gmail.com",
"homepage": "https://faslatam.42web.io",
"homepage": "https://faslatam.42web.io/",
"role": "Maintainer"
},
{
Expand All @@ -27,21 +27,16 @@
"ext-json": "*"
},
"autoload": {
"files": [
"flight/autoload.php"
]
},
"autoload-dev": {
"classmap": [
"tests/classes/"
"src/Flight.php"
],
"psr-4": {
"Tests\\PHP8\\": [
"tests/named-arguments"
],
"Tests\\Server\\": "tests/server",
"Tests\\ServerV2\\": "tests/server-v2",
"tests\\groupcompactsyntax\\": "tests/groupcompactsyntax"
"flight\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"tests\\": "tests"
}
},
"require-dev": {
Expand All @@ -54,7 +49,9 @@
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^9.6",
"rregeer/phpunit-coverage-check": "^0.3.1",
"squizlabs/php_codesniffer": "^4.0"
"spatie/phpunit-watcher": "^1.23",
"squizlabs/php_codesniffer": "^4.0",
"symfony/var-dumper": "^5.4"
},
"config": {
"allow-plugins": {
Expand All @@ -65,28 +62,20 @@
},
"scripts": {
"test": "phpunit",
"test-watcher": [
"phpunit-watcher || composer global require spatie/phpunit-watcher --dev",
"phpunit-watcher watch"
],
"test-watcher": "phpunit-watcher watch",
"test-coverage": [
"rm -f clover.xml",
"rm -rf coverage",
"@putenv XDEBUG_MODE=coverage",
"phpunit --coverage-html=coverage --coverage-clover=clover.xml",
"coverage-check clover.xml 100"
"phpunit --coverage-html coverage --coverage-clover coverage/clover.xml",
"coverage-check coverage/clover.xml 100"
],
"test-server": [
"echo \"Running Test Server\"",
"@php -S localhost:8000 -t tests/server"
],
"test-server-v2": [
"echo \"Running Test Server\"",
"@php -S localhost:8000 -t tests/server-v2"
],
"test-coverage:win": [
"del clover.xml",
"phpunit --coverage-html=coverage --coverage-clover=clover.xml",
"coverage-check clover.xml 100"
"@php -S localhost:8000 -t tests/server_v2"
],
"test-performance": [
"echo \"Running Performance Tests...\"",
Expand All @@ -97,13 +86,18 @@
"rm server.pid",
"echo \"Performance Tests Completed.\""
],
"lint": "phpstan --no-progress --memory-limit=256M",
"beautify": "phpcbf",
"phpcs": "phpcs",
"lint": [
"phpstan --no-progress --memory-limit=256M",
"phpcs"
],
"format": [
"phpcbf"
],
"post-install-cmd": [
"@php -r \"if (!file_exists('phpcs.xml')) copy('phpcs.xml.dist', 'phpcs.xml');\"",
"@php -r \"if (!file_exists('phpstan.neon')) copy('phpstan.dist.neon', 'phpstan.neon');\"",
"@php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\""
"@php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\"",
"@php -r \"if (!file_exists('phpunit-watcher.yml')) copy('phpunit-watcher.yml.dist', 'phpunit-watcher.yml');\""
]
},
"suggest": {
Expand Down
10 changes: 0 additions & 10 deletions flight/autoload.php

This file was deleted.

Loading
Loading