Change Log
All notable changes to this project will be documented in this file. This project adheres
to Semantic Versioning and Keep a CHANGELOG.
3.0.0-beta2 - 2022-05-27
- Add ability to add middlewares to route groups, so middlewares have not to be repeated over multiple routes
or generally added as app middleware - Consider
HTTP_X_FORWARDED_PROTO
,HTTP_X_FORWARDED_HOST
andHTTP_X_FORWARDED_PORT
when building a request (URI) from globals - Code optimizations
- Promote properties in constructor
- Make properties readonly where possible
- Remove redundant variables
3.0.0-beta1 - 2022-02-28
-
Bump minimum PHP version to 8.1
-
Replace app config and dependency interface with separate
- config interface for app middlewares and routes
Psr\Container
interface for dependency injection
-
Add dependency injection container interface and implementation incl. required exception implementations
-
Add request exception with base IceHawk exception interface
-
Refactor main class
- Separate config and DI container
- Wrap Closure around middleware resolver to construct on first need
-
Refactor routing classes
- Rename interface for routes
- Promote properties in constructor
- Use interfaces instead of classes
- Optimize collection code
-
Refactor request handlers
- Promote properties in constructor
- Construct middleware at time of first need
-
Refactor uploaded files
- Add interface for collection
- Promote properties in constructor
- Add named constructors to collection
- Remove unused variables
-
Refactor response implementation
- Add named constructor for JSON responses
- Rename newWithContent to new
- Create a contentful stream in constructor
- Fix return types of fluid methods
-
Refactor request implementation
- Rename request interface
- Fix PHPDoc blocks
- Add missing return types
-
Refactor stream
- Add stream action interface
- Add named constructors for PHP I/O streams
-
Add enum for stream event
-
Add interface for middleware class names collection
-
Refactor middleware class name
- Implement Stringable interface
- Rename named constructor
- Remove check for MiddlewareInterface implementation
- Promote properties in constructor
-
Refactor HttpStatus to enum
-
Refactor HttpMethod(s) to enum and proper collection
- Add interface for the collection
3.0.0-alpha - 2021-03-02
- General rewrite to a PSR-15 compatible framework
2.2.0 - 2017-09-01
Fixed
- Code inspection issues and non-optimal array usage in loops
- Non-binary-safe reading of
php://input
, related to (#31)
Added
- Method
getBodyAsStream() : resource
toWriteRequestInput
class. (#31)
2.1.1 - 2017-02-10
Fixed
- Wrong request info instance used for route matching, when request bypassing is used. (#27)
Added
- Integration test suite
Changed
- Test suites updated for PHPUnit 6. (#28)
- PHPUnit dependency to 6.0.6 (PHAR).
2.1.0 - 2016-12-19
Added
- Method
getCustomValue(string $key) : string
to access custom values via theRequestInfo
object. (#15) - Missing getters for
$_SERVER
indices inRequestInfo
class and interfaceProvidesRequestInfo
. (#17) - Configurable wrapper for cookies with default implementation, accessible via
$request
and all events. (#26) - Optional request bypassing to reroute requests to another request method without redirect (#16)
getRequestBypasses()
method added toConfiguresIceHawk
DefaultRequestBypassing
trait added to default IceHawkConfigRequestBypass
class to configure a request bypass
Removed
- Class
AbstractHttpResponse
(#24)
Changed
- Declared
Options
response class as final (#24) - Return value of
WriteRequestInput::getOneFile()
is no longerNULL
, if the$fieldKey
or the$fileIndex
does not
exist, instead it now returns an emptyUploadedFile
object with the error codeUPLOAD_ERR_NO_FILE
set. (#22) - Return type declaration of
WriteRequestInput::getOneFile()
is nowProvidesUploadedFileData
. (#22)
2.0.4 - 2016-11-12
Fixed
- Removed obsolete interface inheritance from
HandlesGetRequest
interface (#23)
2.0.3 - 2016-11-04
Fixed
- Fixed bug that prevents access to uploaded files having a string index (#20)
2.0.2 - 2016-11-03
Fixed
- Fixed bug that causes a warning when using generators or traversable implementations for routes (#18)
2.0.1 - 2016-10-16
Fixed
- Check for
HTTPS = On
is now case insensitive (RequestInfo::isSecure()
) (#13)
2.0.0 - 2016-10-06
Added
- Matches from a route group are added to the request input data (#8)
- Sub routes of a route group are guarded to be of a valid type at construction, not at runtime (#9)
Changed
2.0.0-rc5 - 2016-09-27
Added
ReadRequestInput
/WriteRequestInput
's get method now support an optional default value, in case it was asked for a
non-existing key. (#1)
Changed
- Renamed accessors for RequestInfo and InputData on
$request
object to$request->getInfo()
and$request->getInput()
- All php files are setting strict types
declare(strict_types = 1);
(#2)
2.0.0-rc4 - 2016-07-13
CAUTION This release has major interface changes and is not backward compatible with prior versions.
Added
- Added scalar type hints and return types to all interfaces where possible
- Added exceptions in pub/sub context:
PubSubException
EventSubscriberMethodNotCallable
- Added interfaces for event publisher
- Added
EventPublisher
- Added
Defaults/IceHawkEventSubscriber
- Completed constants in
HttpMethod
andHttpCode
with all available values - Added
Responses/AbstractHttpResponse
with optional additional headers and an abstract get Body - Added routing by defining route interfaces and adding routers for write, read and options requests
- Added new Event
InitializingIceHawkEvent
that will be published after setting up global vars, but before setting up
every other thing
Changed
- Requires php >= 7.0.0
- Changed vendor namespace to IceHawk
- Renamed/moved pub/sub related classes and interfaces
EventListener
=>PubSub\AbstractEventSubscriber
Interfaces\ListensToEvents
=>PubSub\Interfaces\SubscribesToEvents
Interfaces\ServesEventData
=>PubSub\Interfaces\CarriesEventData
- Renamed
ServeIceHawkConfig
interface toConfiguresIceHawk
- Renamed
ControlsHandlingBehaviour
interface toSetsUpEnvironment
- Moved default
IceHawkConfig
toDefaults/IceHawkConfig
- Moved default
IceHawkDelegate
toDefaults/IceHawkDelegate
- Split abstract class
Http
intoHttpMethod
andHttpCode
Removed
- Removed
Interfaces/RendersTemplate
- Removed
Responses/TemplatePage
- Removed
handleUncaughtExcpetion
from delegate interface - Removed all predefined responses
- Removed
UriResolver
andUriRewriter
- Removed
SessionRegistry
( now in a separate package)
1.4.2 - 2016-01-10
- Final 1.* release before moving to https://github.com/icehawk/icehawk.git and version 2.0
1.4.1 - 2016-01-10
Fixed
- Fixed regex pattern replacement in UriRewriter class
1.4.0 - 2015-11-27
Added
- Added
getRequestInfo()
to interfaceServesEventData
IceHawkWasInitializedEvent
now provides theRequestInfo
instance, too.- Added internal wrapper for the IceHawk config to make sure all of its provided instances were initialized only once
- Added
getRequestInfo()
to interfaceServesRequestData
GetRequest
andPostRequest
, as well as theDomainQuery
andDomainCommand
objects now provide theRequestInfo
instance, too.
Changed
- Updated tool script
build/tools/update_tools.sh
- Updated travis config
- Refactored internal validation of the IceHawk config
- Refactored
HandlingRequestEvent
andRequestWasHandledEvent
, only request object is injected
Fixed
- Fixed issue #1, added "ext-fileinfo": "*" to composer's require block and a hint to the README.
- Closed issue #2, added
setUpEnvironment()
to interfaceControlsHandlingBehaviour
and default
classIceHawkDelegate
. Order of IceHawk initialization is now:- setUpErrorHandling()
- setUpSessionHandling()
- setUpEnvironment()
Removed
- Removed tool-phars from
build/tools
1.3.1 - 2015-10-02
Fixed
- Fixed filename of class
EventListener
1.3.0 - 2015-09-23
Added
- Added PHP QA tools
- Added
getRawData()
method toPostRequest
, serving the raw POST data (php://input
). - Added the follwing protected methods to
DomainCommand
to give access to all POST request data:getRequestData()
serves the whole POST request data arraygetRequestRawData()
serves the raw post data (php://input
)getAllUploadedFiles()
serves all uploaded files as an assoc. array wrapped inUploadedFile
objects.getUploadedFiles($key)
serves all uploaded files for a certain key as num. array wrapped inUploadedFile
objects.getOneUploadedFile($key, $fileIndex = 0)
serves one uploaded file for a certain key and num. index wrapped in
anUploadedFile
object. OrNULL
if there is no file at$key
and/or$fileIndex
.
- Added the following protected methods to
DomainQuery
to give access to all GET request data:
-getRequestData()
serves the whole GET request data array - Added
InternalServerError
response class and HTTP code inHttp
class. - Added the following methods to
RequestInfo
to access the basic auth data:getAuthUser()
getAuthPassword()
- Completed unit tests.
Changed
-
Restructured the project directories to fit best practice.
-
Declared
SessionRegistry
as abstract. -
Method
IceHawk->init()
now checks the values served by the injected config object an can throw the following
exceptions:Fortuneglobe\IceHawk\Exceptions\InvalidUriRewriterImplementation
Fortuneglobe\IceHawk\Exceptions\InvalidUriResolverImplementation
Fortuneglobe\IceHawk\Exceptions\InvalidRequestInfoImplementation
Fortuneglobe\IceHawk\Exceptions\InvalidDomainNamespace
Fortuneglobe\IceHawk\Exceptions\InvalidEventListenerCollection
-
Renamed method
getProjectNamespace
togetDomainNamespace
inServesIceHawkConfig
andIceHawkConfig
. -
Renamed interface
HandlesIceHawkTasks
toControlsHandlingBehaviour
-
Renamed interface
ListensToIceHawkEvents
toListensToEvents
-
Renamed interface
ServesIceHawkEventData
toServesEventData
-
Renamed interface
WrapsDataOfUploadedFile
toServesUploadedFileData
-
Renamed class
UploadedFileInfo
toUploadedFile
Removed
- Removed the following methods from
DomainCommand
to avoid hard coded POST parameter names:hasSuccessUrl()
getSuccessUrl()
hasFailUrl()
getFailUrl()
- Removed
exit()
fromUnauthorized
response. - Removed hard coded default setup for error handling and session in
IceHawkDelegate
. Now these settings are based on
the system's php defaults. - Removed internal class
RequestHandler
because it is obsolete.
1.0.0 - 2015-03-30
- First release