diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e9081e..9453276 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,8 @@ jobs: matrix: include: # --prefer-lowest keeps DBAL 3 covered; every other row resolves to DBAL 4. - - php: 8.1 + - php: 8.3 composer_update_flags: --prefer-lowest - - php: 8.1 - - php: 8.2 - php: 8.3 # Symfony 8 needs PHP 8.4, so this is where that support is actually exercised. - php: 8.4 diff --git a/LICENSE b/LICENSE index 597928e..307c293 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 yousign +Copyright (c) 2023-2026 Youtrust Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 90a81ae..9d69998 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,33 @@ Make your migrations safe ## 🪄 Features - PG 13+ -- PHP 8.1 +- PHP 8.3 - Doctrine Migration ## 🤷 Why? Because SQL migrations can execute heavy queries on database which can slow down your application. +## ⬆️ Upgrading from `yousign/safe-migrations` + +This package was published as `yousign/safe-migrations` up to v1.0.7, under the `Yousign\SafeMigrations\` +namespace. Following the company rename to Youtrust, v2.0.0 moves to `youtrust/safe-migrations` and the +`Youtrust\SafeMigrations\` namespace. There is no functional change between v1.0.7 and v2.0.0. + +```shell +$ composer remove yousign/safe-migrations +$ composer req youtrust/safe-migrations:^2.0 +``` + +Then replace every `Yousign\SafeMigrations\` prefix with `Youtrust\SafeMigrations\`. Two spots are easy to +miss because they live in configuration rather than in PHP code: + +- the middleware service id in `services.yaml` +- the `use` statement in your `migration.php.tpl` template + +`yousign/safe-migrations` is abandoned and no longer maintained. It will receive no further +release of any kind, security fixes included. Upgrade to `youtrust/safe-migrations`. + ## ⚙️ Config _*For Symfony 6.4, 7.x or 8.x, with Doctrine DBAL 3 or 4_ @@ -19,7 +39,7 @@ _*For Symfony 6.4, 7.x or 8.x, with Doctrine DBAL 3 or 4_ Install in your project ```shell -$ composer req yousign/safe-migrations +$ composer req youtrust/safe-migrations ``` Declare the Middleware in your `services.yaml` @@ -29,7 +49,7 @@ parameters: env(ENABLE_RETRY_LOCK_TIMEOUT): false services: - Yousign\SafeMigrations\Doctrine\DBAL\Driver\Middleware\RetryLockTimeoutMiddleware: + Youtrust\SafeMigrations\Doctrine\DBAL\Driver\Middleware\RetryLockTimeoutMiddleware: $isEnabled: '%env(bool:ENABLE_RETRY_LOCK_TIMEOUT)%' ``` @@ -43,7 +63,7 @@ declare(strict_types=1); namespace ; use Doctrine\DBAL\Schema\Schema; -use Yousign\SafeMigrations\Doctrine\Migration; +use Youtrust\SafeMigrations\Doctrine\Migration; class extends Migration { diff --git a/composer.json b/composer.json index 2d7687f..7667dc5 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,26 @@ { - "name": "yousign/safe-migrations", + "name": "youtrust/safe-migrations", "description": "Make your migrations safe", "type": "library", "license": "MIT", "authors": [ { "name": "Benoit Galati", - "email": "benoit.galati@yousign.com" + "email": "benoit.galati@youtrust.com" }, { "name": "Nicolas Dousson", - "email": "nicolas.dousson@yousign.com" + "email": "nicolas.dousson@youtrust.com" } ], "autoload": { "psr-4": { - "Yousign\\SafeMigrations\\": "src" + "Youtrust\\SafeMigrations\\": "src" } }, "autoload-dev": { "psr-4": { - "Yousign\\SafeMigrations\\Tests\\": "tests" + "Youtrust\\SafeMigrations\\Tests\\": "tests" } }, "config": { @@ -32,7 +32,7 @@ } }, "require": { - "php": "^8.1", + "php": "^8.3", "doctrine/dbal": "^3.7|^4.0", "doctrine/migrations": "^3.6", "symfony/string": "^6.4|^7.0|^8.0" diff --git a/src/Doctrine/DBAL/Driver/Middleware/LockWaitTimeoutException.php b/src/Doctrine/DBAL/Driver/Middleware/LockWaitTimeoutException.php index 78dff25..15be884 100644 --- a/src/Doctrine/DBAL/Driver/Middleware/LockWaitTimeoutException.php +++ b/src/Doctrine/DBAL/Driver/Middleware/LockWaitTimeoutException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yousign\SafeMigrations\Doctrine\DBAL\Driver\Middleware; +namespace Youtrust\SafeMigrations\Doctrine\DBAL\Driver\Middleware; use Doctrine\DBAL\Driver\Exception as DriverException; diff --git a/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutConnection.php b/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutConnection.php index 1ec95c9..2956898 100644 --- a/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutConnection.php +++ b/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutConnection.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yousign\SafeMigrations\Doctrine\DBAL\Driver\Middleware; +namespace Youtrust\SafeMigrations\Doctrine\DBAL\Driver\Middleware; use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\Exception as DriverException; diff --git a/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutDriver.php b/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutDriver.php index abf9b72..e1191ec 100644 --- a/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutDriver.php +++ b/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutDriver.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yousign\SafeMigrations\Doctrine\DBAL\Driver\Middleware; +namespace Youtrust\SafeMigrations\Doctrine\DBAL\Driver\Middleware; use Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver\Middleware\AbstractDriverMiddleware; diff --git a/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutMiddleware.php b/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutMiddleware.php index 43ea717..a536845 100644 --- a/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutMiddleware.php +++ b/src/Doctrine/DBAL/Driver/Middleware/RetryLockTimeoutMiddleware.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yousign\SafeMigrations\Doctrine\DBAL\Driver\Middleware; +namespace Youtrust\SafeMigrations\Doctrine\DBAL\Driver\Middleware; use Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver\Middleware; diff --git a/src/Doctrine/Migration.php b/src/Doctrine/Migration.php index d04b32e..6813eff 100644 --- a/src/Doctrine/Migration.php +++ b/src/Doctrine/Migration.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yousign\SafeMigrations\Doctrine; +namespace Youtrust\SafeMigrations\Doctrine; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Schema\Schema; diff --git a/tests/Database/Doctrine/Migrations/MigrationTest.php b/tests/Database/Doctrine/Migrations/MigrationTest.php index 6428057..b3ea74e 100644 --- a/tests/Database/Doctrine/Migrations/MigrationTest.php +++ b/tests/Database/Doctrine/Migrations/MigrationTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yousign\SafeMigrations\Tests\Database\Doctrine\Migrations; +namespace Youtrust\SafeMigrations\Tests\Database\Doctrine\Migrations; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Schema\Schema; @@ -12,7 +12,7 @@ use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; -use Yousign\SafeMigrations\Doctrine\Migration; +use Youtrust\SafeMigrations\Doctrine\Migration; final class MigrationTest extends TestCase {