Skip to content

Fix PHP 8.0 support#14539

Merged
danielkerr merged 4 commits intoopencart:masterfrom
AJenbo:php8.0
Mar 2, 2025
Merged

Fix PHP 8.0 support#14539
danielkerr merged 4 commits intoopencart:masterfrom
AJenbo:php8.0

Conversation

@AJenbo
Copy link
Copy Markdown
Contributor

@AJenbo AJenbo commented Feb 24, 2025

Looks to have been broken here: ee59c8a, because 8.1 was used to update the dependencies.

Also:

  • Fix code style
  • Update PHPStan
  • Run checks on PHP 8.4

If you send me a new invite I might fix some of the issues reported.

@TheCartpenter
Copy link
Copy Markdown
Contributor

TheCartpenter commented Feb 24, 2025

$data['stores'] and $price are intentionally repeated rather than using +=.

@AJenbo
Copy link
Copy Markdown
Contributor Author

AJenbo commented Feb 24, 2025

It does follow the same style, the same code style is applied everywhere by php-cs-fixer this isn't manual edits.

@TheCartpenter
Copy link
Copy Markdown
Contributor

It does follow the same style, the same code style is applied everywhere by php-cs-fixer this isn't manual edits.

I wasn't implying it was manual editing. You may have followed the changes with cs-fxer but what I mentioned above is that $data['stores'] and $price are intentionally repeated with the affected variable.

@AJenbo
Copy link
Copy Markdown
Contributor Author

AJenbo commented Feb 24, 2025

I was replying to the part you now deleted:

As for system/vendor.php file, the modifications suggests to use new blank lines between IF and foreach statements which doesn't follow the same direction as the core.

@TheCartpenter
Copy link
Copy Markdown
Contributor

I was replying to the part you now deleted:

As for system/vendor.php file, the modifications suggests to use new blank lines between IF and foreach statements which doesn't follow the same direction as the core.

Ok, no problem.

@AJenbo
Copy link
Copy Markdown
Contributor Author

AJenbo commented Feb 24, 2025

$data['stores'] and $price are intentionally repeated rather than using +=.

Where was/when this decided, why have it different then every where else?

@TheCartpenter
Copy link
Copy Markdown
Contributor

$data['stores'] and $price are intentionally repeated rather than using +=.

Where was/when this decided, why have it different then every where else?

I think this was decided before the re-integration of OCMod but I am not entirely sure if repetitive variables can be used as opposed to cs-fixer suggests, since. It was decided before, however, which is why I tend to keep that line clean from the change, until now.

@AJenbo
Copy link
Copy Markdown
Contributor Author

AJenbo commented Feb 24, 2025

It was added here: 975073a
It doesn't appear that there is any particular reason, just a human habit. Don't say that it's intentional if you don't actually know.

@TheCartpenter
Copy link
Copy Markdown
Contributor

It was added here: 975073a It doesn't appear that there is any particular reason, just a human habit. Don't say that it's intentional if you don't actually know.

Well, according to these changes, it looks pretty much to me those were intented changes.

@danielkerr danielkerr merged commit c879f02 into opencart:master Mar 2, 2025
0 of 5 checks passed
@AJenbo AJenbo deleted the php8.0 branch March 2, 2025 15:50
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