# yiisoft/yii

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/yiisoft-yii).**

4,825 stars · 2,219 forks · PHP · BSD-3-Clause

## Links

- GitHub: https://github.com/yiisoft/yii
- Homepage: http://www.yiiframework.com
- awesome-repositories: https://awesome-repositories.com/repository/yiisoft-yii.md

## Topics

`hacktoberfest` `php` `php-framework` `yii1`

## Description

Yii is a full-stack PHP web framework and component-based system designed for building dynamic websites and RESTful services. It operates as an MVC application framework that separates business logic from the user interface and includes a built-in object-relational mapper for interacting with databases.

The project provides a comprehensive command line toolset for project bootstrapping, automated code generation, and the execution of background tasks. It utilizes a component-based architecture and a service locator to manage dependency injection and object lifecycles.

The framework covers a broad range of capability areas, including schema migration and versioning, role-based identity management, and content localization. It also features a variety of caching strategies such as fragment, query, and full-page caching with dependency-based invalidation. Additional systemic tools include a software testing framework, event logging, and request rate limiting.

## Tags

### Programming Languages & Runtimes

- [PHP Application Frameworks](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/php-application-frameworks.md) — Operates as a full-stack PHP application framework for building dynamic websites and RESTful services.
- [MVC Implementations](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/php-application-frameworks/mvc-implementations.md) — Implements the model-view-controller pattern to decouple business logic from the user interface. ([source](https://www.yiiframework.com/doc/guide/1.1/en))
- [Class Extensions](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-definitions/class-extensions.md) — Attaches reusable behaviors and event handlers to classes to customize functionality without altering source code. ([source](https://www.yiiframework.com/doc/guide/2.0/en/concept-components))
- [Behavior Attachments](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-definitions/class-extensions/behavior-attachments.md) — Attaches reusable behaviors to classes to extend functionality without modifying original source code or inheritance.
- [Class Loading Mechanisms](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-class-creation/class-loading-mechanisms.md) — Automatically locates and loads required class and interface files based on naming conventions. ([source](https://www.yiiframework.com/doc/guide/2.0/en/concept-autoloading))
- [PSR-4 Namespace Autoloading](https://awesome-repositories.com/f/programming-languages-runtimes/php-standard-interface-implementations/autoloading-implementations/psr-4-namespace-autoloading.md) — Implements PSR-4 compliant autoloading to discover and include PHP class files automatically.

### Data & Databases

- [Schema Migration Scripts](https://awesome-repositories.com/f/data-databases/data-schema-management/schema-versioning/schema-migration-scripts.md) — Tracks and applies versioned changes to the database structure through ordered migration scripts. ([source](https://www.yiiframework.com/doc/guide/2.0/ar))
- [Database Query Builders](https://awesome-repositories.com/f/data-databases/database-query-builders.md) — Provides fluent query builders and object-oriented patterns for executing SQL and managing data persistence. ([source](https://www.yiiframework.com/doc/guide))
- [Object-Relational Mappers](https://awesome-repositories.com/f/data-databases/object-relational-mappers.md) — Includes a built-in object-relational mapper that maps database tables to objects for easier data manipulation.
- [Active-Record ORMs](https://awesome-repositories.com/f/data-databases/object-relational-mappers/active-record-orms.md) — Provides an Active Record ORM that maps database tables to objects for object-oriented data manipulation.
- [Object-Relational Mapping](https://awesome-repositories.com/f/data-databases/object-relational-mapping.md) — Maps database tables to objects to handle relational data retrieval and manipulation via a built-in ORM. ([source](https://www.yiiframework.com/doc/guide/1.0/en))
- [Application State Management](https://awesome-repositories.com/f/data-databases/application-state-management.md) — Coordinates shared components and service locators to maintain a consistent application environment. ([source](https://www.yiiframework.com/doc/guide))
- [Fragment Caches](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/caching-performance/caching/template-caches/fragment-caches.md) — Caches frequently accessed data and specific page fragments to reduce server load. ([source](https://www.yiiframework.com/doc/guide))
- [Database Result Caching](https://awesome-repositories.com/f/data-databases/database-result-caching.md) — Stores database query results in a temporary layer to avoid executing expensive statements repeatedly. ([source](https://www.yiiframework.com/doc/guide/2.0/en/caching-data))
- [Web Page Caching](https://awesome-repositories.com/f/data-databases/performance-caching-systems/page-caching-controls/kernel-page-cache-file-caching/web-page-caching.md) — Stores complete page output on the server to serve subsequent requests without regenerating content. ([source](https://www.yiiframework.com/doc/guide/2.0/en/caching-page))
- [Server-Side Session Stores](https://awesome-repositories.com/f/data-databases/session-state-management/server-side-session-stores.md) — Maintains persistent user state across requests using server-side session storage and cookies. ([source](https://www.yiiframework.com/doc/guide))

### Development Tools & Productivity

- [Command-Line Toolsets](https://awesome-repositories.com/f/development-tools-productivity/command-line-toolsets.md) — Provides a comprehensive suite of console-based utilities for project bootstrapping and executing background tasks.
- [Cache Invalidation](https://awesome-repositories.com/f/development-tools-productivity/build-artifact-caching/cache-invalidation.md) — Provides tools to manually or programmatically remove individual or grouped items from the cache. ([source](https://www.yiiframework.com/doc/guide/2.0/en/caching-data))
- [Console Application Frameworks](https://awesome-repositories.com/f/development-tools-productivity/console-application-frameworks.md) — Enables the creation of PHP console applications for executing background tasks and administrative jobs outside the web browser.
- [Console Application Utilities](https://awesome-repositories.com/f/development-tools-productivity/php-development-tools/console-application-utilities.md) — Provides utilities for building standalone command-line tools and background tasks in PHP. ([source](https://www.yiiframework.com/doc/guide/1.1/en))
- [Scaffolding Generators](https://awesome-repositories.com/f/development-tools-productivity/scaffolding-generators.md) — Produces standard controllers, models, and database logic automatically to accelerate development. ([source](https://www.yiiframework.com/doc/guide))

### Security & Cryptography

- [Authentication and Authorization](https://awesome-repositories.com/f/security-cryptography/authentication-and-authorization.md) — Manages user identities and restricts access to application features based on roles and permissions.
- [Identity and Role Management](https://awesome-repositories.com/f/security-cryptography/identity-access-management/access-control/identity-role-management.md) — Implements user authentication and role-based access control to restrict access to specific features. ([source](https://www.yiiframework.com/doc/guide))
- [Data Encryption](https://awesome-repositories.com/f/security-cryptography/data-encryption.md) — Provides cryptographic tools for encrypting sensitive information and hashing passwords. ([source](https://www.yiiframework.com/doc/guide))

### Software Engineering & Architecture

- [Database Schema Migrations](https://awesome-repositories.com/f/software-engineering-architecture/data-migrators/database-schema-migrations.md) — Provides automated versioning and updating of database structures to maintain consistency across environments.
- [Dependency Injection Containers](https://awesome-repositories.com/f/software-engineering-architecture/object-management-systems/dependency-injection-containers.md) — Includes a central dependency injection container to manage object creation and lifecycles, promoting loose coupling. ([source](https://www.yiiframework.com/doc/guide/2.0/ar))
- [Reusable Component Architectures](https://awesome-repositories.com/f/software-engineering-architecture/reusable-component-architectures.md) — Provides a component-based architecture that organizes application logic into reusable, independent software modules. ([source](https://cdn.jsdelivr.net/gh/yiisoft/yii@master/README.md))
- [Service Locators](https://awesome-repositories.com/f/software-engineering-architecture/service-locators.md) — Implements a centralized service locator to manage object creation and dependency injection.
- [Model-View-Controller Patterns](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/model-view-controller-patterns.md) — Separates application logic into distinct data, interface, and control layers using the MVC pattern.
- [Behavioral Mixins](https://awesome-repositories.com/f/software-engineering-architecture/behavioral-mixins/plugin-mixin-systems/behavioral-mixins.md) — Implements behavioral mixins to attach reusable methods and properties to existing classes without altering inheritance. ([source](https://www.yiiframework.com/doc/guide/2.0/en/concept-behaviors))
- [Project Bootstrapping Tools](https://awesome-repositories.com/f/software-engineering-architecture/project-bootstrapping-tools.md) — Provides a command-line tool to generate the initial skeleton project structure and scaffolding. ([source](https://cdn.jsdelivr.net/gh/yiisoft/yii@master/README.md))
- [Automatic Form Generation](https://awesome-repositories.com/f/software-engineering-architecture/schema-based-state-validation/form-validation-schemas/automatic-form-generation.md) — Automatically generates input fields and validation logic based on data model schemas. ([source](https://www.yiiframework.com/doc/guide))

### User Interface & Experience

- [Request-to-Action Mappings](https://awesome-repositories.com/f/user-interface-experience/state-update-logic/state-action-value-updates/instance-scoped-action-dispatchers/action-routing/request-to-action-mappings.md) — Maps incoming HTTP requests to specific controller actions to determine how the application responds. ([source](https://www.yiiframework.com/doc/guide/2.0/ar))

### Web Development

- [Component-Based Web Frameworks](https://awesome-repositories.com/f/web-development/component-based-web-frameworks.md) — Organizes application logic into reusable components and services to ensure high performance and scalability.
- [PHP Web Frameworks](https://awesome-repositories.com/f/web-development/php-web-frameworks.md) — Provides a complete development platform for building dynamic websites and RESTful services using PHP.
- [RESTful API Development](https://awesome-repositories.com/f/web-development/restful-api-development.md) — Enables the creation of scalable web services using standard RESTful HTTP methods and resource patterns. ([source](https://www.yiiframework.com/doc/guide))
- [Dependency-Based Cache Invalidation](https://awesome-repositories.com/f/web-development/data-fetching-caching/cache-invalidation-utilities/dependency-based-cache-invalidation.md) — Expires cached items automatically when specific triggers like file changes or database updates occur.
- [Environment Configurations](https://awesome-repositories.com/f/web-development/environment-configurations.md) — Adjusts application properties conditionally based on whether the system is running in production, development, or testing environments. ([source](https://www.yiiframework.com/doc/guide/2.0/en/concept-configurations))
- [Error Handling](https://awesome-repositories.com/f/web-development/error-handling.md) — Intercepts exceptions to display user-friendly error pages and record detailed failure reports. ([source](https://www.yiiframework.com/doc/guide/1.0/en))
- [Content Translation](https://awesome-repositories.com/f/web-development/internationalization-localization/translation-management-platforms/site-localization/multi-language-content-delivery/locale-based-filters/content-translation.md) — Provides tools for translating text and formatting dates or numbers based on the user's language and region. ([source](https://www.yiiframework.com/doc/guide))

### DevOps & Infrastructure

- [Caching Strategies](https://awesome-repositories.com/f/devops-infrastructure/caching-strategies.md) — Implements diverse caching strategies, including query and fragment caching, to improve application performance.
- [Configuration-Driven Initialization](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/configuration-resolution-engines/configuration-driven-initialization.md) — Populates class instances using structured configuration arrays that override default properties.
- [Background Task Execution](https://awesome-repositories.com/f/devops-infrastructure/workflow-run-management/asynchronous-run-launches/background-task-execution.md) — Executes maintenance jobs and scheduled processing tasks directly from the command line. ([source](https://www.yiiframework.com/doc/guide))

### Networking & Communication

- [Input Validation](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/api-management-integration/api-integrations/server-side/input-validation.md) — Provides server-side verification of user-submitted data against predefined rules to ensure data integrity. ([source](https://www.yiiframework.com/doc/guide))

### System Administration & Monitoring

- [System Event Logging](https://awesome-repositories.com/f/system-administration-monitoring/system-event-logging.md) — Records application events and errors to files or databases for system monitoring and debugging. ([source](https://www.yiiframework.com/doc/guide/1.0/en))

### Testing & Quality Assurance

- [Test Frameworks](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/test-frameworks.md) — Ships a built-in testing framework supporting unit, functional, and acceptance tests with fixtures. ([source](https://www.yiiframework.com/doc/guide))
