Skip to content

Improve compatibility with PHP8.1#3293

Closed
Vicgzj wants to merge 1 commit into
slimphp:3.xfrom
Vicgzj:improve-php8.1-compatibility
Closed

Improve compatibility with PHP8.1#3293
Vicgzj wants to merge 1 commit into
slimphp:3.xfrom
Vicgzj:improve-php8.1-compatibility

Conversation

@Vicgzj
Copy link
Copy Markdown

@Vicgzj Vicgzj commented Oct 23, 2023

We are facing some compatibility issues with PHP 8.1 regarding the Collection Class and the returns types. Right now we cannot upgrade to version 4.x, but this will fix the current situation with 3.x version. Thanks!

@odan
Copy link
Copy Markdown
Contributor

odan commented Oct 23, 2023

I guess this change is not compatible with PHP 5.5 (and PHP 5.6) as defined in composer.json within the 3.x branch.

// Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/coZnH on line 170
public function offsetExists($key): bool

The minimum version would then require PHP >=7.0 for the v3 branch to work.

@Vicgzj
Copy link
Copy Markdown
Author

Vicgzj commented Oct 24, 2023

I guess this change is not compatible with PHP 5.5 (and PHP 5.6) as defined in composer.json within the 3.x branch.

// Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/coZnH on line 170
public function offsetExists($key): bool

The minimum version would then require PHP >=7.0 for the v3 branch to work.

We are trying to solve the deprecated errors from our code when we use Slim 3.x on PHP>=7.0. We were checking and we saw another PR that was rejected with the solution that we also propose in this PR. #3186
Can you please consider the last comment in that PR from my co-worker Patrick? Thanks

@odan
Copy link
Copy Markdown
Contributor

odan commented Oct 24, 2023

I've read this post. But as far as I know the Slim 3.x branch is only for essential security updates, but not for new features such as PHP 8 support. To get PHP 8 support, you need to upgrade to Slim 4.

@Vicgzj
Copy link
Copy Markdown
Author

Vicgzj commented Oct 24, 2023

I've read this post. But as far as I know the Slim 3.x branch is only for essential security updates, but not for new features such as PHP 8 support. To get PHP 8 support, you need to upgrade to Slim 4.

It's not possible for us right now to upgrade to PHP 8.1. We already have PHP 8.0.

@l0gicgate
Copy link
Copy Markdown
Member

As @odan mentioned, Slim 3.x will not get PHP 8.x support.

Closing this as resolved

@l0gicgate l0gicgate closed this Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants