Yii Framework 34k+
  • News
  • Guide
  • API
  • Wiki
  • Forum
  • Community
    • Places
    • Members
    • Hall of Fame
    • Badges
  • More
    • Learn
    • Books
    • Resources
    • Develop
    • Download Yii
    • Extensions
    • Report an Issue
    • Report a Security Issue
    • Contribute to Yii
    • Donate
    • About
    • Release Cycle
    • License
    • Team
    • Official Logos and Design
Login

Yii event 1.0.0

May 13, 2021

Yii event is the first framework-specific package from Yii 3 family. Its goal is to make configuring events convenient. For the applications it provides three main config files:

  • events.php - Common event handlers for web and console.
  • events-web.php - Web event handlers.
  • events-console.php - Console event handlers.

The config syntax is the following:

return [
    EventName::class => [
        // Just a regular closure, it will be called from the Dispatcher "as is".
        static fn (EventName $event) => someStuff($event),
        
        // A regular closure with additional dependency. All the parameters after the first one (the event itself)
        // will be resolved from your DI container within `yiisoft/injector`.
        static fn (EventName $event, DependencyClass $dependency) => someStuff($event),
        
        // An example with a regular callable. If the `staticMethodName` method contains some dependencies,
        // they will be resolved the same way as in the previous example.
        [SomeClass::class, 'staticMethodName'],
        
        // Non-static methods are allowed too. In this case `SomeClass` will be instantiated by your DI container.
        [SomeClass::class, 'methodName'],
        
        // An object of a class with the `__invoke` method implemented
        new InvokableClass(),
        
        // In this case the `InvokableClass` with the `__invoke` method will be instantiated by your DI container
        InvokableClass::class,
        
        // Any definition of an invokable class may be here while your `$container->has('the definition)` 
        'di-alias'
    ],
];

For convenience, there's a configuration checker that is used in current application templates to check if all handlers declared are correct.

Translator 1.0.0 and related packages

May 13, 2021

First release of translator package was published. This package allows translating messages into several languages. It can work with both Yii-based applications and standalone PHP applications.

Translations in the code looks like the following:

// single translation
$messageIdentificator = 'submit';
echo $translator->translate($messageIdentificator);
// output: `Submit message`

Read more

Cookies 1.1.0

May 5, 2021

Minor version of cookies package released:

  • Add the Yiisoft\Cookies\CookieEncryptor class to encrypt the value of the cookie and verify that it is tampered.
  • Add the Yiisoft\Cookies\CookieSigner class to sign the value of the cookie and verify that it is tampered.
  • Add the Yiisoft\Cookies\CookieMiddleware class to encrypt/sign the value of the cookie and verify that it is tampered.

Profiler 1.0.0

May 4, 2021

Another Yii3 family package was released. This time it is profiler. The package provides an ability to record performance profiles:

$profiler->begin('test');
//...some code
    $profiler->begin('test');
    //...some code
    $profiler->end('test');
//...some code
$profiler->end('test');

$messages = $profiler->getMessages(); 
print_r($messages);

Read more

Html 1.2.0

May 4, 2021

A minor version of Html package was tagged. In this version there are two additions:

  1. \Stringable is now supported as content for tags.
  2. Script::getContent() and Style::getContent() were added.

Html 1.1.0

Apr 9, 2021

A minor version of Html package was tagged. In this version there are two additions:

  1. Br tag.
  2. Table markup related tags.

VarDumper 1.1.0

Apr 8, 2021

An update was made to yiisoft/var-dumper package.

Starting with this version it can export closures and objects with closures.

Html 1.0.0

Mar 17, 2021

First stable version of Html package was tagged. The package could be used both along with Yii 3 or separately.

It is a handy library to generate HTML dynamically:

<?= Html::p()->class('float-right')->content(
    'Powered by ',
    Html::a(
        'Yii Framework',
        'https://www.yiiframework.com/',
        ['rel' => 'external']
    )
) ?>

Read more

Test support 1.3.0

Mar 15, 2021

Test support package version 1.3.0 was released.

New version adds implementation of PSR logger that accumulates all the logged messages and can return these as array:

$logger = new Yiisoft\Test\Support\Log\SimpleLogger();

$logger->emergency('Emergency message', ['key' => 'value']);
$logger->alert('Alert message', ['key' => 'value']);
$logger->critical('Critical message', ['key' => 'value']);
$logger->error('Error message', ['key' => 'value']);
$logger->warning('Warning message', ['key' => 'value']);
$logger->notice('Notice message', ['key' => 'value']);
$logger->info('Info message', ['key' => 'value']);
$logger->debug('Debug message', ['key' => 'value']);

$messages = $logger->getMessages();

Test support 1.2.1

Mar 10, 2021

Test support package version 1.2.1 was released.

New version makes it compatible with PSR-11 Container v1.1 and v2.0.

  • psr/container 1.1 adds argument type hints.
  • psr/container 2.0 adds return type hints (but only to the has() method).

The change is fully backwards compatible so update should not break anything.

Injector 1.0.4 released

Mar 10, 2021

Injector package version 1.0.4 was released.

New version makes it compatible with PSR-11 Container v1.1 and v2.0.

  • psr/container 1.1 adds argument type hints.
  • psr/container 2.0 adds return type hints (but only to the has() method).

The change is fully backwards compatible so update should not break anything.

Network Utilities 1.0.0

Mar 4, 2021

First version of network utilities package was tagged.

It has two helper classes, IpHelper to work with IPs and network masks, and DnsHelper to check DNS records.

The package does not depend on Yii and can be used by requiring it via Composer:

composer require yiisoft/network-utilities

Code is well-covered with tests, types and has 100% mutation score.

CSRF 1.0.0

Feb 23, 2021

First release of CSRF package was tagged. The package provides PSR-15 middleware for CSRF protection:

  • It supports two algorithms out of the box:
    • Synchronizer CSRF token with customizable token generation and storage. By default, it uses random data and session.
    • HMAC based token with customizable identity generation. Uses session by default.
  • It has ability to apply masking to CSRF token string to make BREACH attack impossible.

Extensive documentation is available.

Test support 1.1.0 and 1.2.0

Feb 23, 2021

Two minor versions of test support package were tagged. Both are about event dispatcher:

  • 1.1.0 adds SimpleEventDispatcher::clearEvents() that clear all events in event dispatcher.
  • 1.2.0 adds SimpleEventDispatcher::getEventClasses() that return classes of dispatched events.

Event dispatcher 1.0.0

Feb 16, 2021

First version of event dispatcher package was tagged. The dispatcher provides an ability to dispatch events and listen to events dispatched. It is:

  • PSR-14 compatible.
  • Simple and lightweight.
  • Encourages designing event hierarchy.
  • Can combine multiple event listener providers.

Usage description and examples are available in the package readme.

Log and drivers 1.0.0

Feb 11, 2021

First verisons of yiisoft/log and some of the drivers called "targets" were released.

Log is PSR-3 compatible so using it in your apps is easy:

final class MyClass
{
    private \Psr\Log\LoggerInterface $logger;
    
    public function __construct(\Psr\Log\LoggerInterface $logger)
    {
    	$this->logger = $logger;
    }
    
    public function doIt(): void
    {
    	$this->logger->info('Doing it!');
        
        // ...
    }
}

Read more

Auth JWT 1.0.0

Feb 11, 2021

First version of yiisoft/auth-jwt package was released. The package provides JWT authentication method for Yii Auth.

Configuration instructions are provided in the readme of the package.

VarDumper 1.0.0

Feb 10, 2021

First stable version of yiisoft/var-dumper package was released.

It enhances functionality of var_dump() and var_export() by dealing with recursive references, syntax highlighting and closures export.

It also provides convenient d() and dd() functions that may be used for quick dump-and-die style debugging.

More details are available in the package readme.

Files 1.0.0

Feb 10, 2021

First versions of yiisoft/files package was released. The package provides useful methods to manage files and directories.

More details could be found in package readme.

Strings 2.0.0 released

Feb 10, 2021

A major version of strings package was released. The changes are about \Yiisoft\Strings\WildcardPattern. ** was introduced and the class was overall simplified.

It is not backwards compatible with 1.x.x versions so check upgrade guide if you decide to upgrade.

More details could be found in the package CHANGELOG.

  • «
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • »
Get notified of news as soon as they are available using our RSS Feed.

Years

  • 2026 (44)
  • 2025 (92)
  • 2024 (80)
  • 2023 (90)
  • 2022 (82)
  • 2021 (101)
  • 2020 (64)
  • 2019 (75)
  • 2018 (32)
  • 2017 (35)
  • 2016 (30)
  • 2015 (9)
  • 2014 (6)
  • 2013 (11)
  • 2012 (14)
  • 2011 (10)
  • 2010 (10)
  • 2009 (23)
  • 2008 (5)

Popular Tags

  • yii3 384
  • extensions 233
  • release 109
  • yii2 73
  • debug 30
  • view 28
  • html 25
  • auth client 23
  • bootstrap 21
  • redis 20
  • Yii 1.1
  • Guide
  • API
  • Wiki
  • Yii 2
  • Guide
  • API
  • Wiki
  • Yii3
  • Guide
  • API
  • Cookbook
  • Terms of service
  • License
  • Contact Us
  • Supported by
  • Your donations
  • JetBrains logo
  • © 2008 - 2026 Yii (Website Source Code)