- Fixed a fatal error due to coroutines being used within a task worker, when coroutines were not available. This was related to how emails are sent within the framework. Email transmission uses a task worker to send emails synchronously. This fix does not require any change on the application side.
Bakup.io is now an official sponsor of this project.
- New project logo in the README - Preparation for new project name change in the future.
- Email transmission fatal error when sending with SMTP and STARTTLS connections. The mailer was failing to send when used within a coroutine context and the TCP hook enabled. No application side changes required for the fix.
- Some internal code formatting and changed a missing return type for a function inside the dependency container
- Fixed an issue where creating a new class from the main DI container would return
null
because, the function that resolved class dependencies won't resolve a new one if the class already exists within the main container array. This is a problem when you callPolyel::new(...)
and want a new class instance which doesn't get stored in the main container. Usually this is not a problem, but it fails to create a new class if it already exists. The solution was to allow new classes to be created no matter what if the parameter$returnClassOnly
is set totrue
.
- Polyel will now only use the UTC timezone to generate datetime stamps, for now this is forced, but a configuration may be introduced in the future but UTC is a good standard to follow for storing dates in web applications.
-
Changed the CSRF cookie token to use
Lax
for the SameSite attribute instead ofStrict
. -
Changed the session cookie to use Lax for the SameSite attribute instead of Strict. Before when the session cookie used Strict, if links were clicked externally for an app, the cookie gets blocked and thus, an invalid session is created and the user is then logged out
- Session prefix now defaults to an empty string instead of
null
internally
- Fixed an infinite loop, causing the request to hang when the database session driver is selected
-
Support for using a database as a session store. Better for performance and scale over the file session driver. Requires use of a new table called
session
and will contain session data within a JSON column. The Polyel Skeleton has been updated with new changes within thesession.php
config. (#35) -
The
SessionManager
will now save the driver type that is selected in a class property. -
Added a new Polyel Email Service which is a wrapper based around PHPMailer and makes it easy to send reusable emails in a Polyel application. Email sending uses a Swoole coroutine, so the request is not affected by this blocking operation. A new
email.php
config file has been added to the skeleton. (#36) -
Because of the new addition of the email service, all the auth system TODOs for sending an email verification and password reset have been implemented.
-
Inside the
session.php
config, the optionprefix
is now only used when thefile
driver is selected. This is because the new database session driver does not need to use a prefix because a primary key is used for the session ID. -
The auth system trait
VerifiesUserEmail
has been changed to use non-plural DB table names.
- Fix view includes using a broken file path, causing them to not render and not being able to use sub-views
- Fixed an issue with Composer packages being preloaded, before only the classmap was used to preload packages but some use standalone files. Now, Polyel will preload all package files as well.
- Some improvements to code formatting and styling
- Fixed a bug where some third party Composer packages failed to be preloaded due to the library using a function which initiates calls to the autoloader, meaning any missing object errors could not be caught inside a Try Block by Polyel and thus, result in an unhandled fatal error.
-
Added additional server startup messages, allowing a user to see the startup process in more detail
-
Added support for preloading third party Composer packages. Polyel now has the ability to preload all Composer packages using the generated classmap by Composer itself. Composer packages can now be preloaded during the server startup phase, everything is loaded using
require_once
thus, making all packages available before the server can accept requests, this means none of this work has to be done during a request, no classmap lookup or filesystem check has to be done in order to use a third party package during a HTTP request. This solves a lot of performance issues for when your classmap is huge and contains thousands of classes to load. Because of this addition, it also means you can create services based on any Composer packages in your application and make them global etc. Look out for the new config option inside ofmain.php
calledautoGenerateComposerClassmap
, allowing you to control when Polyel regenerates the Composer classmap again. -
Added the package
nesbot/carbon
dependency to the Polyel framework
- Reorganised and changed some server startup console messages
-
Fix validation rules not parsing correctly when a parameter uses a colon, sometimes a rule like
DateFormat
orRegex
may contain a:
and the validator would parse the rules incorrectly and not explode rule strings properly, this has now been fixed and only the first occurrence of a:
is used. -
Fixed
CHANGELOG
formatting for v0.5.2 release notes
- Added README message about using the Polyel Skeleton to create a new project
- Add a note about working towards MVP version of the framework
- Add a link to Polyel framework documentation
- Added Polyel services to the list of features
- Added motivation behind framework message
- Moved completed roadmap features into their own list of features for the README
- Update the planned features to-do list
- Do not use strict type checking with
RequiredIf
andRequiredUnless
validation rules, let PHP handle the type checking when usingin_array
. By using strict type checking, it caused these rules to not work as intended.
- Fixed a sentence which didn't make any sense within the v0.5.0 release notes
- Fix fatal server error for when no service suppliers are registered, caused the bind and singleton class properties to be accessed when they are not initialised yet
- Show the Polyel framework version on the console when the server has started
- New console command
flush:session
which deletes all sessions based on the selected session driver - Add support for container services, the framework can now manage service binds and singletons. By registering a service supplier, more complicated services/classes can be formed. Support for deferred singleton services and global server wide services. Visit the online documentation for more info: https://polyel.io/docs/using_polyel/services/
- The service container can now accept loadable objects from another container, allowing services to be shared between containers
- Some wording on the console output after the server has started
- Moved the loading logic of application files like
controllers
ormiddleware
etc. into an application loader class, makes way for more updates later on to improve application and framework file loading
- Fixed incorrect/broken directory path for
create:command
- Fixed incorrect/broken directory path for
create:controller
- Fixed incorrect/broken directory path for
create:element
- Fixed incorrect/broken directory path for
create:middleware
- Fix invalid version constraint format for ext-swoole in the
composer.json
file
- Polyel now stores the generated CSRF token in a cookie so that JavaScript can use it to make valid HTTP requests. The previous recommended way was to use a HTML meta tag, which is still possible but having a cookie makes this process much easier
- Added note on the README that Polyel is following SemVar versioning
- Composer requirement for Swoole version
^4.*
- The method
createCsrfToken
from the Session class will now return the newly generated CSRF token if one has not already been created, if a token has already been created,false
is returned instead.
- Incorrect PHPDoc method removed from the Route Facade, it had a method called
prepend
which is not available in that class
- Polyel ASCII banner at server startup, moved from the Polyel skeleton, making it easier to update version information
- Change the Polyel session cookie setting
SameSite
value toStrict
fromNone
. By usingNone
it meant cookies are not sent if HTTPS is not enabled, which isn't always the case during local development. So usingStrict
is a more sane default
- Missing Polyel const version number, was set to
0.0.0
which didn't reflect the installed version
- ext-json to composer.json
- ext-mbstring to composer.json
- ext-openssl to composer.json
- Updated the framework to match the directory paths for the Polyel Skeleton when installed via Composer
- Changed the constant ROOT_DIR to APP_DIR for better naming considering its move to the APP skeleton
- Initial release of the Polyel Framework 🚀