Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Symfony 7 #518

Merged
merged 14 commits into from
Jan 27, 2025
Merged

Upgrade to Symfony 7 #518

merged 14 commits into from
Jan 27, 2025

Conversation

samwilson
Copy link
Member

@samwilson samwilson commented Jan 18, 2025

Upgrade to Symfony 7 and update (almost) all PHP dependencies, making as few changes as possible.

Bug: T384115

@samwilson samwilson marked this pull request as draft January 18, 2025 10:28
@samwilson
Copy link
Member Author

Another fix is needed to the ToolforgeBundle before this can be morged: wikimedia/ToolforgeBundle#71

@samwilson samwilson marked this pull request as ready for review January 21, 2025 02:42
@samwilson
Copy link
Member Author

Okay, this is ready for review now, if anyone's got time.

@@ -24,12 +24,13 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
php: [ '7.3', '7.4', '8.0', '8.1', '8.2' ]
# Test against the lowest and highest PHP versions that we support.
php: [ '8.2', '8.3' ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess PHP 8.4 is broken?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it kept failing (and fixing it would make it fail for 8.2), and as we're not going to be deploying to PHP 8.4 any time soon I figured it could wait.

@@ -13,7 +14,7 @@ class UnixSemaphore implements Semaphore {
private $semaphoreKey;
/** @var int */
private $capacity;
/** @var resource|null the lazily initialized semaphore descriptor */
/** @var resource|SysvSemaphore|null the lazily initialized semaphore descriptor */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

genuine question: do we still need resource now that we have SysvSemaphore?

(same in other places)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, no it seems not. Removed!

*/
public function testAddAndRetrieve() {
// Make sure it's empty to start with.
static::assertEmpty(
static::assertSame(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for me: Is there a difference between static::assertSame and $this->assertSame? I would guess they are the same function and we should harmonize on something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. The docs say that there's no right way, and as we've got more $this-> than static I'll stick to that! And also use assertSame over assertEquals unless we want loose checking (which it doesn't look like we do anywhere).

@samwilson samwilson merged commit ff7f12c into main Jan 27, 2025
2 checks passed
@samwilson samwilson deleted the symfony7 branch January 27, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants