Download the PHP package hunwalk/yii2-basic-firestarter without Composer
On this page you can find all versions of the php package hunwalk/yii2-basic-firestarter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hunwalk/yii2-basic-firestarter
More information about hunwalk/yii2-basic-firestarter
Files in hunwalk/yii2-basic-firestarter
Package yii2-basic-firestarter
Short Description Yii 2 Firestarter Project Template
License BSD-3-Clause
Informations about the package yii2-basic-firestarter
Yii 2 Basic Firestarter
This project is discontinued
Please follow this link if you want something similar to this project: https://github.com/hunwalk/yii2-app-forge
This is a somewhat modified version of the basic template with some pregonfigured features. I've created this to save time upon creating a new project.
Please leave a star if you're considering to use this template in production.
Contains:
- that overly useful symfony VarDumper. Use the dump() method
- dotenv configuration ( idea by @lostika86 )
- The dektrium/yii2-user and dektrium/yii2-rbac packages with basic config
- An api identifier solution (Authorization header => Bearer token) / code by bizley
- An api module
- Predefined controllerMap to the console config (added migration commands)
-
A conventional commits helper
Check out the packages
- https://symfony.com/doc/current/components/var_dumper.html / Symfony VarDumper Component
- https://github.com/dektrium/yii2-user / User management
- https://github.com/dektrium/yii2-rbac / Powerful RBAC manager
- https://github.com/bizley/timeclock / The idea of the api key came from here. (and the code as well)
- https://github.com/symfony/dotenv / The dotenv we're using
-
https://github.com/damianopetrungaro/php-commitizen / A tool for conventional commits
Get started
Use the latest release
Or use the current master branch, if you're in a hurry for features if there is any
post-create-project-cmd script sets up the permissions for some folders and generates the cookieValidationKey for you
Instructions
1st step
Create a .env file from the .env.example
OSX / LINUX
Windows
2nd step
- Fill in the .env file. Add or remove things, it's your choice entirely
- Run the following commands
3rd step
- Run the server and be happy :)
About the API
You can reach the api at There is an example controller you can test. That is purely for demonstration, and can be better.
Update user profile using the api (This is purely for testing purposes)
Read this carefully, if you've never done something like this.
- Start the server
- Pop up your favourite api client
- Set the url to
- Set up a header with the key
- The header value should be your token.
- Keep in mind, that the token will expire within 60 seconds
- Do a get request with these settings.
- You should get back the users profile
- Now do a post request. The body should be x-www-form-urlencoded
- The key value pairs should be Profile[name] = {yourname}
- Send. :smile:
If you did everything right, you should get back the updated profile.
Some additional information
The token looks like this:
It has 3 parts. The user_id, the current timestamp, and the users api_key sha1 hashed together with the current timestamp.
You can find more information about generating that token inside the v1 modules DefaultController Also, you should delete that before going to production.
You can obtain the users api_key from the user table in the api_key column.
Use Conventional Commits
Thanks to the conventional commits project and this guy: https://github.com/damianopetrungaro/
It seems like, something broke after i released this update, and the fire/commit command does not really work. Requires some tweaking, but definitely going to fix this sometime. However feel free to use the idea of the conventional commits. It's really great :smile:
Todo
- [x] Correct testing
- [x] Mention every 3rd party package here (i hope i did, open an issue if something is missing)
- [x] Test the API key functionality (tested, now it should work)
- [x] Make a v1 api module with contentNegotiation HttpBearerAuth and verbFilter by default
Sites or projects ignited by this
Send a PR if you have one :)
All versions of yii2-basic-firestarter with dependencies
yiisoft/yii2 Version ~2.0.14
yiisoft/yii2-bootstrap Version ~2.0.0
yiisoft/yii2-swiftmailer Version ~2.0.0 || ~2.1.0
dektrium/yii2-user Version ^0.9.14
dektrium/yii2-rbac Version ^1.0