joomla / coding-standards

Joomla Coding Standards Definition
https://developer.joomla.org/coding-standards/basic-guidelines.html
GNU General Public License v2.0
128 stars 129 forks source link

Add deprecated classes and functions check #221

Closed Ruud68 closed 6 years ago

Ruud68 commented 6 years ago

My first PR for reporting deprecated classes and codes.

mbabker commented 6 years ago

We can't actually add these sniffs to this repo. This repo has the generic PHPCS ruleset for all Joomla projects, and these sniffs are specific to the CMS. The mailing list thread on this is why I opened https://github.com/joomla/joomla-cms/issues/19395 to get the CMS' extended ruleset moved to a separate repo, because ultimately that is where this needs to be merged.

Ruud68 commented 6 years ago

Okay, so it ends :) missed that RFC (https://github.com/joomla/joomla-cms/issues/19395). How do I keep track of when that RFC is accepted / implemented so I can do a PR there?

mbabker commented 6 years ago

Subscribe to notifications on that issue and you'll be set.

nibra commented 6 years ago

Wouldn't it make sense to have a collection of J! related sniffs in the Joomla/ directory and reference them as needed in separate rulesets like Joomla-Generic and Joomla-CMS? That would promote segregation of style definition and code base and allow to use those sniffs fx. in JED.

mbabker commented 6 years ago

Well, it depends how we want to manage things. Do we want application specific rulesets to live in this repository or should there be some form of inheritance/hierarchy for that (i.e. this coding-standards repo for the base ruleset and cms-coding-standards as an extension of this repo)? Personally, I'd treat it as two separate rulesets where one makes use of the other (same as we do now making use of sniffs defined in PEAR or Squiz standards).

nibra commented 6 years ago

Having separate rulesets does not require separate repositories, as far as I understand (I might be corrected, though). We obviously need separate sets (with a common base), and inheritance/hierarchy makes absolutely sense. But I don't see that we need separate repositories for that. Directories should be sufficient.