Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
Omines\DataTablesBundle\DataTablesBundle::class => ['all'=>true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
];
4 changes: 4 additions & 0 deletions config/packages/dev/swiftmailer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# See https://symfony.com/doc/current/email/dev_environment.html
swiftmailer:
# send all emails to a specific address
#delivery_addresses: ['me@example.com']
21 changes: 10 additions & 11 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
security:

encoders:
App\Entity\User:
algorithm: bcrypt
algorithm: auto

# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
# used to reload user from session & other features (e.g. switch_user)
app_user_provider:
entity:
class: App\Entity\User
Expand All @@ -14,18 +15,16 @@ security:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: true
anonymous: lazy
provider: app_user_provider
form_login:
login_path: login
check_path: login
default_target_path: accueil

guard:
authenticators:
- App\Security\GoogleAuthenticator
- App\Security\LoginAuthAuthenticator
logout:
path: logout
path: app_logout
# where to redirect after logout
# target: app_any_route

# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication

Expand All @@ -35,5 +34,5 @@ security:
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
- { path: ^/admin/*, roles: ROLE_ADMIN }
# - { path: ^/admin, roles: ROLE_ADMIN }
# - { path: ^/profile, roles: ROLE_USER }
13 changes: 13 additions & 0 deletions config/packages/swiftmailer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
swiftmailer:
url: '%env(MAILER_URL)%'
transport: gmail
host: smtp.gmail.com
port: 465
encryption: ssl
auth-mode: login
spool: { type: 'memory' }
stream_options:
ssl:
allow_self_signed: true
verify_peer: false
verify_peer_name: false
2 changes: 2 additions & 0 deletions config/packages/test/swiftmailer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
swiftmailer:
disable_delivery: true
12 changes: 3 additions & 9 deletions config/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
index:
path: /
controller: App\Controller\HomeController::index
#connect_facebook_check:
# path: /connect/facebook/check
# controller: App\Controller\FacebookController::connectCheckAction
# schemes: [https]


#index:
# path: /
# controller: App\Controller\DefaultController::index
35 changes: 35 additions & 0 deletions migrations/Version20210303130124.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210303130124 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}

public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE gerant (id_gerant VARCHAR(16) NOT NULL, nom VARCHAR(10) NOT NULL, prenom VARCHAR(10) NOT NULL, date_nais DATE NOT NULL, ad_email VARCHAR(50) NOT NULL, cin VARCHAR(8) NOT NULL, PRIMARY KEY(id_gerant)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
}

public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('DROP TABLE gerant');
}
}
36 changes: 36 additions & 0 deletions migrations/Version20210304133126.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210304133126 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}

public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE activity (id INT AUTO_INCREMENT NOT NULL, id_act VARCHAR(16) NOT NULL, type VARCHAR(16) NOT NULL, description VARCHAR(255) DEFAULT NULL, date_val DATE NOT NULL, categorie VARCHAR(255) NOT NULL, Id_gerant VARCHAR(16) NOT NULL, INDEX IDX_AC74095A75126B3E (Id_gerant), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE activity ADD CONSTRAINT FK_AC74095A75126B3E FOREIGN KEY (Id_gerant) REFERENCES gerant (Id_gerant)');
}

public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('DROP TABLE activity');
}
}
39 changes: 39 additions & 0 deletions migrations/Version20210310132328.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210310132328 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}

public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE activity (id INT AUTO_INCREMENT NOT NULL, id_act VARCHAR(16) NOT NULL, type VARCHAR(16) NOT NULL, description VARCHAR(255) DEFAULT NULL, date_val DATE NOT NULL, categorie VARCHAR(255) NOT NULL, Id_gerant VARCHAR(16) DEFAULT NULL, INDEX IDX_AC74095A75126B3E (Id_gerant), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE activity ADD CONSTRAINT FK_AC74095A75126B3E FOREIGN KEY (Id_gerant) REFERENCES gerant (id_gerant)');
$this->addSql('DROP TABLE activities');
}

public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE activities (id INT AUTO_INCREMENT NOT NULL, id_act VARCHAR(16) NOT NULL COLLATE utf8mb4_unicode_ci, type VARCHAR(16) NOT NULL COLLATE utf8mb4_unicode_ci, description VARCHAR(255) DEFAULT NULL COLLATE utf8mb4_unicode_ci, date_val DATE NOT NULL, categorie VARCHAR(255) NOT NULL COLLATE utf8mb4_unicode_ci, Id_gerant VARCHAR(16) DEFAULT NULL COLLATE utf8mb4_unicode_ci, FULLTEXT INDEX IDX_B5F1AFE531481D1E8CDE5729F7E3E99D (id_act, type, Id_gerant), INDEX IDX_B5F1AFE575126B3E (Id_gerant), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE activities ADD CONSTRAINT FK_B5F1AFE575126B3E FOREIGN KEY (Id_gerant) REFERENCES gerant (id_gerant)');
$this->addSql('DROP TABLE activity');
}
}
36 changes: 36 additions & 0 deletions migrations/Version20210310151408.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210310151408 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}

public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE act_like (id INT AUTO_INCREMENT NOT NULL, post_id INT DEFAULT NULL, INDEX IDX_64EAA1564B89032C (post_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE act_like ADD CONSTRAINT FK_64EAA1564B89032C FOREIGN KEY (post_id) REFERENCES activity (id)');
}

public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('DROP TABLE act_like');
}
}
35 changes: 35 additions & 0 deletions migrations/Version20210310163412.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210310163412 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}

public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
}

public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('DROP TABLE user');
}
}
39 changes: 39 additions & 0 deletions migrations/Version20210310192403.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210310192403 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}

public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('ALTER TABLE act_like ADD user_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE act_like ADD CONSTRAINT FK_64EAA156A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_64EAA156A76ED395 ON act_like (user_id)');
}

public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('ALTER TABLE act_like DROP FOREIGN KEY FK_64EAA156A76ED395');
$this->addSql('DROP INDEX IDX_64EAA156A76ED395 ON act_like');
$this->addSql('ALTER TABLE act_like DROP user_id');
}
}
Loading