PHPackages                             liubinas/upvote-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. liubinas/upvote-bundle

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

liubinas/upvote-bundle
======================

Upvote and downvote (aka thumbs up) bundle for Symfony project

0.1.1(8y ago)2161MITPHP

Since May 7Pushed 8y agoCompare

[ Source](https://github.com/tomasliubinas/LtUpvoteBundle)[ Packagist](https://packagist.org/packages/liubinas/upvote-bundle)[ RSS](/packages/liubinas-upvote-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (10)Versions (3)Used By (0)

LtUpvoteBundle
==============

[](#ltupvotebundle)

LtUpvoteBundle is upvote and downvote (thumbs up and thumbs down) component for Symfony 3.0 project

Features
--------

[](#features)

- Configurable vote permissions
- Automatically limit unauthenticated upvotes/downvotes by IP
- Optionally hide upvote/downvote button
- Pure JavaScript frontend component implementation
- Unit tested

System requirements
-------------------

[](#system-requirements)

- Symfony 3.0
- Doctrine bundle with configured database connection

Installation
------------

[](#installation)

- Require LtUpvoteBundle over composer in your existing Symfony project:

```
composer require liubinas/upvote-bundle

```

- Initialize it in the app/AppKernel.php file:

```
$bundles[] = new Lt\UpvoteBundle\LtUpvoteBundle();
```

- Import LtUpvoteBundle routing:

```
# app/config/routing.yml
lt-upvote:
    resource: "@LtUpvoteBundle/Resources/config/routing.xml"
```

- Create required database tables:

```
$ bin/console  doctrine:schema:update

```

Configuration
-------------

[](#configuration)

The following is an example configuration defining basic context types `blog-post` and `comment`:

```
    # app/config/config.yml
    lt-upvote-bundle:
        types:
            blog-post: # Custom context type
                show_upvote: true
                show_downvote: true
                allow_unauthenticated_upvote: true
                allow_unauthenticated_downvote: false
            comment # Custom context type having the default values all true
```

Test run
--------

[](#test-run)

Start web server:

```
$ bin/console server:start

```

Test page could be accessed by navigating to `http:///lt-upvote-test` on your `dev` environment.

Front-end
---------

[](#front-end)

Front-end functionality is implemented in a single dependency free JavaScript file. Styles are defined in CSS file which could be used out of the box or adopted according to custom requirements.

### JavaScript

[](#javascript)

- Include JavaScrip module file (Twig syntax):

```

```

- Initialize JavaScript module in your HTML page:

```

```

### CSS

[](#css)

- Include basic CSS file in your html `` section:

```

```

### Twig

[](#twig)

- Include one or more front end components into your page rendered over Controller

```
{{ render(
    controller(
        'lt_upvote_bundle.controller.default:renderVoteComponent',
        {
            'subjectType': '[TYPE]',
            'subjectId': '[ID]',
            'css_class': '[CLASS]'
        }
    )
) }}

```

Where:

- `[TYPE]` is context type value.
- `[ID]` is Subject ID value.
- `[CLASS]` is component specific styling CSS class. Predefined styles are `Style1`, `Style2`.

See [test.html.twig](Resources/views/Default/test.html.twig) file for example implementation.

### JavaScript Custom Event handling

[](#javascript-custom-event-handling)

On each upvote/downvote action JavaScript event is dispatched. This action could be handled by adding custom event listener for `ltu` event type.

An example code for unauthenticated downvote handling:

```
addEventListener('ltu', function(event) {
    if (event.detail.unauthenticatedError) {
        alert('This action is permitted for the logged in visitors only.');
    }
})
```

The following properties describing performed action could be accessed from `even.detail` data object: `id`, `type`, `counter`, `action`, `unauthentificated`, `unauthentificatedError`.

License
-------

[](#license)

This bundle is under the MIT license. See the complete license in [LICENSE](LICENSE) file. f

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~0 days

Total

2

Last Release

2975d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1522729?v=4)[Tomas Liubinas](/maintainers/tomasliubinas)[@tomasliubinas](https://github.com/tomasliubinas)

---

Top Contributors

[![tomasliubinas](https://avatars.githubusercontent.com/u/1522729?v=4)](https://github.com/tomasliubinas "tomasliubinas (197 commits)")

---

Tags

bundlesymfonythumbsupupvote

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/liubinas-upvote-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/liubinas-upvote-bundle/health.svg)](https://phpackages.com/packages/liubinas-upvote-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k58](/packages/open-dxp-opendxp)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

939.0k](/packages/ahmed-bhs-doctrine-doctor)

PHPackages © 2026

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