├── .env.dist
├── .github
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FUNDING.yml
├── ISSUE_TEMPLATE.md
├── PULL_REQUEST_TEMPLATE.md
├── SECURITY.md
├── dependabot.yml
└── workflows
│ ├── blog-api_build.yml
│ ├── blog-api_dependency.yml
│ ├── blog-api_static.yml
│ ├── blog_build.yml
│ ├── blog_dependency.yml
│ └── blog_static.yml
├── .gitignore
├── .styleci.yml
├── README.md
├── ansible
├── .gitignore
├── Makefile
├── authorize.yml
├── certbot.yml
├── deploy.yml
├── hosts.yml.dist
├── roles
│ ├── certbot
│ │ └── tasks
│ │ │ ├── generate_dhparam.yml
│ │ │ ├── main.yml
│ │ │ └── update_certificates.yml
│ ├── deploy
│ │ └── tasks
│ │ │ ├── deploy.yml
│ │ │ └── main.yml
│ └── server
│ │ ├── handlers
│ │ └── main.yml
│ │ └── tasks
│ │ ├── create_user.yml
│ │ ├── install_dependencies.yml
│ │ ├── install_docker.yml
│ │ ├── install_docker_sdk.yml
│ │ ├── main.yml
│ │ └── swap.yml
└── server.yml
├── blog-api
├── .dockerignore
├── .editorconfig
├── .env.example
├── .env.test
├── .gitattributes
├── .gitignore
├── .phpunit-watcher.yml
├── CHANGELOG.md
├── LICENSE.md
├── Makefile
├── README.md
├── autoload.php
├── codeception.yml
├── composer.json
├── composer.lock
├── config
│ ├── .gitignore
│ ├── common
│ │ ├── bootstrap.php
│ │ ├── di
│ │ │ ├── cache.php
│ │ │ ├── cycle.php
│ │ │ ├── hydrator.php
│ │ │ ├── logger.php
│ │ │ ├── psr17.php
│ │ │ ├── router.php
│ │ │ ├── translator.php
│ │ │ └── validator.php
│ │ ├── params.php
│ │ └── routes.php
│ ├── console
│ │ ├── commands.php
│ │ └── params.php
│ ├── environments
│ │ ├── dev
│ │ │ └── params.php
│ │ ├── prod
│ │ │ └── params.php
│ │ └── test
│ │ │ └── params.php
│ └── web
│ │ ├── di
│ │ ├── application.php
│ │ ├── data-response.php
│ │ ├── error-handler.php
│ │ ├── middleware-dispatcher.php
│ │ └── user.php
│ │ ├── events.php
│ │ └── params.php
├── configuration.php
├── data
│ ├── db
│ │ └── database.db
│ └── nginx
│ │ └── default.conf
├── docker-compose.yml
├── docker
│ ├── dev
│ │ ├── nginx
│ │ │ ├── Dockerfile
│ │ │ └── nginx.conf
│ │ └── php
│ │ │ ├── Dockerfile
│ │ │ ├── conf.d
│ │ │ └── php.ini
│ │ │ └── php-fpm.d
│ │ │ └── www.conf
│ ├── docker-entrypoint.sh
│ └── prod
│ │ ├── nginx
│ │ ├── Dockerfile
│ │ └── nginx.conf
│ │ └── php
│ │ ├── Dockerfile
│ │ ├── conf.d
│ │ └── php.ini
│ │ └── php-fpm.d
│ │ └── www.conf
├── infection.json.dist
├── phpunit.xml.dist
├── psalm.xml
├── public
│ ├── .htaccess
│ ├── assets
│ │ └── .gitignore
│ ├── favicon.ico
│ ├── index.php
│ └── robots.txt
├── resources
│ └── messages
│ │ ├── de
│ │ └── app.php
│ │ ├── en
│ │ └── app.php
│ │ └── ru
│ │ └── app.php
├── runtime
│ └── .gitignore
├── src
│ ├── Auth
│ │ ├── AuthController.php
│ │ ├── AuthRequest.php
│ │ └── AuthRequestErrorHandler.php
│ ├── Blog
│ │ ├── BlogController.php
│ │ ├── BlogService.php
│ │ ├── EditPostRequest.php
│ │ ├── Post.php
│ │ ├── PostBuilder.php
│ │ ├── PostFormatter.php
│ │ ├── PostRepository.php
│ │ └── PostStatus.php
│ ├── Dto
│ │ └── ApiResponseData.php
│ ├── Exception
│ │ ├── ApplicationException.php
│ │ ├── BadRequestException.php
│ │ ├── MethodNotAllowedException.php
│ │ ├── NotFoundException.php
│ │ └── UnauthorisedException.php
│ ├── Factory
│ │ ├── ApiResponseDataFactory.php
│ │ └── RestGroupFactory.php
│ ├── Formatter
│ │ ├── ApiResponseFormatter.php
│ │ └── PaginatorFormatter.php
│ ├── Handler
│ │ └── NotFoundHandler.php
│ ├── InfoController.php
│ ├── Installer.php
│ ├── Middleware
│ │ └── ExceptionMiddleware.php
│ ├── Queue
│ │ ├── LoggingAuthorizationHandler.php
│ │ └── UserLoggedInMessage.php
│ ├── RestControllerTrait.php
│ ├── User
│ │ ├── User.php
│ │ ├── UserController.php
│ │ ├── UserFormatter.php
│ │ ├── UserRepository.php
│ │ ├── UserRequest.php
│ │ └── UserService.php
│ └── VersionProvider.php
├── tests
│ ├── .gitkeep
│ ├── Acceptance.suite.yml
│ ├── Acceptance
│ │ ├── AuthCest.php
│ │ ├── BlogCest.php
│ │ ├── SiteCest.php
│ │ └── UserCest.php
│ ├── Cli.suite.yml
│ ├── Cli
│ │ └── ConsoleCest.php
│ ├── Functional.suite.yml
│ ├── Functional
│ │ └── IndexControllerTest.php
│ ├── Support
│ │ ├── AcceptanceTester.php
│ │ ├── CliTester.php
│ │ ├── Data
│ │ │ ├── database.db
│ │ │ └── dump.sql
│ │ ├── FunctionalTester.php
│ │ ├── Helper
│ │ │ ├── Acceptance.php
│ │ │ ├── Cli.php
│ │ │ ├── Functional.php
│ │ │ └── Unit.php
│ │ ├── UnitTester.php
│ │ └── _generated
│ │ │ └── .gitignore
│ ├── Unit.suite.yml
│ └── Unit
│ │ └── .gitkeep
├── yii
└── yii.bat
├── blog
├── .dockerignore
├── .editorconfig
├── .env.example
├── .env.test
├── .gitattributes
├── .gitignore
├── .phpunit-watcher.yml
├── LICENSE.md
├── Makefile
├── README.md
├── autoload.php
├── codeception.yml
├── composer.json
├── composer.lock
├── config
│ ├── .gitignore
│ ├── common
│ │ ├── bootstrap.php
│ │ ├── di
│ │ │ ├── cache.php
│ │ │ ├── cycle.php
│ │ │ ├── hydrator.php
│ │ │ ├── logger.php
│ │ │ ├── mailer.php
│ │ │ ├── psr17.php
│ │ │ ├── rbac.php
│ │ │ ├── router.php
│ │ │ ├── sentry.php
│ │ │ ├── translator.php
│ │ │ └── validator.php
│ │ ├── params.php
│ │ ├── rbac-rules.php
│ │ └── routes
│ │ │ ├── routes-backend.php
│ │ │ └── routes.php
│ ├── console
│ │ ├── commands.php
│ │ ├── di
│ │ │ └── translator-extractor.php
│ │ ├── events.php
│ │ └── params.php
│ ├── environments
│ │ ├── dev
│ │ │ └── params.php
│ │ ├── prod
│ │ │ └── params.php
│ │ └── test
│ │ │ └── params.php
│ └── web
│ │ ├── di
│ │ ├── application.php
│ │ ├── auth.php
│ │ ├── comment-service.php
│ │ ├── contact-mailer.php
│ │ ├── middleware-dispatcher.php
│ │ └── rate-limit.php
│ │ ├── events.php
│ │ ├── params.php
│ │ └── widgets.php
├── configuration.php
├── dependency-checker.json
├── docker-compose.yml
├── docker
│ ├── dev
│ │ ├── nginx
│ │ │ ├── Dockerfile
│ │ │ └── nginx.conf
│ │ └── php
│ │ │ ├── Dockerfile
│ │ │ ├── conf.d
│ │ │ └── php.ini
│ │ │ └── php-fpm.d
│ │ │ └── www.conf
│ ├── docker-entrypoint.sh
│ └── prod
│ │ ├── nginx
│ │ ├── Dockerfile
│ │ └── nginx.conf
│ │ └── php
│ │ ├── Dockerfile
│ │ ├── conf.d
│ │ └── php.ini
│ │ └── php-fpm.d
│ │ └── www.conf
├── package-lock.json
├── package.json
├── phpunit.xml.dist
├── psalm.xml
├── public
│ ├── .htaccess
│ ├── assets
│ │ └── .gitignore
│ ├── favicon.ico
│ ├── index.php
│ └── robots.txt
├── resources
│ ├── asset
│ │ ├── css
│ │ │ └── site.css
│ │ └── js
│ │ │ └── app.js
│ ├── backend
│ │ └── views
│ │ │ └── site
│ │ │ └── index.php
│ ├── mail
│ │ └── layouts
│ │ │ └── html.php
│ ├── messages
│ │ ├── de
│ │ │ └── app.php
│ │ ├── en
│ │ │ └── app.php
│ │ ├── id
│ │ │ └── app.php
│ │ ├── ru
│ │ │ └── app.php
│ │ └── sk
│ │ │ └── app.php
│ ├── rbac
│ │ └── items.php
│ └── views
│ │ ├── auth
│ │ └── login.php
│ │ ├── blog
│ │ ├── _archive.php
│ │ ├── _topTags.php
│ │ ├── archive
│ │ │ ├── index.php
│ │ │ ├── monthly-archive.php
│ │ │ └── yearly-archive.php
│ │ ├── comments
│ │ │ ├── _comments.php
│ │ │ └── index.php
│ │ ├── index.php
│ │ ├── post
│ │ │ ├── __form.php
│ │ │ └── index.php
│ │ └── tag
│ │ │ └── index.php
│ │ ├── layout
│ │ └── main.php
│ │ ├── signup
│ │ └── signup.php
│ │ ├── site
│ │ ├── 404.php
│ │ └── index.php
│ │ └── user
│ │ ├── index.php
│ │ └── profile.php
├── runtime
│ └── .gitignore
├── src
│ ├── Asset
│ │ ├── AppAsset.php
│ │ └── Bootstrap5IconsAsset.php
│ ├── Auth
│ │ ├── AuthService.php
│ │ ├── Controller
│ │ │ ├── AuthController.php
│ │ │ └── SignupController.php
│ │ ├── Form
│ │ │ ├── LoginForm.php
│ │ │ └── SignupForm.php
│ │ ├── Identity.php
│ │ └── IdentityRepository.php
│ ├── Backend
│ │ └── Controller
│ │ │ └── SiteController.php
│ ├── Blog
│ │ ├── Archive
│ │ │ ├── ArchiveController.php
│ │ │ └── ArchiveRepository.php
│ │ ├── BlogController.php
│ │ ├── Comment
│ │ │ ├── CommentRepository.php
│ │ │ ├── CommentService.php
│ │ │ └── Scope
│ │ │ │ └── PublicScope.php
│ │ ├── CommentController.php
│ │ ├── Entity
│ │ │ ├── Comment.php
│ │ │ ├── Post.php
│ │ │ ├── PostTag.php
│ │ │ └── Tag.php
│ │ ├── Post
│ │ │ ├── PostController.php
│ │ │ ├── PostForm.php
│ │ │ ├── PostRepository.php
│ │ │ ├── PostService.php
│ │ │ └── Scope
│ │ │ │ └── PublicScope.php
│ │ ├── Tag
│ │ │ ├── TagController.php
│ │ │ └── TagRepository.php
│ │ └── Widget
│ │ │ └── PostCard.php
│ ├── Command
│ │ ├── Fixture
│ │ │ ├── AddCommand.php
│ │ │ └── SchemaClearCommand.php
│ │ ├── Router
│ │ │ └── ListCommand.php
│ │ └── Translation
│ │ │ └── TranslateCommand.php
│ ├── Contact
│ │ ├── ContactController.php
│ │ ├── ContactForm.php
│ │ ├── ContactMailer.php
│ │ ├── mail
│ │ │ ├── contact-email.php
│ │ │ └── layouts
│ │ │ │ └── html.php
│ │ └── views
│ │ │ └── contact
│ │ │ └── form.php
│ ├── Controller
│ │ ├── Actions
│ │ │ └── ApiInfo.php
│ │ └── SiteController.php
│ ├── Handler
│ │ └── NotFoundHandler.php
│ ├── Installer.php
│ ├── Middleware
│ │ ├── AccessChecker.php
│ │ └── ApiDataWrapper.php
│ ├── Service
│ │ └── WebControllerService.php
│ ├── Timer.php
│ ├── User
│ │ ├── Console
│ │ │ ├── AssignRoleCommand.php
│ │ │ └── CreateCommand.php
│ │ ├── Controller
│ │ │ ├── ApiUserController.php
│ │ │ └── UserController.php
│ │ ├── User.php
│ │ ├── UserRepository.php
│ │ └── UserService.php
│ ├── ViewInjection
│ │ ├── CommonViewInjection.php
│ │ ├── LayoutViewInjection.php
│ │ ├── LinkTagsViewInjection.php
│ │ └── MetaTagsViewInjection.php
│ └── Widget
│ │ ├── FlashMessage.php
│ │ ├── OffsetPagination.php
│ │ └── PerformanceMetrics.php
├── tests
│ ├── Acceptance.suite.yml
│ ├── Acceptance
│ │ ├── BlogPageCest.php
│ │ ├── CommentPageCest.php
│ │ ├── ContactPageCest.php
│ │ ├── IndexPageCest.php
│ │ ├── LoginAcceptanceCest.php
│ │ ├── SignupAcceptanceCest.php
│ │ └── UserPageCest.php
│ ├── Cli.suite.yml
│ ├── Cli
│ │ └── ConsoleCest.php
│ ├── Functional.suite.yml
│ ├── Functional
│ │ ├── ContactCest.php
│ │ ├── EventListenerConfigurationTest.php
│ │ └── IndexControllerTest.php
│ ├── Support
│ │ ├── AcceptanceTester.php
│ │ ├── CliTester.php
│ │ ├── FunctionalTester.php
│ │ ├── Helper
│ │ │ ├── Acceptance.php
│ │ │ ├── Functional.php
│ │ │ └── Unit.php
│ │ ├── UnitTester.php
│ │ └── _generated
│ │ │ └── .gitignore
│ ├── Unit.suite.yml
│ └── Unit
│ │ └── .gitkeep
├── yii
└── yii.bat
├── demo
├── Dockerfile
└── html
│ └── index.html
├── docker-compose.override.yml
├── docker-compose.yml
├── gateway
└── nginx
│ ├── dev
│ ├── Dockerfile
│ └── templates
│ │ └── http.conf.template
│ └── prod
│ ├── Dockerfile
│ ├── backup
│ ├── http.conf.template
│ └── https.conf.template
│ └── templates
│ └── https.conf.template
└── var
├── .gitignore
└── ssl
└── www
└── .gitignore
/.env.dist:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=yii-demo
2 |
3 | REGISTRY=localhost
4 | DOMAIN=yii-demo.localhost
5 | SUPPORT_EMAIL=team@yiiframework.com
6 | # Get short image tag git rev-parse --short HEAD
7 | IMAGE_TAG=00001
8 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 |
3 | - [Yii goal and values](https://github.com/yiisoft/docs/blob/master/001-yii-values.md)
4 | - [Namespaces](https://github.com/yiisoft/docs/blob/master/004-namespaces.md)
5 | - [Git commit messages](https://github.com/yiisoft/docs/blob/master/006-git-commit-messages.md)
6 | - [Exceptions](https://github.com/yiisoft/docs/blob/master/007-exceptions.md)
7 | - [Interfaces](https://github.com/yiisoft/docs/blob/master/008-interfaces.md)
8 |
9 | # Getting started
10 |
11 | Since Yii 3 consists of many packages, we have a [special development tool](https://github.com/yiisoft/docs/blob/master/005-development-tool.md).
12 |
13 | 1. [Clone the repository](https://github.com/yiisoft/yii-dev-tool).
14 |
15 | 2. [Set up your own fork](https://github.com/yiisoft/yii-dev-tool#using-your-own-fork).
16 |
17 | 3. Now you are ready. Fork any package listed in `packages.php` and do `./yii-dev install username/package`.
18 |
19 | If you don't have any particular package in mind to start with:
20 |
21 | - [Check roadmap](https://github.com/yiisoft/docs/blob/master/003-roadmap.md).
22 | - Check package issues at github. Usually there are some.
23 | - Ask @samdark.
24 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | open_collective: yiisoft
4 | github: [yiisoft]
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ### What steps will reproduce the problem?
4 |
5 | ### What is the expected result?
6 |
7 | ### What do you get instead?
8 |
9 |
10 | ### Additional info
11 |
12 | | Q | A
13 | | ---------------- | ---
14 | | Version | 1.0.?
15 | | PHP version |
16 | | Operating system |
17 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | | Q | A
2 | | ------------- | ---
3 | | Is bugfix? | ✔️/❌
4 | | New feature? | ✔️/❌
5 | | Breaks BC? | ✔️/❌
6 | | Fixed issues | comma-separated list of tickets # fixed by the PR, if any
7 |
--------------------------------------------------------------------------------
/.github/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | Please use the [security issue form](https://www.yiiframework.com/security) to report to us any security issue you
4 | find in Yii. DO NOT use the issue tracker or discuss it in the public forum as it will cause more damage than help.
5 |
6 | Please note that as a non-commercial OpenSource project we are not able to pay bounties at the moment.
7 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | # Maintain dependencies for GitHub Actions.
4 | - package-ecosystem: "github-actions"
5 | directory: "/"
6 | schedule:
7 | interval: "daily"
8 | # Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
9 | open-pull-requests-limit: 0
10 |
11 | # Maintain dependencies for Composer
12 | - package-ecosystem: "composer"
13 | directory: "/"
14 | schedule:
15 | interval: "daily"
16 | versioning-strategy: increase-if-necessary
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # IDE & OS files
2 | .*.swp
3 | .DS_Store
4 | .buildpath
5 | .idea
6 | .project
7 | .settings
8 | Thumbs.db
9 | nbproject
10 | .env
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Yii 3 Demo Code
2 | ===============
3 |
4 | This repository contains the code for the Yii 3 demo projects:
2 |
3 |
4 |
5 |
Yii Framework API Demo Project
6 |
7 |
# | 25 |First | 26 |Last | 27 |Handle | 28 |
---|---|---|---|
1 | 33 |Mark | 34 |Otto | 35 |@mdo | 36 |
2 | 39 |Jacob | 40 |Thornton | 41 |@fat | 42 |
3 | 45 |Larry the Bird | 46 |
= Html::encode($comment->getContent()) ?>
28 |24 | = $translator->translate('layout.page.not-found', [ 25 | 'url' => Html::span( 26 | Html::encode($currentRoute 27 | ->getUri() 28 | ->getPath()), 29 | ['class' => 'text-muted'] 30 | ), 31 | ]) 32 | ?> 33 |
34 |35 | = Html::a( 36 | $translator->translate('layout.go.home'), 37 | $urlGenerator->generate('site/index'), 38 | ['class' => 'btn btn-outline-primary mt-5'] 39 | ); 40 | ?> 41 |
42 |