Skip to content
Snippets Groups Projects
Commit bb6ae52d authored by MENACER Mohamed's avatar MENACER Mohamed
Browse files

Merge branch 'br1' into 'main'

Br1

See merge request !4
parents 6aec309b 7924b94f
Branches
No related tags found
1 merge request!4Br1
stages:
- install
- test
- deploy # Optionnel, à activer si nécessaire
variables:
PHP_VERSION: "8.2"
COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/var/cache/composer"
cache:
key: composer
paths:
- vendor/
- var/cache/composer/
install_dependencies:
stage: install
image: php:$PHP_VERSION
script:
- apt-get update && apt-get install -y unzip git
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --no-interaction --prefer-dist
artifacts:
paths:
- vendor/
run_tests:
stage: test
image: php:$PHP_VERSION
script:
- ./bin/phpunit
# Déploiement (à adapter selon ton serveur)
deploy:
stage: deploy
only:
- main # Modifier selon la branche utilisée
script:
- echo "Déploiement en cours..."
# Ajouter ici les commandes pour le déploiement
......@@ -15,7 +15,7 @@ services:
build: ./docker/nginx
volumes:
- ./public:/var/www/public:delegated
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./docker/nginx/nginx.conf:/etc/nginx/default.conf
ports:
- "8000:80"
depends_on: #sinon on sera pas interprété les requêtes
......
# l'image php c'est une image minimaliste qui ne va inclure toutes les extenctions importantes pour fonctionner avec Symphony
# par exemple Ctype, iconv, simpleXML, Session ..
FROM PHP:8.3-fpm-alpine
FROM php:8.3-fpm-alpine
# install dependencies ' permet d installer des differentes dependances '
RUN apk --no-cache add curl git wget bash dpkg
......
<?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 Version20250312002806 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 `user` (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, is_verified TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), 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->addSql('DROP TABLE `user`');
$this->addSql('DROP TABLE messenger_messages');
}
}
......@@ -89,6 +89,6 @@ class RegistrationController extends AbstractController
// @TODO Change the redirect on success and handle or remove the flash message in your templates
$this->addFlash('success', 'Your email address has been verified.');
return $this->redirectToRoute('app_register');
return $this->redirectToRoute('app_login');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment