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

php-cs-fixer native_function_invocation rule #1606

Merged

Conversation

massimilianobraglia
Copy link
Contributor

Introduced php-cs-fixer native_function_invocation rule and applied linting

@p365labs
Copy link
Collaborator

@massimilianobraglia :

  • why introducing native_function_invocation right now?
  • is this process to be applied during linting? if so why no applying during a new release?

@ruflin
Copy link
Owner

ruflin commented Feb 11, 2019

This change would also need a CHANGELOG entry. Are there cases where this could break things (certain PHP versions?).

@massimilianobraglia
Copy link
Contributor Author

@p365labs:

  1. because we said in Use builtin functions from global namespace #1540 to open multiple PRs to introduce new CS rules
  2. yes, it is. Unfortunately I had no time to work on this at the moment the release was created

@ruflin ok about adding a changelog entry (I'll do it right now). The case this could break things is where someone in his codebase mocked the built-in functions I think

Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

LGTM.

For the mocking of the built in functions I assume that would be a testing use case? To make sure we don't break anything we probably best don't backport this to 6.x.

CHANGELOG.md Outdated
@@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file based on the
### Added

### Improvements
* Added `native_function_invocation` CS rule
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add the PR number / link to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! Sorry about that 😄

@massimilianobraglia
Copy link
Contributor Author

For the mocking of the built in functions I assume that would be a testing use case?

Yep, exactly

Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

LGTM. Let's see if @p365labs has concerns.

@p365labs
Copy link
Collaborator

@massimilianobraglia & @ruflin make sense to me.

  • So let's use this on linting
  • don't backport it to 6.x branch

@p365labs p365labs merged commit 9541a3b into ruflin:master Feb 18, 2019
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