diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24afc4b..e851193 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: '8.2' extensions: mbstring, intl, bcmath coverage: none @@ -41,7 +41,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: '8.1' extensions: mbstring, intl, bcmath coverage: none diff --git a/README.md b/README.md index 7beee54..e997503 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Propel Module [![Latest Stable Version](https://poser.pugx.org/spryker/propel/v/stable.svg)](https://packagist.org/packages/spryker/propel) -[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.0-8892BF.svg)](https://php.net/) +[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/) Propel is the glue between Spryker's persistence layer and the Propel ORM library. It supports both MySQL and PostgreSQL databases. diff --git a/composer.json b/composer.json index 3925b37..a8cd8ea 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "Propel module", "license": "proprietary", "require": { - "php": ">=8.0", + "php": ">=8.1", "spryker/application-extension": "^1.0.0", "spryker/config": "^3.0.0", "spryker/health-check-extension": "^1.0.0", diff --git a/src/Spryker/Zed/Propel/Business/Model/PropelDatabase/Adapter/PostgreSql/CreatePostgreSqlDatabase.php b/src/Spryker/Zed/Propel/Business/Model/PropelDatabase/Adapter/PostgreSql/CreatePostgreSqlDatabase.php index debaaa7..7693109 100644 --- a/src/Spryker/Zed/Propel/Business/Model/PropelDatabase/Adapter/PostgreSql/CreatePostgreSqlDatabase.php +++ b/src/Spryker/Zed/Propel/Business/Model/PropelDatabase/Adapter/PostgreSql/CreatePostgreSqlDatabase.php @@ -150,19 +150,6 @@ protected function runProcess($command) */ protected function getProcess(string $command): Process { - // Shim for Symfony 3.x, to be removed when Symfony dependency becomes 4.2+ - if (!method_exists(Process::class, 'fromShellCommandline')) { - if (version_compare(PHP_VERSION, '8.0.0', '>=') === true) { - throw new UnsupportedVersionException('The minimum required version for symfony/process is 4.2.0 to work with PHP 8'); - } - - /** - * @phpstan-ignore-next-line - * @psalm-suppress InvalidArgument - */ - return new Process($command); - } - return Process::fromShellCommandline($command); } diff --git a/src/Spryker/Zed/Propel/Business/Model/PropelDatabase/Adapter/PostgreSql/DropPostgreSqlDatabase.php b/src/Spryker/Zed/Propel/Business/Model/PropelDatabase/Adapter/PostgreSql/DropPostgreSqlDatabase.php index 297c8ce..3808561 100644 --- a/src/Spryker/Zed/Propel/Business/Model/PropelDatabase/Adapter/PostgreSql/DropPostgreSqlDatabase.php +++ b/src/Spryker/Zed/Propel/Business/Model/PropelDatabase/Adapter/PostgreSql/DropPostgreSqlDatabase.php @@ -142,19 +142,6 @@ protected function useSudo() */ protected function getProcess($command) { - // Shim for Symfony 3.x, to be removed when Symfony dependency becomes 4.2+ - if (!method_exists(Process::class, 'fromShellCommandline')) { - if (version_compare(PHP_VERSION, '8.0.0', '>=') === true) { - throw new UnsupportedVersionException('The minimum required version for symfony/process is 4.2.0 to work with PHP 8'); - } - - /** - * @phpstan-ignore-next-line - * @psalm-suppress InvalidArgument - */ - return new Process($command); - } - return Process::fromShellCommandline($command); } diff --git a/src/Spryker/Zed/Propel/Communication/Console/BuildModelConsole.php b/src/Spryker/Zed/Propel/Communication/Console/BuildModelConsole.php index 0decb25..8732f0f 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/BuildModelConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/BuildModelConsole.php @@ -30,7 +30,7 @@ class BuildModelConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::COMMAND_DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/BuildSqlConsole.php b/src/Spryker/Zed/Propel/Communication/Console/BuildSqlConsole.php index a1cfd5e..88e78b0 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/BuildSqlConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/BuildSqlConsole.php @@ -30,7 +30,7 @@ class BuildSqlConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::COMMAND_DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/ConvertConfigConsole.php b/src/Spryker/Zed/Propel/Communication/Console/ConvertConfigConsole.php index c2cd3fe..9f576c8 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/ConvertConfigConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/ConvertConfigConsole.php @@ -27,7 +27,7 @@ class ConvertConfigConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription('Write Propel2 configuration'); diff --git a/src/Spryker/Zed/Propel/Communication/Console/CreateDatabaseConsole.php b/src/Spryker/Zed/Propel/Communication/Console/CreateDatabaseConsole.php index 49d1a79..c89e440 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/CreateDatabaseConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/CreateDatabaseConsole.php @@ -25,7 +25,7 @@ class CreateDatabaseConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription('Create database if it does not already exist'); diff --git a/src/Spryker/Zed/Propel/Communication/Console/DatabaseDropConsole.php b/src/Spryker/Zed/Propel/Communication/Console/DatabaseDropConsole.php index bbd474b..f3f14a0 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/DatabaseDropConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/DatabaseDropConsole.php @@ -25,7 +25,7 @@ class DatabaseDropConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription('Drop existing database.'); diff --git a/src/Spryker/Zed/Propel/Communication/Console/DatabaseDropTablesConsole.php b/src/Spryker/Zed/Propel/Communication/Console/DatabaseDropTablesConsole.php index 7056fb9..8493895 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/DatabaseDropTablesConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/DatabaseDropTablesConsole.php @@ -27,7 +27,7 @@ class DatabaseDropTablesConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription('Dropping all database tables, without dropping the database.'); diff --git a/src/Spryker/Zed/Propel/Communication/Console/DatabaseExportConsole.php b/src/Spryker/Zed/Propel/Communication/Console/DatabaseExportConsole.php index 16a3a8a..75c3db0 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/DatabaseExportConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/DatabaseExportConsole.php @@ -38,7 +38,7 @@ class DatabaseExportConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::COMMAND_DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/DatabaseImportConsole.php b/src/Spryker/Zed/Propel/Communication/Console/DatabaseImportConsole.php index 7e9c7b1..5a16a26 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/DatabaseImportConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/DatabaseImportConsole.php @@ -38,7 +38,7 @@ class DatabaseImportConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::COMMAND_DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/DeleteMigrationFilesConsole.php b/src/Spryker/Zed/Propel/Communication/Console/DeleteMigrationFilesConsole.php index d34c439..78e42bb 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/DeleteMigrationFilesConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/DeleteMigrationFilesConsole.php @@ -30,7 +30,7 @@ class DeleteMigrationFilesConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/DiffConsole.php b/src/Spryker/Zed/Propel/Communication/Console/DiffConsole.php index bd4b5b9..361d929 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/DiffConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/DiffConsole.php @@ -35,7 +35,7 @@ class DiffConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::COMMAND_DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/InsertSqlConsole.php b/src/Spryker/Zed/Propel/Communication/Console/InsertSqlConsole.php index 8192516..4ca51f3 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/InsertSqlConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/InsertSqlConsole.php @@ -30,7 +30,7 @@ class InsertSqlConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::COMMAND_DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/MigrateConsole.php b/src/Spryker/Zed/Propel/Communication/Console/MigrateConsole.php index d347a2b..0047cc4 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/MigrateConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/MigrateConsole.php @@ -46,7 +46,7 @@ class MigrateConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::COMMAND_DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/MigrationCheckConsole.php b/src/Spryker/Zed/Propel/Communication/Console/MigrationCheckConsole.php index bfd5294..52323a1 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/MigrationCheckConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/MigrationCheckConsole.php @@ -51,7 +51,7 @@ class MigrationCheckConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::COMMAND_DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/PostgresqlCompatibilityConsole.php b/src/Spryker/Zed/Propel/Communication/Console/PostgresqlCompatibilityConsole.php index 0a070e8..186a0c3 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/PostgresqlCompatibilityConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/PostgresqlCompatibilityConsole.php @@ -34,7 +34,7 @@ class PostgresqlCompatibilityConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->addOption(static::OPTION_CORE, 'c', InputOption::VALUE_NONE, 'Adjust core schema files too'); diff --git a/src/Spryker/Zed/Propel/Communication/Console/PropelInstallConsole.php b/src/Spryker/Zed/Propel/Communication/Console/PropelInstallConsole.php index 10991a3..aa85d3f 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/PropelInstallConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/PropelInstallConsole.php @@ -46,7 +46,7 @@ class PropelInstallConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription(static::DESCRIPTION); diff --git a/src/Spryker/Zed/Propel/Communication/Console/PropelSchemaValidatorConsole.php b/src/Spryker/Zed/Propel/Communication/Console/PropelSchemaValidatorConsole.php index 715d35b..14666ac 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/PropelSchemaValidatorConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/PropelSchemaValidatorConsole.php @@ -25,7 +25,7 @@ class PropelSchemaValidatorConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription('Validates the schema files.'); diff --git a/src/Spryker/Zed/Propel/Communication/Console/SchemaCopyConsole.php b/src/Spryker/Zed/Propel/Communication/Console/SchemaCopyConsole.php index 458f988..676e6a8 100644 --- a/src/Spryker/Zed/Propel/Communication/Console/SchemaCopyConsole.php +++ b/src/Spryker/Zed/Propel/Communication/Console/SchemaCopyConsole.php @@ -25,7 +25,7 @@ class SchemaCopyConsole extends Console /** * @return void */ - protected function configure() + protected function configure(): void { $this->setName(static::COMMAND_NAME); $this->setDescription('Copy schema files from packages to generated folder');