Download the PHP package heavenproject/user-command-line without Composer
On this page you can find all versions of the php package heavenproject/user-command-line. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heavenproject/user-command-line
More information about heavenproject/user-command-line
Files in heavenproject/user-command-line
Package user-command-line
Short Description Manage users via Symfony Console and Doctrine ORM on command line
License MIT
Homepage https://github.com/CSHH/user-command-line
Informations about the package user-command-line
User Command Line
Manage users via Symfony Console and Doctrine ORM on command line.
Installation
composer require heavenproject/user-command-line
Requirements
Documentation
In order for the hproj:create-user
(or hproj:create:user
as alias) command to work correctly
a small update in your application code is required.
Because we work with users here, there has to be some user entity in your application. This entity
must implement the UserEntityInterface
. That´s all.
You have many options how to do this. You can implement the entire interface yourself if your need some custom logic
but this library contains some bits of pieces of code among which there are UserMethods
and UserProperties
both of which are combined in one single UserTrait
. These might help you with the implementation.
If you need more info on how to use the above command, use your Symfony Console
in your command line the way that you are used to (in Nette it is php www/index.php
)
and type help hproj:create-user
(eg: php www/index.php help hproj:create-user
).
Example 1
Example 2
Example 3
Example 4
You can of course add more properties and methods in your entity if you wish.
Config
Register the UserCommandLineExtension
in your application neon config
and to this extension provide the targetEntity
which is your updated user entity (class name together with namespace).
License
This source code is free software available under the MIT license.
All versions of user-command-line with dependencies
kdyby/console Version ^2.4
kdyby/doctrine Version ^2.3 | ^3.0
nette/di Version ^2.3
tracy/tracy Version ^2.3