rahmatsyaparudin / yii2-skeleton
Yii2 skeleton API project
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Type:project
pkg:composer/rahmatsyaparudin/yii2-skeleton
Requires
- php: >=7.4.0
- firebase/php-jwt: ^6.10
- mongodb/mongodb: ^1.20
- paragonie/sodium_compat: ^2.0
- vlucas/phpdotenv: ^5.6
- yiisoft/db-pgsql: ^1.0
- yiisoft/yii2: ^2.0.53
- yiisoft/yii2-bootstrap5: ^2.0.3
- yiisoft/yii2-symfonymailer: ^2.0.3
This package is not auto-updated.
Last update: 2026-01-14 11:14:51 UTC
README
Yii2 API Skeleton is a starter project for building RESTful APIs using Yii2. It provides a ready-to-use structure, helper scripts, and example configurations to accelerate your API development.
1. Install Yii2
composer create-project --prefer-dist yiisoft/yii2-app-basic ./
2. Add the repository and package to composer.json
Open your project's composer.json and add the following sections:
Add this to composer.json repositories
{
"type": "vcs",
"url": "https://github.com/rahmatsyaparudin/yii2-api-skeleton.git"
}
Add this to composer.json require-dev
"rahmatsyaparudin/yii2-api-skeleton": "dev-main"
Add this to composer.json scripts
"skeleton-update": [ "composer update rahmatsyaparudin/yii2-api-skeleton --ignore-platform-reqs", "php scripts/install-skeleton.php" ], "skeleton-copy-examples": [ "php scripts/copy-examples.php" ]
3. Dependensi Composer Utama
Skeleton will add the following dependencies to your composer.json:
yiisoft/db-pgsql:^1.0mongodb/mongodb:^1.20firebase/php-jwt:^6.10paragonie/sodium_compat:^2.0vlucas/phpdotenv:^5.6
4. Update Composer untuk yii2-api-skeleton
Run composer update for update:
composer update --ignore-platform-reqs
5. Copy skeleton scripts
Make directory scripts and Copy the scripts folder from the package to your project root:
mkdir scripts; cp -r -Force vendor/rahmatsyaparudin/yii2-api-skeleton/scripts/* ./scripts
6. Install the skeleton
Run the custom Composer script to install the skeleton files:
composer skeleton-update
This command will set up the necessary folder structure and example configurations in your project.
7. Copy example files (first-time setup only)
Run this command only the first time you set up the skeleton: This will copy example configuration and code files to your project for reference and customization.
composer skeleton-copy-examples
Skeleton will add the following dependencies to your composer.json:
yiisoft/db-pgsql:^1.0mongodb/mongodb:^1.20firebase/php-jwt:^6.10paragonie/sodium_compat:^2.0vlucas/phpdotenv:^5.6
Apply updates or re-install skeleton components without affecting your existing project code.
8. Update Composer Dependencies
Update all dependencies in composer.json:
composer update --ignore-platform-reqs
Notes
This package is meant for development only, so it is added under require-dev.
Make sure to adjust your configuration files after copying examples to match your environment. Apply updates or re-install skeleton components without affecting your existing project code.