fadrian06
0eac13f4fa
Added Testing helper classes strict types
1 year ago
fadrian06
84877b34f4
Merge pull request #530 from flightphp/async-related
...
added some methods to help with async frameworks
1 year ago
fadrian06
84cdbcbdc3
Fixed phpcs format problems in tests
1 year ago
fadrian06
bdca41d7e1
Added development classmap autoloader
1 year ago
Austin Collier
c6754dfe59
added some methods to help with async frameworks
1 year ago
Austin Collier
cc4338a34b
added PSR12 coding style to files.
1 year ago
fadrian06
751f17be0d
Fixed conflicting typehint in Loader::class
1 year ago
fadrian06
b426e42e4f
Added typehints to View::class
1 year ago
n0nag0n
1e4c07da52
correct unit test and removed final keywords
1 year ago
n0nag0n
a42cbfe13c
Merge pull request #515 from flightphp/dev
...
Fixed tests and lint problems in windows
1 year ago
fadrian06
193cf9bb8b
Removed type hints to PHP 5 compatibility
1 year ago
n0nag0n
bef92303d7
Merge pull request #514 from flightphp/middleware
...
Middleware code
1 year ago
n0nag0n
c98d6ce7d4
Lots of tweaks for middleware. Cleaned up old code.
1 year ago
n0nag0n
b388a26765
fixed alias issue, levenshtein recommendations and coverage-check
1 year ago
fadrian06
9251a6da90
Apply code-style
1 year ago
fadrian06
9cd5b9dc0d
Fixed windows directory separator compatibility
1 year ago
Austin Collier
f543d74bfe
Middleware code
1 year ago
Austin Collier
c7a143db04
fixed issue with multiline possibilities in url query
1 year ago
Austin Collier
8bd7fd035b
fixed params with numbers
1 year ago
Austin Collier
74d2fd7002
Fixes for group routing
1 year ago
Austin Collier
387f15bd8b
fixed optional params with aliasing
1 year ago
n0nag0n
fd4ce43c44
added route alias to engine/flight
1 year ago
n0nag0n
7991530761
Route alias and phpstan updates
1 year ago
n0nag0n
ceeab06e45
Merge pull request #505 from flightphp/database-class
...
Database class
1 year ago
Austin Collier
a5f2a5e771
Unit tests and such
1 year ago
Austin Collier
65b3d5445f
Lots more unit testing for group based routing
1 year ago
Austin Collier
a3555b019f
Added documentation to readme on grouping
1 year ago
Austin Collier
12073629cc
added ability to group routes together
1 year ago
Austin Collier
0b149349fc
Test to confirm #161 is fixed.
1 year ago
Austin Collier
2c2b28af95
100% code coverage everywhere now
1 year ago
Austin Collier
48164961fb
Engine at 100% coverage
1 year ago
n0nag0n
317ad3140e
removed comment
1 year ago
n0nag0n
bf2075245e
Got it to 90% coverage with some windows fixes
1 year ago
n0nag0n
d075fc8be6
100% View class coverage
1 year ago
n0nag0n
9a007c5216
100% Coverage for core Classes
1 year ago
n0nag0n
e36e9024c6
100% Coverage Dispatcher Class
1 year ago
n0nag0n
7b15d2cfca
100% coverage for net classes
1 year ago
n0nag0n
39f61b3d74
Router with 100% coverage
1 year ago
n0nag0n
a416bfe19b
100% coverage for Request and Route
1 year ago
n0nag0n
0d026b16d1
added test for unique subdir setup in request
1 year ago
n0nag0n
9faf27262c
cleaned up some unit test requires
1 year ago
Austin Collier
3d58a5bee4
added phpunit config for testing coverage
1 year ago
Michal Hybner
21a0c55375
Fix JSON request with empty body
3 years ago
Masroor Ehsan
ff852c19e3
updated phpunit and tests
4 years ago
Mike Cao
da8eaefc63
Merge pull request #398 from hlidotbe/feature/request-host
...
Add host to request
6 years ago
Hugues Lismonde
b4c9c42b00
Add host to request
...
The requested host can be useful to build an url or route request based
on which host was used.
6 years ago
Hugues Lismonde
e0dfb7406d
Fix request schem
...
As mentionned in #396 , the request scheme was not as documented,
returning SERVER_PROTOCOL instead.
The `getScheme` function is now used to handle common cases (HTTPS,
FORWATED_PROTO, ...).
`request->secure` is also based on the scheme now as `$_SERVER['HTTPS']`
is unreliable for this purpose.
6 years ago
Delyan Angelov
406be00436
Add a failing test for routing URLs containing Cyrillic letters.
6 years ago
Mike Cao
b781e63d08
Fix test.
7 years ago
Mike Cao
0386339331
Updated test asset.
8 years ago
Mike Cao
c3c6f68909
Removed another case of $route passing. Updated tests.
8 years ago
Mike Cao
6aea7394c4
Remove $route from parameter list, only pass when dispatching callback.
8 years ago
Mike Cao
b30d5e5fa2
Moved map method check to Engine. Added get method to Loader. Added new tests.
8 years ago
Mike Cao
cabbb25fcc
Added support for custom template file extensions.
9 years ago
Mike Cao
7fd3594ac7
Added ability to perform case sensitive matching of URLs.
9 years ago
Yuri Tkachenko
83ffddc800
added phpunit to composer and tests updated
10 years ago
Mike Cao
7c50eb7cfb
Passing to a non-matching route should return a 404.
10 years ago
Mike Cao
ef76d72b56
Added ability to get all saved variables.
10 years ago
Mike Cao
64d384ddff
Splat should consider trailing slash in URLs.
11 years ago
Mike Cao
88f4c1fb71
Fixed issue with splats when used with named parameters.
11 years ago
Mike Cao
c0fa0bed7c
Redirects should always consider the base directory.
11 years ago
Mike Cao
d84e51ba47
Updated route object passing functionality.
...
Before the route object would automatically be passed to all callbacks. Now you need to explicitly
ask for it by passing in true as the third parameter in Flight::route().
11 years ago
Mike Cao
b9b2d0fa2d
Added ability to register callbacks for class instantiation.
11 years ago
Pascal Borreli
2648a5216e
Fixed typos
11 years ago
Mike Cao
7817255a61
Added ability to get splat from URL pattern.
11 years ago
Mike Cao
5ba910981f
Allow HTTP method overriding.
11 years ago
Mike Cao
6696c0d267
Dispatcher should check for valid callback.
11 years ago
Eric Anderson
1a0eede079
Use $_SERVER instead of getenv.
...
This partially reverts cec890c
. In addition to other cleanup the commit changed
from using $_SERVER to getenv. As @kafene said on issue #21 , getenv provides a
nicer API making the code clean. I.E.
$val = getenv('val') ?: 'default';
Instead of:
$val = isset($_SERVER['val']) ? $_SERVER['val'] : 'default';
Although this is true unfortuantly it is less reliable. Using getenv in this
way assumes the application is running under some sort of CGI interface or
an interface that is simulating the CGI interface.
While this assumption is very often true it is not always true. For example
when using [PHP built-in webserver][1] (useful for development) getenv will
return false for most of these values even through $_SERVER is populated. I
believe also some interfaces on Windows don't populate getenv.
This means that flight is not usable in those environments. By partially
reverting cec890c
we re-enable flight in those environments.
For Engine.php and Response.php I just directly reverted cec890c
. Since request
makes so much use of getenv it seemed wise to abstract the conditional checking
to keep the code clean via a private function.
The tests were also updated to populate $_SERVER instead of the environment
via putenv.
[1]: http://php.net/manual/en/features.commandline.webserver.php
11 years ago
Mike Cao
7e1a098f6c
Autoloader should not throw exceptions.
12 years ago
Mike Cao
23fc99ec91
Updated all tests to use Engine class.
12 years ago
Mike Cao
d41795cbdc
Updated handling of subdirectories and redirects.
12 years ago
Mike Cao
84078158c3
Introduced new Engine class.
...
Core functionality has been moved to a namespaced Engine class. The
existing Flight class is now just a static pass-through to the Engine class.
Also fixed autoloading and initialization issues.
12 years ago
Mike Cao
a04020d50e
Fix line feeds.
12 years ago
Mike Cao
ef72548a1a
Changed header sizes.
12 years ago
Mike Cao
28ae5e0aec
Added route passing functionality.
12 years ago
Mike Cao
ae32c228d1
Changed PHPUnit references. Added new tests for router.
12 years ago
Mike Cao
58303b2ae3
Added test for Request class.
12 years ago
Mike Cao
c3ee140930
Added unit tests
12 years ago