yiisoft / app-api
Yii Framework API project template
Fund package maintenance!
Opencollective
yiisoft
Installs: 944
Dependents: 0
Suggesters: 0
Security: 0
Stars: 65
Watchers: 20
Forks: 28
Open Issues: 9
Type:project
Requires
- php: ^8.1
- cebe/markdown: ^1.2@dev
- httpsoft/http-message: ^1.1
- psr/container: ^2.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.1|^2.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/cache-file: ^3.0
- yiisoft/config: ^1.0
- yiisoft/data: ^1.0
- yiisoft/data-response: ^2.0
- yiisoft/definitions: ^3.0
- yiisoft/di: ^1.2
- yiisoft/error-handler: ^3.0
- yiisoft/factory: ^1.1
- yiisoft/files: ^2.0
- yiisoft/http: ^1.2
- yiisoft/hydrator: ^1.0
- yiisoft/hydrator-validator: ^2.0
- yiisoft/injector: ^1.1
- yiisoft/input-http: ^1.0
- yiisoft/log: ^2.0
- yiisoft/log-target-file: ^3.0
- yiisoft/middleware-dispatcher: ^5.2
- yiisoft/request-body-parser: ^1.1
- yiisoft/router: ^3.0
- yiisoft/router-fastroute: ^3.0
- yiisoft/validator: ^1.0
- yiisoft/yii-console: ^2.0
- yiisoft/yii-debug: dev-master
- yiisoft/yii-event: ^2.0
- yiisoft/yii-http: ^1.0
- yiisoft/yii-middleware: ^1.0
- yiisoft/yii-runner-console: ^2.0
- yiisoft/yii-runner-http: ^2.0
- yiisoft/yii-swagger: ^2.0
Requires (Dev)
- codeception/c3: ^2.6
- codeception/codeception: ^5.0
- codeception/lib-innerbrowser: ^3.0
- codeception/module-asserts: ^3.0
- codeception/module-cli: ^2.0
- codeception/module-db: ^3.0
- codeception/module-phpbrowser: ^3.0
- codeception/module-rest: ^3.0
- maglnet/composer-require-checker: ^4.7
- phpunit/phpunit: ^9.5
- rector/rector: ^1.0.0
- roave/infection-static-analysis-plugin: ^1.34
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^5.20
- yiisoft/json: ^1.0
- yiisoft/yii-debug-api: dev-master
- yiisoft/yii-debug-viewer: dev-master
- yiisoft/yii-testing: dev-master
This package is auto-updated.
Last update: 2024-09-09 07:17:10 UTC
README
Yii API template
API application template for Yii 3.
Requirements
- PHP 8.1 or higher.
Installation
Creating a project:
composer create-project yiisoft/app-api --stability=dev myproject
cd myproject
Install docker:
docker-compose up -d
Enter into the container:
docker-compose exec php bash
Install packages:
composer install
Usually the application is available at http://localhost:8080
.
Authorization is performed via the X-Api-Key
header.
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
API Documentation
API documentation is available at /docs
. It is built from OpenAPI annotations (@OA
).
See Swagger-PHP documentation for details on how to annotate your code.
Codeception testing
The template comes with ready to use Codeception configuration. In order to execute tests run:
composer run serve > ./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
License
The Yii API template is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.