Introducing Yii3: The Lightweight and Modular PHP Framework for Web Development.

Dec 12, 2023Yii3

Yii3 is a powerful and flexible set of agnostic packages designed to simplify the creation of web, apis, and console applications. Its main strength lies in its ability to provide only the necessary dependencies required for the project's development.

This approach ensures that Yii3 applications are lightweight, fast, and high-performing. We have 95 packages with stable versions available.

Here is the list of agnostic packages used in our application template.

  1. AliasesIt facilitates the storage and management of path aliases, which act as short names representing lengthy paths or URLs. These aliases serve to avoid hard-coding absolute paths or URLs in your project, offering flexibility for easy modifications when required. Additionally, you can define aliases using other aliases, allowing for a more adaptable and responsive usage.
  2. AssetsManages client-side assets like CSS and JavaScript files within web applications. It aids in dependency resolution, asset publication to accessible directories, and HTML tag generation for effortless inclusion in web pages.
  3. CacheA wrapper around PSR-16 compatible caching libraries, providing additional features.
  4. Cache-file: This implements a file-based PSR-16 cache system, enabling data storage and retrieval using a unified and straightforward interface. Users can configure various settings including the cache directory, file suffix, file mode, directory level, and garbage collection probability.
  5. Config: 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.
  6. CSRF:  Provides middleware designed to protect web applications from cross-site request forgery (CSRF) attacks.
  7. Database: Interacts with various types of databases, including MariaDB, MSSQL, MySQL, Oracle, PostgreSQL, and SQLite. Facilitates common database operations such as creating, reading, updating, and deleting records in a database table, as well as executing raw SQL queries.
  8. MSSQL driver for Database: Provides a set of classes for connecting to a MSSQL database, creating and executing commands, and working with data. It also includes a set of tools for building and executing queries, including support for parameter binding, as well as tools for working with transactions.
  9. MySQL driver for Database: Provides a set of classes and methods for connecting to a MySQL and MariaDb database, executing SQL queries, and managing data within the database. The package is designed to be easy to use and integrate, and supports a wide range of MySQL, MariaDb features and functions. It also includes support for transactions, database schema management, and error handling.
  10. Oracle driver for DatabaseAllows you to connect to Oracle databases from your application and perform various database operations such as executing queries, creating and modifying database schema, and processing data. It supports a wide range of Oracle versions and provides a simple and efficient interface for working with Oracle databases.
  11. PostgreSQL driver for Database: Provides a database connection interface and a set of classes for interacting with a PostgreSQL database. It allows you to perform common database operations such as executing queries, building and executing INSERT, UPDATE, and DELETE statements, and working with transactions. It also provides support for PostgreSQL-specific features such as stored procedures and server-side cursors.
  12. SQLite driver for Database: Provides a set of classes for interacting with SQLite databases in PHP. It includes a database connection class, a command builder class, and a set of classes for representing database tables and rows as PHP objects. You can perform a variety of tasks with SQLite databases in PHP, such as connecting to a database, executing SQL queries, and working with database transactions. You can also use it to create and manipulate database tables and rows, and to perform advanced database operations such as joins and aggregates.
  13. Data response: Allows you to create PSR-7 responses with data that can be automatically formatted into different formats, such as HTML, JSON, or XML. It also provides PSR-15 middleware for content negotiation and formatting data responses.
  14. Definitions: Provides definition syntax. Describing a way to create and configure a service or an object. It supports array, callable, and class definitions, as well as references and dynamic references to other definitions.
  15. Di: Provides a PSR-11 compatible dependency injection container and injector. It allows you to instantiate and configure classes and their dependencies, using array definitions, service providers, or PHP callables. It also supports property, constructor, and method injection, circular reference detection, aliasing, delegated lookup, and state resetter.
  16. Error handler: Provides PSR-15 middleware for catching and handling unhandled errors and exceptions. It supports production and debug modes, logging, content negotiation, and custom error rendering. It also features friendly exceptions.
  17. Factory: Abstract object factory that allows the creation of objects by a given definition with dependencies resolved by a PSR-11 container.
  18. Files: Provides useful methods to manage files and directories. This package is designed to simplify the process of file handling in web, API, and console applications.
  19. Html: Handy library for dynamic server-side generation of HTML. It provides various tools including tag classes for different HTML elements, a CustomTag class for generating custom tags with any attributes, and HTML widgets. It also includes a Html helper that has static methods to generate HTML, create tags, and HTML widget objects.
  20. Http: Constants for HTTP protocol headers, methods and statuses. All along with short descriptions and RFC links. PSR-7, PSR-17 PhpStorm meta for HTTP protocol headers, methods and statuses. ContentDispositionHeader that has static methods to generate Content-Disposition header name and value. HeaderValueHelper that has static methods to parse the header value parameters.
  21. Internationalization Library: Provides common internationalization utilities. Locale stores information created from a BCP 47 formatted string. It can parse a locale string, modify locale components, construct a locale string from its parts, and derive a fallback locale.
  22. Log: PSR-3 compatible logging library. The logger sends messages to multiple targets, each of which may filter messages by their severity levels and categories, and then export them to some medium such as a file, email, or syslog.
  23. Log target file: Provides a File target for the yiisoft/log package. This target records log messages in a file and allows you to configure log files rotation. It also provides the ability to compress rotated log files.
  24. Router: Provides PSR-7 compatible request routing and a PSR-15 middleware ready to be used in an application. Instead of implementing routing from ground up, the package provides an interface for configuring routes and could be used with an adapter package. Currently, the only adapter available is router-fastroute.
  25. Translator: Allows translating messages into several languages. It can work with both Yii-based applications and standalone PHP applications. It supports various message storage formats and message formatters. It also provides a console extractor to generate translation files from the source code.
  26. Translator message php: Provides a message storage backend based on PHP arrays for the yiisoft/translator package. It allows you to store and retrieve translated messages in PHP files. It also supports comments and metadata for the messages.
  27. Validator: Provides data validation capabilities. It can validate any data: arrays, objects, scalar values, etc. It supports custom data sets and handles nested data structures. It can also read validation rules from PHP 8 attributes. It provides error message formatting and translation, as well as attribute names translation.
  28. View: Provides templates rendering abstraction supporting layout-view-subview hierarchy, custom renderers with PHP-based as default, and more.
List of packages that should be used exclusively with the Yii Framework.

  1. Yii eventConfiguration wrapper for the EventDispatcher package. It is intended to make event listener declaration simpler than you could ever imagine. All you need is to use any PSR-11 compatible DI container.
  2. Yii http: Provides the Application::class, as well as the events and handlers needed to interact with HTTP. The package is implemented using PSR-7.
  3. Yii runner console: Bootstrap for running Yii3 console applications. It simplifies the initialization and configuration process of the console application.
  4. Yii runner http: Bootstrap for running Yii3 HTTP applications. It simplifies the initialization and configuration process of the application. It supports various configuration groups and custom modifiers. It also allows you to specify a custom container implementation.
  5. Yii view: Wrapper that adds extra functionality for a web environment and compatibility with PSR-7 interfaces to the yiisoft/view package.
Happy coding!