Skip to content

Replace PHPSpec with PHPUnit #21

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

Merged
merged 1 commit into from
Jan 14, 2022
Merged

Replace PHPSpec with PHPUnit #21

merged 1 commit into from
Jan 14, 2022

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Jan 14, 2022

PHPSpec blocks the upgrade to Symfony 6. Replacing it with the industry standard PHPUnit.
This makes it way easier for contributors to work on the code.

Also dropped Scrutinizer.

See #17

@ruudk ruudk force-pushed the replace-phpspec branch 2 times, most recently from c703d19 to 850833a Compare January 14, 2022 10:19
PHPSpec blocks the upgrade to Symfony 6. Replacing it with the industry standard PHPUnit.
This makes it way easier for contributors to work on the code.
@ruudk ruudk mentioned this pull request Jan 14, 2022
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

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

thanks, looks good! one suggestion about the test method names.

i wonder why the build shows a scrutinizer build when you are deleting that in the PR 🤔 but we can merge and then see if it goes away.

/**
* @test
*/
public function it_records_event(): void
Copy link
Contributor

Choose a reason for hiding this comment

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

the phpunit convention is to have methods start with test and then we would not need the annotation.

i don't know how much people use this form or the other form (but all things i work on have the testXY form). wdyt of renaming this to testRecordEvent, and the other testRecordError ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

both are fine.. in our code base we only use it_should_be.... together with @test
I decided to keep the original names from phpspec... given there are just 2, does it really matter? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

no, does not really matter. just noticed and wanted to discuss it. fine for me.

@ruudk
Copy link
Contributor Author

ruudk commented Jan 14, 2022

the scrutinizer build failure is because of required branch checks. Can be removed after merging the pr.

edit: seems like it's not required... would be nice to setup requirements btw.

@dbu dbu merged commit cec043a into php-http:master Jan 14, 2022
@dbu
Copy link
Contributor

dbu commented Jan 14, 2022

thanks @ruudk !

@Nyholm
Copy link
Member

Nyholm commented Jan 15, 2022

Thank you both!

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