Skip to content

Commit fe7549d

Browse files
Merge pull request #425 from afup/update-version
Update version
2 parents 0098836 + fe1e477 commit fe7549d

36 files changed

+5098
-11038
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GA_ENABLED=false
2525
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
2626
#
2727
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
28-
DATABASE_URL="mysql://barometreuser:barometrepass@db/barometre?serverVersion=5.7"
28+
DATABASE_URL="mysql://barometreuser:barometrepass@127.0.0.1:3399/barometre?serverVersion=5.5"
2929
###< doctrine/doctrine-bundle ###
3030

3131
AFUP_GLOBAL_MENU_PREFIX="https://afup.org"

Gruntfile.js

Lines changed: 9 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const sass = require('node-sass');
1+
const sass = require('sass');
22

33
module.exports = function(grunt) {
44

@@ -15,58 +15,19 @@ module.exports = function(grunt) {
1515
{expand: false, src: 'node_modules/tablesorter/dist/css/theme.bootstrap.css', dest: 'assets/sass/vendor/tablesorter.theme.bootstrap.scss'},
1616
{expand: false, src: 'node_modules/colorbrewer/colorbrewer.css', dest: 'assets/sass/vendor/colorbrewer.scss'},
1717
{expand: false, src: 'node_modules/github-fork-ribbon-css/gh-fork-ribbon.css', dest: 'assets/sass/vendor/github-fork-ribbon/gh-fork-ribbon.scss'},
18+
{expand: false, src: 'node_modules/font-awesome/css/font-awesome.css', dest: 'assets/sass/vendor/font-awesome.scss'},
19+
{expand: true, cwd: 'node_modules/font-awesome/fonts/', src: ['**'], dest: 'public/assets/fonts/'},
1820
{expand: true, cwd: 'node_modules/tarteaucitronjs/', src: ['*.js', 'lang/tarteaucitron.fr.js'], dest: 'public/js/tarteaucitron/'},
1921
]
2022
}
2123
},
2224

23-
webfont_svg_extractor: {
24-
fontawesome: {
25-
options: {
26-
fontPath: "node_modules/font-awesome/fonts/fontawesome-webfont.svg",
27-
cssPath: "node_modules/font-awesome/css/font-awesome.css",
28-
outputDir: "var/cache/grunt/font/",
29-
preset: "fontawesome",
30-
icons: [
31-
"chevron-up",
32-
"chevron-down",
33-
"remove",
34-
"smile-o",
35-
"frown-o",
36-
"male",
37-
"female",
38-
"apple",
39-
"linux",
40-
"windows"
41-
]
42-
}
43-
}
44-
},
45-
46-
webfont: {
47-
icons: {
48-
src: 'var/cache/grunt/font/*.svg',
49-
dest: 'public/assets/fonts',
50-
destCss: 'assets/sass/generated',
51-
options: {
52-
templateOptions: {
53-
baseClass: 'icon',
54-
classPrefix: 'icon-'
55-
},
56-
relativeFontPath: '/assets/fonts/',
57-
htmlDemo: false,
58-
fontHeight: 1024,
59-
engine: 'node',
60-
stylesheet: 'scss',
61-
types: 'eot,woff,ttf,svg'
62-
}
63-
}
64-
},
65-
6625

6726
sass: {
6827
options: {
6928
implementation: sass,
29+
quietDeps: true,
30+
silenceDeprecations: ['import', 'global-builtin', 'color-functions', 'slash-div', 'if-function'],
7031
},
7132
dist: {
7233
options: {
@@ -92,8 +53,8 @@ module.exports = function(grunt) {
9253
'node_modules/select2/dist/js/i18n/fr.js',
9354
'node_modules/highcharts/highcharts.js',
9455
'node_modules/highchartTable/jquery.highchartTable.js',
95-
'node_modules/tablesorter/js/jquery.tablesorter.js',
96-
'node_modules/tablesorter/js/jquery.tablesorter.widgets.js',
56+
'node_modules/tablesorter/dist/js/jquery.tablesorter.js',
57+
'node_modules/tablesorter/dist/js/jquery.tablesorter.widgets.js',
9758
'node_modules/d3/d3.v2.js',
9859
'assets/js/tablesorter.js',
9960
'assets/js/select2.js',
@@ -170,19 +131,6 @@ module.exports = function(grunt) {
170131
src: ['assets/js/*']
171132
},
172133

173-
sasslint: {
174-
options: {
175-
configFile: ".sass-lint.yml"
176-
},
177-
target: ['assets/sass/**']
178-
},
179-
180-
githooks: {
181-
all: {
182-
'pre-commit': 'test lint'
183-
}
184-
},
185-
186134
shell: {
187135
atoum: {
188136
options: {
@@ -208,18 +156,13 @@ module.exports = function(grunt) {
208156
grunt.loadNpmTasks('grunt-contrib-cssmin');
209157
grunt.loadNpmTasks('grunt-contrib-clean');
210158
grunt.loadNpmTasks('grunt-sass');
211-
grunt.loadNpmTasks('grunt-css-url-rewrite');
212159
grunt.loadNpmTasks('grunt-filerev');
213-
grunt.loadNpmTasks('grunt-githooks');
214160
grunt.loadNpmTasks('grunt-shell');
215161
grunt.loadNpmTasks('grunt-contrib-jshint');
216-
grunt.loadNpmTasks('grunt-sass-lint');
217-
grunt.loadNpmTasks('grunt-webfont');
218-
grunt.loadNpmTasks('grunt-webfont-svg-extractor');
219162

220163
grunt.registerTask('test', ['shell:atoum']);
221-
grunt.registerTask('lint', ['shell:coke', 'jshint', 'sasslint']);
222-
grunt.registerTask('common', ['clean', 'copy', 'webfont_svg_extractor', 'webfont', 'sass', 'concat']);
164+
grunt.registerTask('lint', ['shell:coke', 'jshint']);
165+
grunt.registerTask('common', ['clean', 'copy', 'sass', 'concat']);
223166
grunt.registerTask('dev', ['common', 'filerev']);
224167
grunt.registerTask('default', ['common', 'uglify', 'cssmin', 'filerev']);
225168

Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
CURRENT_UID ?= $(shell id -u)
44

55
init:
6-
docker-compose run --rm cli /bin/bash -l -c "make vendors"
7-
docker-compose run --rm cli /bin/bash -l -c "./node_modules/grunt-cli/bin/grunt"
8-
docker-compose run --rm cli /bin/bash -l -c "php bin/console doctrine:schema:update --force"
9-
docker-compose run --rm cli /bin/bash -l -c "php -d "memory_limit=-1" bin/console doctrine:fixtures:load --no-interaction"
6+
make vendors
7+
./node_modules/grunt-cli/bin/grunt
8+
php bin/console doctrine:schema:update --force
9+
php -d "memory_limit=-1" bin/console doctrine:fixtures:load --no-interaction
1010

1111
vendors: node_modules vendor
1212

@@ -19,15 +19,8 @@ node_modules:
1919
asset_install:
2020
node_modules/grunt-cli/bin/grunt
2121

22-
docker-up: var/logs/.docker-build data_dirs
23-
docker-compose up
24-
25-
docker-build: var/logs/.docker-build
26-
27-
var/logs/.docker-build: docker-compose.yml docker-compose.override.yml $(shell find docker/dockerfiles -type f)
28-
docker-compose rm --force
29-
CURRENT_UID=$(CURRENT_UID) docker-compose build
30-
touch var/logs/.docker-build
22+
docker-up: data_dirs
23+
docker-compose up -d db
3124

3225
data_dirs: docker/data docker/data/composer
3326

README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,29 @@ Lors du forum PHP 2013 l’Association Française des Utilisateurs de PHP (AFUP)
88

99
Ce site a pour vocation de présenter les résultats de cette enquête en permettant de filtrer sur différents critères (le département, la rémunération, le type d'entreprise...) pour ainsi présenter des résultats plus en accord avec la situation du développeur les consultant.
1010

11-
## Installation via docker
11+
## Installation locale (Symfony CLI + MySQL Docker)
1212

1313
* cloner le dépot
14-
* effectuer un `make docker-up` pour la création de l'infrastructure sous docker
15-
* effectuer un `make init` pour la copie des fichiers de config par défaut, l'installation des dépendances et le build des assets.
14+
* installer Symfony CLI : https://symfony.com/download
15+
* démarrer MySQL : `make docker-up`
16+
* installer les dépendances et initialiser la base : `make init`
1617

17-
_Les ports utilisés peuvent être modifiés dans le fichier `docker-compose.override.yml`._
18+
_Le port MySQL exposé est `3399` via `docker-compose.override.yml`._
1819

19-
### Problème connus
20+
### Lancer l'application avec Symfony CLI
2021

21-
Lors de l'installation du projet avec docker, nous utilisons l'id de l'utilisateurs courant pour palier les différents problèmes de droits,
22-
Avec docker-machine, l'id de l'utilisateurs courant ne correspond pas à celui de docker-machine,
23-
pour que cela fonctionne correctement il faut surcharger la variable d'envirronement CURRENT_UID avec la valeur 1000.
22+
```
23+
symfony server:start
24+
```
25+
26+
Par défaut, Symfony CLI sert le dossier `public/`. Vous pouvez ensuite accéder au site via l’URL indiquée par la commande.
2427

25-
exemple:
28+
Commandes utiles :
2629

2730
```
28-
CURRENT_UID=1000 make docker-up
31+
symfony server:stop
32+
symfony server:status
33+
symfony server:log
2934
```
3035

3136
## Installation manuelle

assets/js/tablesorter.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ $(document).ready(function () {
77
header : 'bootstrap-header', // give the header a gradient background
88
footerRow : '',
99
footerCells: '',
10-
icons : '', // add "icon-white" to make them white; this icon class is added to the <i> in the header
11-
sortNone : 'icon-unsorted icon icon-chevron-up',
12-
sortAsc : 'icon-sorted icon icon-chevron-up ', // includes classes for Bootstrap v2 & v3
13-
sortDesc : 'icon-sorted icon icon-chevron-down ', // includes classes for Bootstrap v2 & v3
10+
icons : 'fa', // base icon class added to the <i> in the header
11+
iconSortNone : 'fa-chevron-up fa-unsorted',
12+
iconSortAsc : 'fa-chevron-up', // includes classes for Bootstrap v2 & v3
13+
iconSortDesc : 'fa-chevron-down', // includes classes for Bootstrap v2 & v3
1414
active : '', // applied when column is sorted
1515
hover : '', // use custom css here - bootstrap class may not override it
1616
filterRow : '', // filter row class
@@ -21,7 +21,7 @@ $(document).ready(function () {
2121

2222
$('table.tablesorter').tablesorter({
2323
theme : "bootstrap",
24-
headerTemplate : '{icon} {content}',
24+
headerTemplate : '{content} {icon}',
2525
widgets : [ "uitheme"]
2626
});
2727
});
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@use "sass:color";
2+
@use "sass:math";
3+
14
// Bootstrap overide:
25
$brand-primary: $afup-blue;
36
$font-family-title: "Glegoo", Helvetica, Arial, sans-serif;
@@ -6,15 +9,15 @@ $font-size-base: 14px;
69
// Navbar
710
$navbar-height: 60px;
811
$navbar-inverse-bg: $afup-blue;
9-
$navbar-inverse-link-color: lighten(#000, 93.5%);
12+
$navbar-inverse-link-color: color.adjust(#000, $lightness: 93.5%);
1013
$navbar-margin-bottom: 0;
1114

1215
// Titles
13-
$font-size-h1: floor($font-size-base * 2.4); // ~36px
14-
$font-size-h2: floor($font-size-base * 2); // ~30px
15-
$font-size-h3: ceil($font-size-base * 1.5); // ~24px
16-
$font-size-h4: ceil($font-size-base * 1.2); // ~18px
16+
$font-size-h1: math.floor($font-size-base * 2.4); // ~36px
17+
$font-size-h2: math.floor($font-size-base * 2); // ~30px
18+
$font-size-h3: math.ceil($font-size-base * 1.5); // ~24px
19+
$font-size-h4: math.ceil($font-size-base * 1.2); // ~18px
1720
$font-size-h5: $font-size-base;
18-
$font-size-h6: ceil($font-size-base * .85); // ~12px
21+
$font-size-h6: math.ceil($font-size-base * 0.85); // ~12px
1922

2023
$btn-info-bg: $afup-blue;

assets/sass/_tablesorter.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
.icon-unsorted {
1+
.fa-unsorted {
22
opacity: .2;
33
}
44

5+
.tablesorter-header-inner .tablesorter-icon {
6+
display: inline-block;
7+
margin-left: 0.35em;
8+
}
9+
510
.tablesorter-header-inner {
611
cursor: pointer;
712
}
8-

assets/sass/_variables.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
$bootstrap-sass-asset-helper: false;
2+
@use "sass:color";
23
$icon-font-path: "../fonts/";
34

45
// Colors:
56
$afup-blue: #4c6eaf;
6-
$afup-blue-light: lighten($afup-blue, 33%);
7+
$afup-blue-light: color.adjust($afup-blue, $lightness: 33%);

assets/sass/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// tarteaucitron
1919
@import "_tarteaucitron.scss";
2020

21-
@import "generated/icons";
21+
@import "vendor/font-awesome";
2222

2323
// Barometre
2424
@import "global";

composer.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"minimum-stability": "stable",
77
"prefer-stable": true,
88
"require": {
9-
"php": ">=8.1",
9+
"php": ">=8.5",
1010
"ext-ctype": "*",
1111
"ext-iconv": "*",
1212
"agallou/departements": "^0.1.0",
@@ -18,18 +18,18 @@
1818
"doctrine/orm": "^2.11",
1919
"knplabs/knp-menu-bundle": "^3.2",
2020
"symfony/apache-pack": "^1.0",
21-
"symfony/asset": "^6.2",
22-
"symfony/console": "^6.2",
23-
"symfony/dotenv": "^6.2",
21+
"symfony/asset": "^6.4",
22+
"symfony/console": "^6.4",
23+
"symfony/dotenv": "^6.4",
2424
"symfony/flex": "^1.17|^2",
25-
"symfony/form": "^6.2",
26-
"symfony/framework-bundle": "^6.2",
27-
"symfony/proxy-manager-bridge": "^6.2",
28-
"symfony/runtime": "^6.2",
29-
"symfony/security-csrf": "^6.2",
30-
"symfony/translation": "^6.2",
31-
"symfony/twig-bundle": "^6.2",
32-
"symfony/yaml": "^6.2",
25+
"symfony/form": "^6.4",
26+
"symfony/framework-bundle": "^6.4",
27+
"symfony/proxy-manager-bridge": "^6.4",
28+
"symfony/runtime": "^6.4",
29+
"symfony/security-csrf": "^6.4",
30+
"symfony/translation": "^6.4",
31+
"symfony/twig-bundle": "^6.4",
32+
"symfony/yaml": "^6.4",
3333
"twig/extra-bundle": "^3.5",
3434
"twig/twig": "^3.5"
3535
},
@@ -78,15 +78,15 @@
7878
"extra": {
7979
"symfony": {
8080
"allow-contrib": false,
81-
"require": "6.2.*"
81+
"require": "6.4.*"
8282
}
8383
},
8484
"require-dev": {
8585
"atoum/atoum": "^4.0",
8686
"doctrine/doctrine-fixtures-bundle": "^3.4",
8787
"nelmio/alice": "^3.10",
8888
"symfony/maker-bundle": "^1.36",
89-
"symfony/stopwatch": "^6.2",
90-
"symfony/web-profiler-bundle": "^6.2"
89+
"symfony/stopwatch": "^6.4",
90+
"symfony/web-profiler-bundle": "^6.4"
9191
}
9292
}

0 commit comments

Comments
 (0)