yiisoft / yii-demo
Yii Framework Project Demo
Fund package maintenance!
Open Collective
yiisoft
Installs: 408
Dependents: 0
Suggesters: 0
Security: 0
Stars: 299
Watchers: 58
Forks: 130
Open Issues: 47
Type:project
Requires
- php: ^8.1
- ext-mbstring: *
- ext-pdo_sqlite: *
- cebe/markdown: ^1.2@dev
- cycle/database: ^2.0
- cycle/entity-behavior: ^1.0
- cycle/orm: ^2.0
- doctrine/collections: ^1.8 || ^2.0
- fakerphp/faker: ^1.14
- httpsoft/http-message: ^1.0.5
- php-http/guzzle7-adapter: ^1.0
- psr/container: ^2.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^3.0
- symfony/console: ^6.0
- vlucas/phpdotenv: ^5.3
- yiisoft/access: ^1.0
- yiisoft/aliases: ^2.0
- yiisoft/assets: ^2.1
- yiisoft/auth: ^3.0
- yiisoft/cache: ^2.0
- yiisoft/cache-file: ^2.0
- yiisoft/config: ^1.0
- yiisoft/cookies: ^1.2
- yiisoft/csrf: ^1.2
- yiisoft/data: ^3.0@dev
- yiisoft/data-response: ^1.0
- yiisoft/definitions: ^3.0
- yiisoft/di: ^1.2
- yiisoft/error-handler: ^2.0
- yiisoft/factory: ^1.0
- yiisoft/form: ^1.0@dev
- yiisoft/html: ^2.4
- yiisoft/http: ^1.2
- yiisoft/injector: ^1.0
- yiisoft/log: ^2.0
- yiisoft/log-target-file: ^2.0
- yiisoft/mailer: ^4.0
- yiisoft/mailer-symfony: ^2.0
- yiisoft/rate-limiter: dev-master
- yiisoft/rbac: ^1.0
- yiisoft/rbac-php: ^1.0
- yiisoft/rbac-rules-container: ^1.1
- yiisoft/router: ^2.0
- yiisoft/router-fastroute: ^2.0
- yiisoft/security: ^1.0
- yiisoft/session: ^1.0
- yiisoft/translator: ^2.0
- yiisoft/translator-message-php: ^1.1
- yiisoft/user: ^1.0
- yiisoft/validator: 3.0.x-dev
- yiisoft/var-dumper: ^1.0
- yiisoft/view: ^6.0
- yiisoft/widget: ^1.0
- yiisoft/yii-bootstrap5: ^3.0@dev
- yiisoft/yii-console: ^1.0
- yiisoft/yii-cycle: dev-master
- yiisoft/yii-dataview: ^3.0@dev
- yiisoft/yii-debug: ^3.0@dev
- yiisoft/yii-debug-api: ^3.0@dev
- yiisoft/yii-event: ^1.0
- yiisoft/yii-http: ^1.0
- yiisoft/yii-middleware: dev-master
- yiisoft/yii-runner-console: ^1.0
- yiisoft/yii-runner-http: ^1.1
- yiisoft/yii-sentry: dev-master
- yiisoft/yii-swagger: ^1.0
- yiisoft/yii-view: ^5.0
Requires (Dev)
- codeception/c3: ^2.6
- codeception/codeception: ^5.0
- codeception/module-asserts: ^3.0
- codeception/module-cli: ^2.0
- codeception/module-phpbrowser: ^3.0
- phpunit/phpunit: ^9.5
- roave/infection-static-analysis-plugin: ^1.16
- roave/security-advisories: dev-master
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^4.18
- yiisoft/translator-extractor: ^1.0
- yiisoft/yii-debug-viewer: ^3.0@dev
- yiisoft/yii-gii: ^3.0@dev
- yiisoft/yii-testing: dev-master
This package is auto-updated.
Last update: 2023-09-21 03:27:29 UTC
README
Yii Framework Demo Project
[Yii Framework] is a modern framework designed to be a solid foundation for your PHP application.
It's intended to show and test all Yii features.
Installation
You'll need at least PHP 8.1.
- Clone this repository.
- Run
composer install
in your project root directory. - Run
./yii serve
(on Windowsyii serve
). The application will be started on http://localhost:8080/. - Go to the index page. Cycle ORM will create tables, indexes and relations automatically in the configured DB for you.
If you want to disable this behavior then comment out the line with the
Generator\SyncTables::class
in theconfig/packges/yiisoft/yii-cycle/params.php
. In this case you should create migrations to sync changes that you have made to entities with the DB. - Run
./yii fixture/add 20
to create some random data.
Console
Console works out of the box and could be executed with ./yii
.
Some commands:
user/create <login> <password> fixture/add [count]
In order to register your own commands, add them to console/params.php
, console
→ commands
section.
Web application
In order to run the web application, you can either use the built-in web server by running ./yii serve
or you could use a
real web server by pointing it to /public/index.php
.
More routes could be added by editing src/Factory/AppRouterFactory
.
Testing
The template comes with a ready to use Codeception configuration. In order to execute tests run the following command:
composer run serve 127.0.0.1:8080 > ./runtime/yii.log 2>&1 &
vendor/bin/codecept run
Static analysis
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
Support the project
Follow updates
License
The Yii Framework Demo Project is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.