Compare commits

..

22 Commits

Author SHA1 Message Date
695aa45b90 Merge branch 'bootstrap-tests-ci' of gitlab.com:Chill-Projet/chill-bundles into bootstrap-tests-ci 2021-04-21 13:46:19 +02:00
58b04783f2 do not commit composer.lock in library 2021-04-21 13:45:18 +02:00
88edb905a7 upgrade deps to chill-app 2021-04-21 13:45:18 +02:00
b884eee626 fix .gitlab-ci definition 2021-04-21 13:45:18 +02:00
167158db72 Add .gitlab-ci.yml 2021-04-21 13:45:18 +02:00
3c6b21be3b fix some tests in main bundle 2021-04-21 13:45:18 +02:00
e7772f0967 bootstrap to be run on root bundle 2021-04-21 13:45:18 +02:00
c6a87f1286 do not commit composer.lock in library 2021-04-20 21:45:50 +02:00
d57cfe09c8 upgrade deps to chill-app 2021-04-20 21:45:22 +02:00
38cba4948b fix .gitlab-ci definition 2021-04-20 21:45:06 +02:00
d765eecb8e Merge remote-tracking branch 'origin/master' into bootstrap-tests-ci 2021-04-20 21:38:53 +02:00
a7e4900690 Add .gitlab-ci.yml 2021-04-20 15:32:41 +00:00
e98a5b88aa fix some tests in main bundle 2021-04-20 17:21:39 +02:00
1b42656e0f bootstrap to be run on root bundle 2021-04-20 17:20:57 +02:00
b2ff470720 fix container property overriding to non-static 2021-04-20 15:29:54 +02:00
e9674dd334 fixtures: really find Charline 2021-04-20 15:14:15 +02:00
0fcec73a62 Merge branch 'v8-entity-parcours-fixes' into 'master'
Fix some stuff in AccompanyingPeriod

See merge request Chill-Projet/chill-bundles!13
2021-04-20 12:53:07 +00:00
9539214d24 add some constants string to constants 2021-04-19 13:34:03 +02:00
c5b4a44ff3 AccompanyingPeriodParticipation: set cascade=persist for accompanyingPeriod
fixes : A new entity was found through the relationship 'Chill\PersonBundle\Entity\AccompanyingPeriodParticipation#accompanyingPeriod'
that was not configured t  o cascade persist operations for entity: Chill\PersonBundle\Entity\AccompanyingPeriod@0000000002b1d44a000000002510e4e2.
To solve this issue: Either explici   tly call EntityManager#persist() on this unknown entity or configure
cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem
implement 'Chill\PersonBundle\Entity\AccompanyingPeriod#__toString()' to get a clue.
2021-04-19 13:32:19 +02:00
b7d6d29fac AccompanyingPeriod/ClosingMotive: fix json_array deprecated 2021-04-19 13:29:17 +02:00
51e9b1fcf2 AccompanyingPeriod/Origin: set label as json 2021-04-19 13:25:13 +02:00
b490f4a82c fix migration for parcours - rename sequence for closing motive 2021-04-19 12:58:47 +02:00
179 changed files with 469 additions and 1970 deletions

64
.env Normal file
View File

@@ -0,0 +1,64 @@
##
## Manually dump .env files in .env.local.php with
## `$ composer symfony:dump-env prod`
##
## Project environment
APP_ENV=dev
## Enable debug
APP_DEBUG=true
## Locale
LOCALE=fr
## Framework secret
APP_SECRET=ThisTokenIsNotSoSecretChangeIt
## Symfony/swiftmailer
MAILER_TRANSPORT=smtp
MAILER_HOST=smtp
MAILER_PORT=1025
MAILER_CRYPT=
MAILER_AUTH=
MAILER_USER=
MAILER_PASSWORD=
MAILER_URL=${MAILER_TRANSPORT}://${MAILER_HOST}:${MAILER_PORT}?encryption=${MAILER_CRYPT}&auth_mode=${MAILER_AUTH}&username=${MAILER_USER}&password=${MAILER_PASSWORD}
## Notifications
NOTIFICATION_HOST=localhost:8001
NOTIFICATION_FROM_EMAIL=admin@chill.social
NOTIFICATION_FROM_NAME=Chill
## Gelf
GELF_HOST=gelf
GELF_PORT=12201
## OVH OpenStack Storage User/Role
OS_USERNAME=
OS_PASSWORD=
OS_TENANT_ID=
OS_REGION_NAME=GRA
OS_AUTH_URL=https://auth.cloud.ovh.net/v2.0/
## OVH OpenStack Storage Container
ASYNC_UPLOAD_TEMP_URL_KEY=
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
## Redis Cache
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
## Twilio
TWILIO_SID=~
TWILIO_SECRET=~
## DOCKER IMAGES REGISTRY
#IMAGE_PHP=
#IMAGE_NGINX=
## DOCKER IMAGES VERSION
#VERSION=test
VERSION=prod

6
.env.test Normal file
View File

@@ -0,0 +1,6 @@
# variables for .env environement
# those variables suits for gitlab-ci
# Run tests from root to adapt your own environment
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres?serverVersion=12&charset=utf8

18
.gitignore vendored
View File

@@ -1,4 +1,20 @@
.composer/*
composer.phar
docs/build/
composer.lock
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
/bin/
###< symfony/framework-bundle ###
###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

37
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,37 @@
---
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
# Select what we should cache between builds
cache:
paths:
- tests/app/vendor/
before_script:
# add extensions to postgres
- PGPASSWORD=$POSTGRES_PASSWORD psql -U $POSTGRES_USER -h db -c "CREATE EXTENSION IF NOT EXISTS unaccent; CREATE EXTENSION IF NOT EXISTS pg_trgm;"
# Install and run Composer
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
- php tests/app/bin/console doctrine:migrations:migrate -n
- php tests/app/bin/console doctrine:fixtures:load -n
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
# See http://docs.gitlab.com/ee/ci/services/README.html for examples.
services:
- name: postgres:12
alias: db
- name: redis
alias: redis
# Set any variables we need
variables:
# Configure postgres environment variables (https://hub.docker.com/r/_/postgres/)
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# fetch the chill-app using git submodules
GIT_SUBMODULE_STRATEGY: recursive
# Run our tests
test:
script:
- bin/phpunit --colors=never

3
.gitmodules vendored
View File

@@ -1,3 +1,6 @@
[submodule "_exts/sphinx-php"]
path = _exts/sphinx-php
url = https://github.com/fabpot/sphinx-php.git
[submodule "tests/app"]
path = tests/app
url = https://gitlab.com/Chill-projet/chill-app.git

View File

@@ -19,6 +19,11 @@
"Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle"
}
},
"autoload-dev": {
"psr-4": {
"App\\": "tests/app/src/"
}
},
"require": {
"champs-libres/async-uploader-bundle": "dev-sf4",
"graylog2/gelf-php": "^1.5",
@@ -37,7 +42,6 @@
"symfony/validator": "4.*",
"sensio/framework-extra-bundle": "^5.5",
"symfony/yaml": "4.*",
"symfony/webpack-encore-bundle": "^1.11",
"knplabs/knp-menu": "^3.1",
"knplabs/knp-menu-bundle": "^3.0",
"symfony/templating": "4.*",
@@ -52,8 +56,7 @@
"symfony/browser-kit": "^5.2",
"symfony/css-selector": "^5.2",
"twig/markdown-extra": "^3.3",
"erusev/parsedown": "^1.7",
"symfony/serializer": "^5.2"
"erusev/parsedown": "^1.7"
},
"conflict": {
"symfony/symfony": "*"
@@ -67,6 +70,17 @@
"symfony/stopwatch": "^5.1",
"symfony/web-profiler-bundle": "^5.0",
"symfony/var-dumper": "4.*",
"symfony/debug-bundle": "^5.1"
"symfony/debug-bundle": "^5.1",
"symfony/phpunit-bridge": "^5.2"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
}
},
"config": {
"vendor-dir": "tests/app/vendor",
"bin-dir": "bin"
}
}

38
phpunit.xml.dist Normal file
View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/app/tests/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>
<testsuites>
<testsuite name="MainBundle">
<directory suffix="Test.php">src/Bundle/ChillMainBundle/Tests/</directory>
</testsuite>
<testsuite name="PersonBundle">
<directory suffix="Test.php">src/Bundle/ChillPersonBundle/Tests/</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
<!-- Run `composer require symfony/panther` before enabling this extension -->
<!--
<extensions>
<extension class="Symfony\Component\Panther\ServerExtension" />
</extensions>
-->
</phpunit>

View File

@@ -21,7 +21,9 @@ global.chill = chill;
/*
* load requirements in chill entrypoint
*/
require('./scss/chillmain.scss');
require('./sass/scratch.scss');
require('./css/chillmain.css');
require('./css/pikaday.css');
@@ -35,11 +37,10 @@ require('./modules/download-report/index.js');
require('./modules/select_interactive_loading/index.js');
require('./modules/export-list/export-list.scss');
require('./modules/entity/index.js');
//require('./modules/tabs/index.js');
/*
* load img
*/
require('./img/favicon.ico');
require('./img/logo-chill-sans-slogan_white.png');
require('./img/logo-chill-outil-accompagnement_white.png');
require('./img/logo-chill-outil-accompagnement_white.png');

View File

@@ -1,4 +0,0 @@
/*
* These custom styles will override bootstrap enabled stylesheets
*/

View File

@@ -1,47 +0,0 @@
/*
* Enable / disable bootstrap assets
*/
@import "bootstrap/scss/functions";
/* replace variables */
// @import "bootstrap/scss/variables";
@import "custom/_variables";
@import "bootstrap/scss/mixins";
// @import "bootstrap/scss/root";
// @import "bootstrap/scss/reboot";
// @import "bootstrap/scss/type";
// @import "bootstrap/scss/images";
// @import "bootstrap/scss/code";
// @import "bootstrap/scss/grid";
// @import "bootstrap/scss/tables";
// @import "bootstrap/scss/forms";
// @import "bootstrap/scss/buttons";
// @import "bootstrap/scss/transitions";
// @import "bootstrap/scss/dropdown";
// @import "bootstrap/scss/button-group";
// @import "bootstrap/scss/input-group";
// @import "bootstrap/scss/custom-forms";
// @import "bootstrap/scss/nav";
// @import "bootstrap/scss/navbar";
// @import "bootstrap/scss/card";
// @import "bootstrap/scss/breadcrumb";
// @import "bootstrap/scss/pagination";
// @import "bootstrap/scss/badge";
// @import "bootstrap/scss/jumbotron";
// @import "bootstrap/scss/alert";
// @import "bootstrap/scss/progress";
// @import "bootstrap/scss/media";
// @import "bootstrap/scss/list-group";
// @import "bootstrap/scss/close";
// @import "bootstrap/scss/toasts";
@import "bootstrap/scss/modal";
// @import "bootstrap/scss/tooltip";
// @import "bootstrap/scss/popover";
// @import "bootstrap/scss/carousel";
// @import "bootstrap/scss/spinners";
// @import "bootstrap/scss/utilities";
// @import "bootstrap/scss/print";
@import "custom";

View File

@@ -0,0 +1,42 @@
/*
* when bootstrap.css comes after chill.css
* we have to disable conflict classes
*/
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins";
@import "bootstrap/scss/root";
//@import "bootstrap/scss/reboot"; // h1, h2, h3, ...
//@import "bootstrap/scss/type"; // h1, h2, h3, ...
@import "bootstrap/scss/images";
@import "bootstrap/scss/code";
//@import "bootstrap/scss/grid"; // container
@import "bootstrap/scss/tables";
@import "bootstrap/scss/forms";
@import "bootstrap/scss/buttons";
@import "bootstrap/scss/transitions";
@import "bootstrap/scss/dropdown";
@import "bootstrap/scss/button-group";
@import "bootstrap/scss/input-group";
@import "bootstrap/scss/custom-forms";
@import "bootstrap/scss/nav";
@import "bootstrap/scss/navbar";
@import "bootstrap/scss/card";
@import "bootstrap/scss/breadcrumb";
@import "bootstrap/scss/pagination";
@import "bootstrap/scss/badge";
@import "bootstrap/scss/jumbotron";
@import "bootstrap/scss/alert";
@import "bootstrap/scss/progress";
@import "bootstrap/scss/media";
@import "bootstrap/scss/list-group";
@import "bootstrap/scss/close";
@import "bootstrap/scss/toasts";
@import "bootstrap/scss/modal";
@import "bootstrap/scss/tooltip";
@import "bootstrap/scss/popover";
@import "bootstrap/scss/carousel";
@import "bootstrap/scss/spinners";
@import "bootstrap/scss/utilities";
@import "bootstrap/scss/print";

View File

@@ -1,9 +1,9 @@
// Compile all bootstrap assets from nodes-modules
//require('bootstrap/scss/bootstrap.scss')
// Or compile bootstrap only enabled assets
require('./bootstrap.scss');
// Compile custom styles to adapt bootstrap in chill context
require('./custom.scss')
// You can specify which plugins you need
//import { Tooltip, Toast, Popover } from 'bootstrap';
import Modal from 'bootstrap/js/dist/modal';
//import Alert from 'bootstrap/js/dist/alert';

View File

@@ -1,2 +0,0 @@
@import '../../../fonts/OpenSans/OpenSans';

View File

@@ -1 +0,0 @@
require('./scratch.scss');

View File

@@ -1,9 +1,3 @@
/*
* NOTE 2021.04
* scss/chill.scss is the main sass file for the new chill.2
* scratch will be replaced by bootstrap, please avoid to edit in modules/scratch/_custom.scss
*/
// YOUR CUSTOM SCSS
@import 'custom/config/colors';
@import 'custom/config/variables';
@@ -162,6 +156,7 @@ dl.chill_view_data {
}
blockquote.chill-user-quote,
div.chill-user-quote {
border-left: 10px solid $chill-yellow;
@@ -169,12 +164,12 @@ div.chill-user-quote {
padding: 0.5em 10px;
quotes: "\201C""\201D""\2018""\2019";
background-color: $chill-llight-gray;
blockquote {
margin: 1.5em 10px;
padding: 0.5em 10px;
}
blockquote:before {
color: #ccc;
content: open-quote;
@@ -187,4 +182,5 @@ div.chill-user-quote {
.chill-no-data-statement {
font-style: italic;
}

View File

@@ -1,42 +1,42 @@
@charset "UTF-8";
/// Outputs the spec and prefixed versions of the `::selection` pseudo-element.
///
/// @param {Bool} $current-selector [false]
/// If set to `true`, it takes the current element into consideration.
///
/// @example scss - Usage
/// .element {
/// @include selection(true) {
/// background-color: #ffbb52;
/// }
/// }
///
/// @example css - CSS Output
/// .element::-moz-selection {
/// background-color: #ffbb52;
/// }
///
/// .element::selection {
/// background-color: #ffbb52;
/// }
@mixin selection($current-selector: false) {
@if $current-selector {
&::-moz-selection {
@content;
}
&::selection {
@content;
}
} @else {
::-moz-selection {
@content;
}
::selection {
@content;
}
}
}
@charset "UTF-8";
/// Outputs the spec and prefixed versions of the `::selection` pseudo-element.
///
/// @param {Bool} $current-selector [false]
/// If set to `true`, it takes the current element into consideration.
///
/// @example scss - Usage
/// .element {
/// @include selection(true) {
/// background-color: #ffbb52;
/// }
/// }
///
/// @example css - CSS Output
/// .element::-moz-selection {
/// background-color: #ffbb52;
/// }
///
/// .element::selection {
/// background-color: #ffbb52;
/// }
@mixin selection($current-selector: false) {
@if $current-selector {
&::-moz-selection {
@content;
}
&::selection {
@content;
}
} @else {
::-moz-selection {
@content;
}
::selection {
@content;
}
}
}

Some files were not shown because too many files have changed in this diff Show More