User 1.0.0
User package got stable release. It provides convenient user identity management and access checking:
- Login and logout.
- Getting currently logged in identity.
- Changing current identity.
- Access checking for current user.
User package got stable release. It provides convenient user identity management and access checking:
Translation message extractor got its first stable version. It is a command-line tool that allows automatically extracting translation IDs from PHP source files and writing them to one of the translator message sources.
Such message sources are a good raw material for the actual translation. You don't have to keep track of what messages are there in the source code since you can re-run ./yii translator/extract command once again to update the message source.
You can find more details in the package readme.
First stable version of Config package was tagged.
This Composer plugin provides assembling of configurations distributed with composer packages. It allows putting configuration needed to use a package right inside thus implementing a plugin system. The package becomes a plugin holding both the code and its configuration.
The package, despite its primary goal of being used in Yii3, is very flexible and allows to build various plugin systems. The config assembly plan is prepared on installing dependencies but the build itself if done runtime in an efficient manner simplifying debugging and development a lot. What is written in config files is what actually being executed so configuration errors displayed are helpful.
You can find more details and a usage guide in the package readme.
As usual, the package is covered with tests, has high mutation score and is checked with Psalm.
First version of Yii Swagger intergration package was released.
It provides an integration of Swagger-PHP with Yii3 allowing to generate API documentation based on annotations such as:
/**
* @OA\Get(
* path="/api/endpoint",
* @OA\Response(response="200", description="Get default action")
* )
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
// ...
}
We are very pleased to announce that Yii Framework version 1.1.25 is released. You can download it at yiiframework.com/download/.
This release is a release of Yii 1.1 that has reached maintenance mode and will, only receive necessary security fixes and fixes to adjust the code for compatibility with PHP 7 and 8 if they do not cause breaking changes. This allows you to keep your servers PHP version up to date in the environments where old Yii 1.1 applications are hosted and stay within the version ranges supported by the PHP team.
Yii 1.1.25 improves PHP 8.0 compatibility and includes some minor fixes.
First version of yiisoft/widget package was released.
Widgets are reusable building blocks used to create complex and configurable user interface elements in an object-oriented fashion.
This package provides an abstract class and a factory for creating widgets, ready-made widgets are provided in the yiisoft/yii-widgets package.
Usage details and syntax examples are available in the package readme.
First version of Factory package was released. This package provides abstract object factory allowing to create objects by given definition with dependencies resolved by a PSR-11 container. It is useful if you need to create objects using definition syntax and/or want to configure defaults for objects created.
$container = new PSR11DependencyInjectionContainer();
$factoryConfig = [
EngineInterface::class => [
'class' => EngineMarkOne::class,
'__construct()' => [
'power' => 42,
],
]
];
$factory = new Factory($container, $factoryConfig);
$one = $factory->create(EngineInterface::class);
$two = $factory->create([
'class' => EngineInterface::class,
'__construct()' => [
'power' => 146,
],
]);
See package README for more details.
First release of yii-http package is tagged. It provides the application class, as well as the events and handlers needed to interact with HTTP. The package is implemented using PSR-7 interfaces.
More details are available in the package readme.
Version 1.0.0 of Yii Dependency Injection container is released. It is a PSR-11 compatible dependency injection container that is able to instantiate and configure classes resolving dependencies.
Features are:
We are very pleased to announce the release of Auth Client extension version 2.2.12.
This version fixes and enhances OpenID Connect client, adds application name check for Facebook client, and adds AuthAction::$defaultClientId and AuthAction::getClientId().
See the CHANGELOG for details.
A stable version of definitions package was tagged.
The package provides syntax constructs describing a way to create and configure a service or an object.
The following are provided:
While, by itself, the package is not very useful for end users of the framework, it is a base upon which yiisoft/di and yiisoft/factory are built. And the base is solid with a great code coverage and mutation score.
Minor verison of CSRF package was tagged adding ability to specify your own failure handler:
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Yiisoft\Csrf\CsrfMiddleware;
/**
* @var Psr\Http\Message\ResponseFactoryInterface $responseFactory
* @var Yiisoft\Csrf\CsrfTokenInterface $csrfToken
*/
$failureHandler = new class ($responseFactory) implements RequestHandlerInterface {
private ResponseFactoryInterface $responseFactory;
public function __construct(ResponseFactoryInterface $responseFactory)
{
$this->responseFactory = $responseFactory;
}
public function handle(ServerRequestInterface $request): ResponseInterface
{
$response = $this->responseFactory->createResponse(400);
$response->getBody()->write('Bad request.');
return $response;
}
};
$middleware = new CsrfMiddleware($responseFactory, $csrfToken, $failureHandler);
New major release of middleware dispatcher package was tagged. While 1.0.0 was released only a few days ago, we had a great usability idea that, as usual, came right after 1.0.0 was done.
This release reverses middleware order. Previously it was expecting reverse order:
$dispatcher = $dispatcher->withMiddlewares([
static function (): ResponseInterface {
return new Response(418);
},
TeapotAccessChecker::class,
]);
Now it uses natural order that reads way better:
$dispatcher = $dispatcher->withMiddlewares([
TeapotAccessChecker::class,
static function (): ResponseInterface {
return new Response(418);
},
]);
Error handler package got a major release.
Visible part is that solution is now formatted better. Internally, HeaderHelper is now used from http package.
Version 1.2.0 of yiisoft/http package was released.
HeaderValueHelper was added. It allows parsing various string header values into more convenient data structures.
use Yiisoft\Http\HeaderValueHelper;
Stable release of middleware dispatcher package was tagged.
The package is a PSR-15 middleware dispatcher. Given a set of middleware and a request instance, dispatcher executes it is produces a response instance.
use Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher;
use Yiisoft\Middleware\Dispatcher\MiddlewareFactory;
First version of Redis adapter for Yii cache was released. It is based on predis and could be used either standalone as PSR-16 cache implementation or with Yii cache to gain additional benefits.
Quality standard for the package is similar to other Yii 3 packages: 100% unit test coverage with 98.5% mutation score, and 94.9% type coverage.
New version of yiisoft/i18n package was released.
This version adds support for keywords hours, colnumeric, and colcasefirst. These keywords are part of the ECMAScript 2022 Internationalization API Specification (ECMA-402 9th Edition), and supporting them allows for better cross-communication between PHP and JavaScript layers.
hours defines an hour cycle for the locale (i.e. h11, h12, h23, h24). For more information see the key/type definition for the Unicode Hour Cycle Identifier.colnumeric and colcasefirst are both collation settings defined as part of the Unicode Locale Data Markup Language.Version 2.0.0 of assets package was released improving public API for more convenient use.
Previously you had to specify assets registered as array:
$assetManager->register([\App\Assets\MainAsset::class]);
First release of Yii Console package was tagged. It provides a console that could be added to an application.
The package uses Symfony Console under the hood and adds:
serve command that starts built-in PHP server.ApplicationStartup and ApplicationShutdown.namespace/command command naming style.