Skip to content

Commit

Permalink
FRW-998 Switched PHP version from 8.0 to 8.1 by default, enabled supp…
Browse files Browse the repository at this point in the history
…ort of PHP 8.2. (#10577)

FRW-998 Dropped PHP 8.0 and added PHP 8.2 support.
  • Loading branch information
asmarovydlo authored Nov 2, 2023
1 parent b04cc08 commit 7fad9a1
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 7fad9a1

Please sign in to comment.