PHPackages                             fabricio872/random-message-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fabricio872/random-message-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

fabricio872/random-message-bundle
=================================

Symfony bundle that gives you various funny messages you can display on loading screen or anywhere where you need some placeholder content

v0.1.12(3y ago)0250MITPHP

Since Apr 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Fabricio872/random-message-bundle)[ Packagist](https://packagist.org/packages/fabricio872/random-message-bundle)[ RSS](/packages/fabricio872-random-message-bundle/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (20)Versions (14)Used By (0)

[![GitHub tag (latest by date)](https://camo.githubusercontent.com/1e4b670ae8027d4aa84b3173cf53dd5ca58d12bf1c79db110fa57ecf56fdca80/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f466162726963696f3837322f72616e646f6d2d6d6573736167652d62756e646c65)](https://camo.githubusercontent.com/1e4b670ae8027d4aa84b3173cf53dd5ca58d12bf1c79db110fa57ecf56fdca80/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f466162726963696f3837322f72616e646f6d2d6d6573736167652d62756e646c65)[![GitHub last commit](https://camo.githubusercontent.com/7f1c78e849ad92082de89b57b6c6afb21c63752a00bcf221289c430045e84b70/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f466162726963696f3837322f72616e646f6d2d6d6573736167652d62756e646c65)](https://camo.githubusercontent.com/7f1c78e849ad92082de89b57b6c6afb21c63752a00bcf221289c430045e84b70/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f466162726963696f3837322f72616e646f6d2d6d6573736167652d62756e646c65)[![Packagist Downloads](https://camo.githubusercontent.com/eb4399f0cdf6776d038afd74d70793d836917da3304399de0129c5832235ba4d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f466162726963696f3837322f72616e646f6d2d6d6573736167652d62756e646c65)](https://camo.githubusercontent.com/eb4399f0cdf6776d038afd74d70793d836917da3304399de0129c5832235ba4d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f466162726963696f3837322f72616e646f6d2d6d6573736167652d62756e646c65)[![GitHub Repo stars](https://camo.githubusercontent.com/edc2abea535642e6cbc5d1c849188b92f8d6a99c47a1fcfaa658e920e553cb27/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f466162726963696f3837322f72616e646f6d2d6d6573736167652d62756e646c653f7374796c653d736f6369616c)](https://camo.githubusercontent.com/edc2abea535642e6cbc5d1c849188b92f8d6a99c47a1fcfaa658e920e553cb27/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f466162726963696f3837322f72616e646f6d2d6d6573736167652d62756e646c653f7374796c653d736f6369616c)

Random messages
===============

[](#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
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require fabricio872/random-message-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#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:

```
$ composer require fabricio872/random-message-bundle
```

### Step 2: Enable the 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:

```
// config/bundles.php
return [
    // ...
    Fabricio872\RandomMessageBundle\RandomMessageBundle::class => ['all' => true],
];
```

Configuration options
---------------------

[](#configuration-options)

```
# config/services.yaml

# ...

# Default configuration for extension with alias: "random_message"
random_message:

 # Define default path where list of messages will be stored.
 path:                 '%kernel.project_dir%/var/random_messages'

 # List of repositories for messages
 repositories:

  # Default:
  - https://github.com/Fabricio872/random-message-repository

 # Define default language.
 default_language:     en

 # Define your email with which commits with messages will be done.
 git_email:            anonym@email.com

 # Define your name with which commits with messages will be done
 git_name:             anonym

 # Access token generated by GitHub you can make one here (https://github.com/settings/tokens)
 git_access_token:     accessToken

# ...
```

Usage
=====

[](#usage)

First of all we need to pull messages from message repository. To do that execute this command: `bin/console random_message:pull`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 `"scripts"` and in `"auto-scripts"` add under `"cache:clear": "symfony-cmd"`new line with `"random_message:pull": "symfony-cmd"`,

For receiving random message you can use Dependency injection inside your controller

```
// src/Controller/SomeController.php

    // ...

    #[Route('/some_path', 'some_name')]
    public function some_name(RandomMessage $randomMessage)
    {
        $message = $randomMessage->getMessage();

        return $this->render('some-view.html.twig', [
            'randomMessage'=> $message
        ]);
    }

    // ...
```

or it can be used directly inside your template:

```
{# some Twig template #}

    {# ... #}

    {{ random_messge() }}

    {# ... #}
```

Contributing
============

[](#contributing)

You can create your own messages or even contribute them for all to enjoy

Creating and configuring repository
-----------------------------------

[](#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:

```
# config/services.yaml

# ...

# Default configuration for extension with alias: "random_message"
random_message:

 # Define default path where list of messages will be stored.
 path:                 '%kernel.project_dir%/var/random_messages'

 # List of repositories for messages
 repositories:

  # Default:
  - https://github.com/Fabricio872/random-message-repository

 # Define default language.
 default_language:     en

 # Define your email with which commits with messages will be done.
 git_email:            anonym@email.com

 # Define your name with which commits with messages will be done
 git_name:             anonym

 # Access token generated by GitHub you can make one here (https://github.com/settings/tokens)
 git_access_token:     accessToken

# ...
```

> note: repolace &lt;YOUR\_NAME&gt; and &lt;YOUR\_REPO&gt; 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:  and create token with access to pushing commits

Creating new messages
---------------------

[](#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 `bin/console random_message:create` this will ask you what repo you want to use so pick newly created one
- then it will ask you the `category` for your messages and `language` the messages will be written in.

> note: For language use 2 letter format for example for english use `en`

- then you can add as many messages as you want.
- if you want to end adding new messages just press `enter` again with empty message

Pushing messages
----------------

[](#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 `bin/console random_message:push` 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 `enter`
- Now you can type your commit message. Type here something meaningful about your messages like source or something and again press `enter`
- 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
--------------------------------------

[](#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: `https://github.com/Fabricio872/random-message-repository` 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.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

13

Last Release

1173d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29705379?v=4)[Fabricio872](/maintainers/Fabricio872)[@Fabricio872](https://github.com/Fabricio872)

---

Top Contributors

[![Fabricio872](https://avatars.githubusercontent.com/u/29705379?v=4)](https://github.com/Fabricio872 "Fabricio872 (26 commits)")

---

Tags

memesymfony-bundle

###  Code Quality

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fabricio872-random-message-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/fabricio872-random-message-bundle/health.svg)](https://phpackages.com/packages/fabricio872-random-message-bundle)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
