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

Remove Generic.PHP.ForbiddenFunctions sniff #41

Merged
merged 1 commit into from Dec 22, 2013
Merged

Remove Generic.PHP.ForbiddenFunctions sniff #41

merged 1 commit into from Dec 22, 2013

Conversation

elkuku
Copy link
Contributor

@elkuku elkuku commented Dec 3, 2013

This removes the check for the deprecated functions delete() and sizeof().
Those checks are currently choking with namespaced classes with these names.

Like: https://github.com/joomla/jissues/blob/master/src/App/GitHub/Controller/Ajax/Labels/Delete.php#L19

Example Travis log: https://travis-ci.org/joomla/jissues/jobs/14662814

@mbabker
Copy link
Contributor

mbabker commented Dec 22, 2013

Is this still an issue with the current release of PHPCS? https://github.com/squizlabs/PHP_CodeSniffer/blob/master/package.xml#L2232-L2265 - It looks like this was fixed in the 1.5.1 release.

@elkuku
Copy link
Contributor Author

elkuku commented Dec 22, 2013

On our little project (where I discovered this) I get:

elkuku@kukubox640:~/repos/jissues$ phpcs -p --standard=build/phpcs/Joomla/ src/App/Text/Controller/
..E...


FILE: /home/elkuku/repos/jissues/src/App/Text/Controller/Article/Delete.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 20 | ERROR | The use of function delete() is forbidden; use unset() instead
--------------------------------------------------------------------------------

elkuku@kukubox640:~/repos/jissues$ phpcs --version
PHP_CodeSniffer version 1.5.1 (stable) by Squiz (http://www.squiz.net)

@mbabker
Copy link
Contributor

mbabker commented Dec 22, 2013

Well, that answers that then.

mbabker added a commit that referenced this pull request Dec 22, 2013
Remove Generic.PHP.ForbiddenFunctions sniff
@mbabker mbabker merged commit 820b8dc into joomla:master Dec 22, 2013
@elkuku elkuku deleted the forbidden-functions branch December 23, 2013 00:22
wilsonge pushed a commit to wilsonge/coding-standards that referenced this pull request Oct 1, 2018
Backport PR 10787 and PR 11221 from the CMS
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.

None yet

2 participants