Skip to content

Fixes PSR4 auto-loading and code style issues #98

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

Conversation

junaidbinfarooq
Copy link

@junaidbinfarooq junaidbinfarooq commented Jul 2, 2021

  • Fixes PSR4 auto-loading issue in the test case for dumping graphql schema command
  • Fixes code styling in the same test class
  • Replaces a deprecated assertion with the recommended one

…ema command

+ Fixes code styling in the same test class
+ Replaces the deprecated assertion with the recommended one
+ Installs phpunit library
+ Fixes schema location path in phpunit xml
+ Adds a composer.lock file
+ Removes composer.lock file from .gitignore file
composer.json Outdated
@@ -41,7 +41,8 @@
"symfony/phpunit-bridge": "^5.3",
"thecodingmachine/phpstan-strict-rules": "^v0.12.1",
"composer/package-versions-deprecated": "^1.8",
"phpstan/phpstan-webmozart-assert": "^0.12.12"
"phpstan/phpstan-webmozart-assert": "^0.12.12",
"phpunit/phpunit": "^9.5"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this necessary? I removed it because we already have symfony phpunit bridge

Copy link
Author

Choose a reason for hiding this comment

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

Hmm yeah. I couldn't find any contributing guide and overlooked this.
Reverted it now. though I wonder what benefit is the said package of here?

.gitignore Outdated
@@ -1,5 +1,4 @@
/vendor/
/composer.lock
Copy link
Contributor

Choose a reason for hiding this comment

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

Why would we want a lock file? Generally library dependencies are not to be locked

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

Choose a reason for hiding this comment

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

Why? That looks like phpspec style, not what is generally used in phpunit

Copy link
Author

Choose a reason for hiding this comment

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

This is a recommended practice to name your tests to make them descriptive and indicative of what tests are doing.
I don't think this is something specific to phpspec.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, let's say it's a matter of taste. This project, along with the graphqlite package doesn't use this syntax, and I don't see any point in changing it, especially if you change only a single test method.

Copy link
Author

Choose a reason for hiding this comment

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

Ok reverted this too.

@junaidbinfarooq
Copy link
Author

Any possibility for this getting processed?

@junaidbinfarooq
Copy link
Author

Any possibility for this getting processed?

??
I think all the pr review comments are addressed and the pr is ready to be processed.

@enumag
Copy link

enumag commented Oct 18, 2021

Can this be merged?

@devmaslov
Copy link
Collaborator

Looks good, let's merge it!

@devmaslov devmaslov merged commit f0b6219 into thecodingmachine:master Oct 29, 2021
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.

4 participants