PHPackages                             eureka2/g6k - 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. eureka2/g6k

ActiveProject[Utility &amp; Helpers](/categories/utility)

eureka2/g6k
===========

Generator of simulator of calculation (calculator)

4.4.8(5y ago)235.5k20[31 issues](https://github.com/eureka2/G6K/issues)MITJavaScriptPHP ^7.1.3CI failing

Since Jan 31Pushed 2y ago6 watchersCompare

[ Source](https://github.com/eureka2/G6K)[ Packagist](https://packagist.org/packages/eureka2/g6k)[ RSS](/packages/eureka2-g6k/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (32)Versions (85)Used By (0)

G6K
===

[](#g6k)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![SymfonyInsight](https://camo.githubusercontent.com/d7b6c057f1c1ed627a937252d20040c721392785c5b4544325223aff0005f6fc/68747470733a2f2f696e73696768742e73796d666f6e792e636f6d2f70726f6a656374732f63383462623362372d336261382d343531332d383231622d6262636433353336346664622f6d696e692e737667)](https://insight.symfony.com/projects/c84bb3b7-3ba8-4513-821b-bbcd35364fdb)[![Total Downloads](https://camo.githubusercontent.com/736a3120d8d2cef594c63a0116c01dca3afd2146ca3c1706a8ea3ff4738bba41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f657572656b61322f67366b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eureka2/g6k)

G6K is a tool that enables the creation and online publishing of calculation simulators without coding. It has a simulation engine and an administration module.

A calculation simulator is an online service made available to a user to enable them to calculate the results (taxes, social benefits, etc.) corresponding to their particular situation. The results are calculated on the basis of data supplied by the user, reference data (eg amount of a tax) and business rules reflecting the current legislation in the field of simulation.

[Learn more](http://eureka2.github.io/g6k/documentation/en/learn-more.html)

Table of contents
-----------------

[](#table-of-contents)

1. [Prerequisites for Symfony](#prerequisites-for-symfony)
2. [Prerequisites for G6K](#prerequisites-for-g6k)
3. [Installation](#installation)
4. [Web server configuration](#web-server-configuration)
5. [Migration](#migration)
6. [Documentation](#documentation)
7. [Code quality](#code-quality)
8. [Innovation Award](#innovation-award)
9. [Copyright and license](#copyright-and-license)

Prerequisites for Symfony
-------------------------

[](#prerequisites-for-symfony)

- PHP Version 7.1.3+
- JSON enabled
- ctype
- date.timezone in php.ini
- auto\_detect\_line\_endings = On in php.ini
- PHP-XML module
- 2.6.21+ version of libxml
- PHP tokenizer
- Modules mbstring, iconv, POSIX (only on \* nix), Intl with ICU 4+, and APCU 3.0.17+ APC (highly recommended) must be installed
- recommended php.ini settings:
    - short\_open\_tag = Off
    - magic\_quotes\_gpc = Off
    - register\_globals = Off
    - session.auto\_start = Off

Prerequisites for G6K
---------------------

[](#prerequisites-for-g6k)

- PDO enabled
- pdo\_pgsql and/or pdo\_sqlite and/or pdo\_mysql activated
- pgsql and/or sqlite3 activated
- SimpleXML enabled
- serialize\_precision = -1 in php.ini
- intl installed and activated

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

[](#installation)

1. If you plan to use MySQL or PostgreSQL, create a user with "CREATE DATABASE" and "CREATE TABLE" privileges using the administration tool of your RDBMS.
2. Be placed in the &lt;DOCUMENT\_ROOT&gt; Web Server
3. Download composer.phar () in &lt;DOCUMENT\_ROOT&gt;. composer 1.7.2+ is required.
4. Under a shell or DOS, execute: `php -d memory_limit=-1 composer.phar create-project eureka2/g6k simulator/ 4.*`
5. Enter the parameter values required by the installer, including:

- application environment \[dev or prod\] (prod) :
- debug mode \[0 or 1\] (0) :
- locale \[en-GB, en-US, fr-FR, ...\] (en-US) :
- upload directory (%kernel.project\_dir%/var/uploads) :
- mailer URL (null://localhost) :
- database engine \[sqlite, mysql or pgsql\] (sqlite) :
- database name (g6k) :

for sqlite database only:

- database version (3.15) :
- database path (%kernel.project\_dir%/var/data/databases/g6k.db) :

for mysql or pgsql database:

- database host \[localhost, ...\] :
- database port :
- database user :
- database password :
- database character set \[UTF8, LATIN1, ...\] (UTF8) :

Web server configuration
------------------------

[](#web-server-configuration)

### Adding Rewrite Rules

[](#adding-rewrite-rules)

G6K comes with a `.htaccess` file in the `calcul/` directory that contains the rewrite rules.

`/admin/...` is rewritten in `/admin.php/...` and all other queries in `/index.php/...`.

Thus, the `admin.php` and` index.php` front-end controllers can be omitted from the request urls.

### Apache

[](#apache)

You must add the `AllowOverride All` directive in the `VirtualHost` block of the server configuration.

Assuming G6K is installed in the directory `/var/www/html/simulator` :

```

    ServerName domain.tld
    ServerAlias www.domain.tld

    DocumentRoot /var/www/html/simulator

        AllowOverride All
        Order Allow,Deny
        Allow from All

    # other directives

```

For best performance, rewrite rules can be moved from the `.htaccess` file to the `VirtualHost` block of the server configuration.

In this case, change `AllowOverride All` to `AllowOverride None` and delete the `.htaccess` file.

```

    ServerName domain.tld
    ServerAlias www.domain.tld

    DocumentRoot /var/www/html/simulator

        AllowOverride None
        Order Allow,Deny
        Allow from All

        # rewrite rules from .htaccess

    # other directives

```

For security reasons, the &lt;DOCUMENT\_ROOT&gt; can be set to the `calcul/` directory : `DocumentRoot /var/www/html/simulator/calcul`

In this case, `calcul/` should be omitted from the path of the request URL.

```

    ServerName domain.tld
    ServerAlias simulators.domain.tld

    DocumentRoot /var/www/html/simulator/calcul

        # rewrite rules from .htaccess
        AllowOverride None
        Order Allow,Deny
        Allow from All

    # other directives

```

### NGinx

[](#nginx)

Because NGinx does not have `.htaccess` files, all of the setup has to be managed within the server config file.

The following is fully working. There are probably a number of improvements which can be made, but this should be a good starting-point.

The most important point is that the `/admin` path has to be routed separately to the other app.

```
server {

  rewrite ^/index\.php/?(.*)$ /$1 permanent;

  ## Admin ##
  ## Required for the admin area (this is in .htaccess inside /calcul) ##
  location /admin {
    rewrite ^(.*)$ /admin.php/$1 last;
  }
  ## Main ##
  location @rewriteapp {
    rewrite ^(.*)$ /index.php/$1 last;
  }

  ## Symfony ##
  ## PRODUCTION ENV ##
  location ~ ^/(index|admin)\.php(/|$) {
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; #-> this needs to be your php-fpm location
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    internal;
  }

  # other directives

}

```

Migration
---------

[](#migration)

If you want to transfer simulators, their data sources and style sheets from a previous installation, do not copy them manually, use the following console command:

`php bin/console g6k:simulator:copy -w abDatepicker -w abListbox -w AutoMoneyFormat all /var/www/html/simulator-old`

assuming `/var/www/html/simulator-old` is the installation directory of the previous version.

This command performs all the necessary conversions to enable their use with this new version.

Note that in this command, the -w option sets widgets. `abDatepicker`, `abListbox` and `AutoMoneyFormat` are widgets that will automatically apply to 'date', choice (select), and money fields, respectively. You can omit those you do not want to use.

At the end of the copy, go to the administration interface to clear the development and production caches.

Documentation
-------------

[](#documentation)

### Administrator's Guide

[](#administrators-guide)

\[ [en](http://eureka2.github.io/g6k/documentation/en/index.html) \] \[ [fr](http://eureka2.github.io/g6k/documentation/fr/index.html) \]

### Classes

[](#classes)

[Documentation of G6K classes](http://eureka2.github.io/g6k/documentation/classes/4.x)

Code quality
------------

[](#code-quality)

[![SymfonyInsight](https://camo.githubusercontent.com/4b6d34f5435564b0af3d72730336237d278edc3e66db8bfb08f0440bf4dccdd8/68747470733a2f2f696e73696768742e73796d666f6e792e636f6d2f70726f6a656374732f63383462623362372d336261382d343531332d383231622d6262636433353336346664622f6269672e737667)](https://insight.symfony.com/projects/c84bb3b7-3ba8-4513-821b-bbcd35364fdb)

Innovation Award
----------------

[](#innovation-award)

   [ ![PHP Classes](https://camo.githubusercontent.com/437e1b428409bfd27238796c77e3c90e6cef712abbfdc7c21282321c6104abdb/68747470733a2f2f66696c65732e706870636c61737365732e6f72672f67726170686963732f706870636c61737365732f6c6f676f2d736d616c6c2d706870636c61737365732e737667) ](https://www.phpclasses.org/ "PHP Classes")   **[G6K](https://www.phpclasses.org/package/10556-PHP-Generate-simulator-tools-to-perform-calculations.html) By [eureka2](https://www.phpclasses.org/browse/author/549500.html)**   [![PHP Programming Innovation award nominee](https://camo.githubusercontent.com/8095982c179584831fdd3732297f93867bb39fa8b132b5c6c904a09198dd3d7a/68747470733a2f2f7777772e706870636c61737365732e6f72672f61776172642f696e6e6f766174696f6e2f6e6f6d696e65652e676966 "PHP Programming Innovation award nominee")](https://www.phpclasses.org/award/innovation/)
**April 2018 Number 6**     There are many sites that are useful because they provide means to let the users perform calculations of some kind from simple values entered in Web forms.
 This package provides a Web interface to implement a generic system for designing and providing access to pages that provide several types of calculator tools.
 Manuel Lemos  Copyright and license
---------------------

[](#copyright-and-license)

© 2015-2019 Eureka2 - Jacques Archimède. Code released under the [MIT license](https://github.com/eureka2/G6K/blob/master/LICENSE).

**[↑ back to table of contents](#table-of-contents)**

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 99.6% 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 ~29 days

Recently: every ~55 days

Total

84

Last Release

1720d ago

Major Versions

3.4.2 → 4.1.22018-11-28

2.3.3 → 4.2.22019-01-07

2.x-dev → 4.4.72021-01-24

3.x-dev → 4.4.82021-04-07

4.4.8 → 5.x-dev2021-08-31

PHP version history (3 changes)1.0PHP &gt;=5.3.3

4.1.0PHP ^7.1.3

3.4.0PHP &gt;=5.5.9

### Community

Maintainers

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

---

Top Contributors

[![eureka2](https://avatars.githubusercontent.com/u/200478?v=4)](https://github.com/eureka2 "eureka2 (668 commits)")[![opportus](https://avatars.githubusercontent.com/u/11618989?v=4)](https://github.com/opportus "opportus (1 commits)")[![stsaklas](https://avatars.githubusercontent.com/u/63308160?v=4)](https://github.com/stsaklas "stsaklas (1 commits)")[![yanntoque](https://avatars.githubusercontent.com/u/14300737?v=4)](https://github.com/yanntoque "yanntoque (1 commits)")

---

Tags

calculatorenginegeneratorsjavascriptphpsimulationsimulatorsymfony

### Embed Badge

![Health badge](/badges/eureka2-g6k/health.svg)

```
[![Health](https://phpackages.com/badges/eureka2-g6k/health.svg)](https://phpackages.com/packages/eureka2-g6k)
```

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[ibexa/oss

A meta package for installing Ibexa Open Source

19772.4k11](/packages/ibexa-oss)[chameleon-system/chameleon-base

The Chameleon System core.

1026.5k3](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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