aadhar-number-validator
India Aadhar Number Validator Moduel for zf2/Apigility, (*1)
IndiaAadhaarNumberValidator Install in zf2 or Apigility
Run the following composer command:
- $ composer require prashant7july/aadhar-number-validator
OR, (*2)
"require": {
"prashant7july/aadhar-number-validator": "1.0.0"
}
And then run composer update to ensure the module is installed., (*3)
Finally, add the module name to your project's config/application.config.php under the modules key:, (*4)
return [
/* ... */
'modules' => [
/* ... */
'IndiaAadhaarNumberValidator',
],
/* ... */
];
OR, (*5)
config/modules.config.php
return [
/* ... */
'IndiaAadhaarNumberValidator',
/* ... */
];
How to create custom module (Like custom validator etc) and convert it in to the 3rd party vender module?
Step 1 - Structure in Module for IndiaAadhaarNumberValidator
โ IndiaAadhaarNumberValidator
โโโ config
โย ย โโโ module.config.php
โโโ Module.php
โโโ README.md
โโโ src
โโโ IndiaAadhaarNumberValidator
โโโ Validator
โโโ AadharNumberValidator.php
Step 2 - Create a new repository -
, (*6)
Step 3 - Take git branch in your local -
git clone https://github.com/prashant7july/aadhar-number-validator.git, (*7)
Step 4 - Set Composer - composer.json and run $ composer dump-autoload -o
{
"name": "prashant7july/aadhar-number-validator",
"description": "India Aadhar Number Validator Moduel for zf2/Apigility",
"license": "MIT",
"keywords": [
"zf2",
"apigility",
"Aadhar Number",
"validator"
],
"authors": [
{
"name": "Prashant Shekher",
"email": "prashant7july@gmail.org",
"role": "Author"
}
],
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.*"
},
"minimum-stability": "stable",
"autoload": {
"psr-0": {
"IndiaAadhaarNumberValidator\\": "src/"
},
"classmap": [
"Module.php"
]
}
}
RUN Composer Validator Command
* $ composer validate, (*8)
Step 5 - Just Commit the Code
- $ git add .
- $ git commit -m "add module"
- $ git push origin master
Step 6 - Submit Package in to Packagist
https://packagist.org/packages/submit, (*9)
Step 7 - How to update packages?
This package is not auto-updated. Please set up the GitHub Service Hook for Packagist so that it gets updated whenever you push!, (*10)
Enabling the Packagist service hook ensures that your package will always be updated instantly when you push to GitHub.
To do so you can:, (*11)
- Go to your GitHub repository
- Click the "Settings" button
- Click "Integrations & services"
- Add a "Packagist" service, and configure it with your API token, plus your Packagist username
- Check the "Active" box and submit the form
You can then hit the "Test Service" button to trigger it and check if Packagist removes the warning about the package not being auto-updated., (*12)
Step 8 - Set Git Versioning [How to change version (dev-master) in packagist.org]
Solution -
- $ git tag -a 1.0.0 -m 'release of version 1.0.0'
- $ git push origin 1.0.0