It took longer than expected, but CodefyPHP v2.0.0 is out with shiny new features. This release is dedicated to Mathias Verraes, who’s code buttercup.protects helped me to get a better grasp of DDD, CQRS, and is the base/foundation of CodefyPHP.
In this release, a new class Codefy
was added, which interacts with the Application
class. It is recommended that you use the class Codefy
instead of using the Application
class directly. To instantiate the new class you type Codefy::$PHP
. So, for example if you needed to set a flash message in your controller, you can use Codefy::$PHP->flash->error('This was an error.');
instead of instantiating the Flash
class. You also have access to the following as well:
Codefy::$PHP->request
= \Qubus\Http\ServerRequestCodefy::$PHP->response
= \Qubus\Http\ResponseCodefy::$PHP->assets
= \Qubus\Support\AssetsCodefy::$PHP->mailer
= \Qubus\Mail\MailerCodefy::$PHP->session
= \Qubus\Http\Session\NativeSessionCodefy::$PHP->event
= \Qubus\EventDispatcher\DispatcherCodefy::$PHP->httpCookie
= \Qubus\Http\Cookies\Factory\CookieFactoryCodefy::$PHP->localStorage
= \Codey\Framework\Support\LocalStorageCodefy::$PHP->configContainer
= \Qubus\Config\CollectionCodefy::$PHP->getLogger()
= \Codefy\Framework\Factory\FileLoggerFactoryCodefy::$PHP->getSmtpLogger()
= \Codefy\Framework\Factory\FileLoggerSmtpFactory
The skeleton app has also been updated. A simple admin backend was added with examples of domain events, repositories, middlewares, commandbus, querybus, services, and more. Also, the Installation guide has been updated to reflect the new changes, and how to get your first application up and running.
Last Updated on September 5, 2024 by Joshua