Skip to content

Commit

Permalink
27/12/20
Browse files Browse the repository at this point in the history
  • Loading branch information
Labaffe committed Dec 27, 2020
1 parent d78aebf commit 7b5b83e
Show file tree
Hide file tree
Showing 27 changed files with 1,364 additions and 79 deletions.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"doctrine/orm": "^2.7",
"knplabs/knp-paginator-bundle": "^5.3",
"phpdocumentor/reflection-docblock": "^5.2",
"psy/psysh": "^0.10.5",
"sensio/framework-extra-bundle": "^5.1",
"symfony/asset": "5.1.*",
"symfony/console": "5.1.*",
Expand All @@ -37,6 +38,7 @@
"symfony/validator": "5.1.*",
"symfony/web-link": "5.1.*",
"symfony/yaml": "5.1.*",
"symfonycasts/verify-email-bundle": "^1.1",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
Expand Down
277 changes: 220 additions & 57 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
];
7 changes: 7 additions & 0 deletions config/packages/knp_paginator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@


## /config/packages/knp_paginator.yaml

knp_paginator:
template:
pagination: '@KnpPaginator/Pagination/twitter_bootstrap_v4_pagination.html.twig'
7 changes: 7 additions & 0 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ security:
anonymous: true
lazy: true
provider: app_user_provider
guard:
authenticators:
- App\Security\LoginFormAuthenticator
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 Down
35 changes: 35 additions & 0 deletions migrations/Version20201226175148.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 Version20201226175148 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->addSql('CREATE TABLE article (id_article INT AUTO_INCREMENT NOT NULL, user_id_id INT NOT NULL, titre VARCHAR(100) NOT NULL, description MEDIUMTEXT NOT NULL, alias VARCHAR(100) NOT NULL, date_publication DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, INDEX IDX_23A0E669D86650F (user_id_id), PRIMARY KEY(id_article)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(255) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, date_publication DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE article ADD CONSTRAINT FK_23A0E669D86650F FOREIGN KEY (user_id_id) REFERENCES user (id)');
}

public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE article DROP FOREIGN KEY FK_23A0E669D86650F');
$this->addSql('DROP TABLE article');
$this->addSql('DROP TABLE user');
}
}
Loading

0 comments on commit 7b5b83e

Please sign in to comment.