Commit f93bb9c4 authored by Dominique Merle's avatar Dominique Merle 馃挰
Browse files

馃敟馃敟馃敟

Fire! Fire!

1. git commit
2. git push
3. exit

---

Feature suite passes, but:

- No Security.
- No Anonymous voting.
- No Registratioh.
parent ea498f88
......@@ -19,3 +19,22 @@ APP_SECRET=9075ad55bb91bc2d3c822f6c195ab01e
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS='^localhost|example\.com$'
###< symfony/framework-bundle ###
###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$
###< nelmio/cors-bundle ###
###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
#DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db
###< doctrine/doctrine-bundle ###
###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=doctrine://default
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
###< symfony/messenger ###
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
#APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
.idea
.directory
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
......@@ -7,3 +10,16 @@
/var/
/vendor/
###< symfony/framework-bundle ###
###> behat/symfony2-extension ###
behat.yml
###< behat/symfony2-extension ###
###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###
###> symfony/web-server-bundle ###
/.web-server-pid
###< symfony/web-server-bundle ###
[submodule "features/gherkin/fr"]
path = features/gherkin/fr
url = https://framagit.org/limaju/limaju-server-features-fr.git
# You need to copy this file to `behat.yaml`.
# We should automate this copy with a hook on Composer. NIH
default:
suites:
rest:
contexts:
- MainFeatureContext:
actors: '@App\Features\Actors'
- HookFeatureContext:
actors: '@App\Features\Actors'
- ToolFeatureContext:
actors: '@App\Features\Actors'
- PoetryFeatureContext:
actors: '@App\Features\Actors'
- ApiRegistrationFeatureContext:
actors: '@App\Features\Actors'
- ApiRestFeatureContext:
actors: '@App\Features\Actors'
# graphql:
# contexts:
# - MainFeatureContext:
# actors: '@App\Features\Actors'
# - HookFeatureContext:
# actors: '@App\Features\Actors'
# - ToolFeatureContext:
# actors: '@App\Features\Actors'
# - PoetryFeatureContext:
# actors: '@App\Features\Actors'
# - ApiRegistrationFeatureContext:
# actors: '@App\Features\Actors'
# - ApiGraphFeatureContext:
# actors: '@App\Features\Actors'
extensions:
Behat\Symfony2Extension:
kernel:
bootstrap: features/bootstrap/bootstrap.php
class: App\Kernel
\ No newline at end of file
This diff is collapsed.
......@@ -2,4 +2,19 @@
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
Liip\FunctionalTestBundle\LiipFunctionalTestBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
MsgPhp\UserBundle\MsgPhpUserBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
];
# https://api-platform.com/docs/core/configuration/
api_platform:
# The title of the API.
title: 'Limaju API'
# The description of the API.
description: |
*Limaju* is a **deliberation service** using (liquid) **majority judgment** polling.
It's **libre software** made and maintained by nobodies.
You're browsing the API documentation.
For more, head over to [Gitlab](https://framagit.org/limaju).
# The version of the API.
version: '0.0.0-dev'
# Set this to false if you want Webby to disappear.
show_webby: true
# The shenanigans
mapping:
paths: ['%kernel.project_dir%/src/Entity']
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
doctrine:
dbal:
# configure these for your database server
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
url: '%env(resolve:DATABASE_URL)%'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
......@@ -14,3 +14,8 @@ framework:
#fragments: true
php_errors:
log: true
# Enable annotations (for API Platform)
# https://api-platform.com/docs/core/serialization/#configuration
serializer:
enable_annotations: true
# see https://github.com/symfony/recipes/blob/master/symfony/messenger/4.3/config/packages/messenger.yaml
framework:
messenger:
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed
transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
routing:
# Route your messages to the transports
# 'App\Message\YourMessage': async
default_bus: command_bus
buses:
command_bus: ~
event_bus:
default_middleware: allow_no_handlers
services:
msgphp.messenger.command_bus: '@command_bus'
msgphp.messenger.event_bus: '@event_bus'
<?php
// generated by `make:user:msgphp`
// this configuration may be merged into your existing application configuration
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use function Symfony\Component\DependencyInjection\Loader\Configurator\ref;
return function (ContainerConfigurator $container) {
$container->extension('msgphp_user', array (
'class_mapping' =>
array (
'MsgPhp\\User\\Credential\\Credential' => 'MsgPhp\\User\\Credential\\EmailPassword',
'MsgPhp\\User\\Role' => 'App\\Entity\\Role',
'MsgPhp\\User\\UserRole' => 'App\\Entity\\UserRole',
),
'role_providers' =>
array (
'default' =>
array (
0 => 'ROLE_USER',
),
0 => 'MsgPhp\\User\\Role\\UserRoleProvider',
),
));
$container->services()
->defaults()
->private()
->autoconfigure()
->autowire()
->set(App\Console\ClassContextElementFactory::class)
->alias(MsgPhp\Domain\Infrastructure\Console\Context\ClassContextElementFactory::class, App\Console\ClassContextElementFactory::class)
;
};
<?php
use MsgPhp\User\User;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return function (ContainerConfigurator $container) {
$container->extension('msgphp_user', [
'class_mapping' => [
User::class => \App\Entity\User::class,
],
]);
};
nelmio_api_doc:
documentation:
info:
title: My App
description: This is an awesome app!
version: 1.0.0
areas: # to filter documented areas
path_patterns:
- ^/api(?!/doc$) # Accepts routes under /api except /api/doc
nelmio_cors:
defaults:
origin_regex: true
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['Content-Type', 'Authorization']
expose_headers: ['Link']
max_age: 3600
paths:
'^/': null
doctrine:
orm:
auto_generate_proxy_classes: false
metadata_cache_driver:
type: service
id: doctrine.system_cache_provider
query_cache_driver:
type: service
id: doctrine.system_cache_provider
result_cache_driver:
type: service
id: doctrine.result_cache_provider
services:
doctrine.result_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.result_cache_pool'
doctrine.system_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.system_cache_pool'
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
deprecation_filter:
type: filter
handler: deprecation
max_level: info
channels: ["php"]
doctrine:
dbal:
types:
uuid: 'Ramsey\Uuid\Doctrine\UuidType'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment