Download the PHP package fabricio872/random-message-bundle without Composer
On this page you can find all versions of the php package fabricio872/random-message-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fabricio872/random-message-bundle
More information about fabricio872/random-message-bundle
Files in fabricio872/random-message-bundle
Package random-message-bundle
Short Description Symfony bundle that gives you various funny messages you can display on loading screen or anywhere where you need some placeholder content
License MIT
Informations about the package random-message-bundle
Random messages
Symfony bundle that gives you various funny messages you can display on loading screen or anywhere where you need some placeholder content
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
Configuration options
Usage
First of all we need to pull messages from message repository. To do that execute this command: this command will go through all configured repositories and will try to download or update them.
note: it might come useful to include this command to be executed every time you do composer install or composer update to do that in your composer.json look for and in add under new line with ,
For receiving random message you can use Dependency injection inside your controller
or it can be used directly inside your template:
Contributing
You can create your own messages or even contribute them for all to enjoy
Creating and configuring repository
For creating new messages you need to have new empty git repository for example on GitHub and add https link to your list of repositories like shown bellow:
note: repolace
and with your actual values
- Then update git_email and git_name with your actual git name and email used with repo you just added.
- To generate git_access_token go to this page: https://github.com/settings/tokens and create token with access to pushing commits
Creating new messages
Ok so about creating new repo for your messages well... it is not necessary I was lying you can totally create messages to default repo, but you wouldn't be able to download them on deployment server.
Well since you have an empty repo why not just use it.
- type command this will ask you what repo you want to use so pick newly created one
- then it will ask you the for your messages and the messages will be written in.
note: For language use 2 letter format for example for english use
- then you can add as many messages as you want.
- if you want to end adding new messages just press again with empty message
Pushing messages
So we have an empty repo and json file with new messages it is time to actually push them to Github.
-
Assuming we have correctly configured git_name and git_access_token. execute command this command will ask you what repo you want to push to so pick the newly created one.
- Then it will show you changes you made to the repo there should be list with all json files you just created. If you are OK with changes type "y" and press
- Now you can type your commit message. Type here something meaningful about your messages like source or something and again press
- Hopefully everything is working and you will see green message telling you that repository was successfully updated, and you can check new commit in your GitHub page.
Contributing messages to mainline repo
If you want to share your messages with whole world do same thing as you did on step: Creating and configuring repository but don't create new empty repository but fork this: instead. And then continue as with empty repository.
note: To fork a repo on GitHub go to repository you want to fork and click on Fork button on top right corner.
All versions of random-message-bundle with dependencies
symfony/yaml Version ^6.1
symfony/event-dispatcher Version ^6.1
symfony/event-dispatcher-contracts Version ^3.1
symfony/twig-bundle Version ^6.1
symfony/serializer Version ^6.1
doctrine/collections Version ^2.1
symfony/validator Version ^6.1
whitecube/lingua Version ^1.1
symfony/http-client Version ^6.1
nyholm/psr7 Version ^1.5
czproject/git-php Version ^4.1
symfony/console Version ^6.1
symfony/config Version ^6.1
symfony/string Version ^6.1
symfony/dependency-injection Version ^6.2