You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
With that done, the following diff should be applied to the composer.json file:
diff --git a/composer.json b/composer.json
index eda994c..095cf8a 100644
--- a/composer.json+++ b/composer.json@@ -17,14 +17,14 @@
}
},
"require": {
- "php": ">=5.3.10",- "joomla/coding-standards": "~2.0 || ~3.0"+ "php": "^5.3.10|^7.0",+ "joomla/coding-standards": "^2.0|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.7"
},
"suggest" : {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
},
"support" : {
"issues": "https://github.com/joomla/cms-coding-standards/issues",
@@ -32,7 +32,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.x-dev"+ "dev-1.x": "1.x-dev"
}
},
"scripts": {
(Explicitly lists supported PHP branches instead of allowing all versions arbitrarily, changes branch alias for 1.x versions)
Tweak the README to explain the branching
This diff will suffice (someone with admin will need to copy the diff from the "edit issue" input because the GitHub parser is breaking at the first set of closing backticks, or just manually apply all changes):
diff --git a/README.md b/README.md
index 5eb1a1f..95a766a 100644
--- a/README.md+++ b/README.md@@ -1,17 +1,19 @@-# cms-coding-standards+# Joomla! CMS Coding Standards
Extended Joomla Coding Standards definition for use in the Joomla CMS environment
This repository includes the [Joomla](https://developer.joomla.org) CMS coding standard definition for [PHP Codesniffer](https://github.com/squizlabs/PHP_CodeSniffer). The PHP_CodeSniffer standard will never be 100% accurate, but should be viewed as a strong set of guidelines while writing software for Joomla.
See Joomla coding standards documentation at [https://developer.joomla.org/coding-standards.html](https://developer.joomla.org/coding-standards.html)
-If you want to contribute and improve this documentation, you can find the source files in the manual section of the master branch [https://github.com/joomla/coding-standards/tree/master/manual](https://github.com/joomla/coding-standards/tree/master/manual)+If you want to contribute and improve this documentation, you can find the source files in the `manual` directory of the `master` branch of the main [Coding Standards](https://github.com/joomla/coding-standards) repository.
## Requirements
* PHP 5.3+
* [PHP Codesniffer](https://github.com/squizlabs/PHP_CodeSniffer) 2.9+
+
or
+
* PHP 5.6+
* [PHP Codesniffer](https://github.com/squizlabs/PHP_CodeSniffer) 3.3.0+
@@ -22,27 +24,38 @@ Add `"joomla/cms-coding-standards": "~1.0"` to the require-dev block in your com
```json
{
"require-dev": {
- "joomla/cms-coding-standards": "~1.0"- }+ "joomla/cms-coding-standards": "~1.0"+ }
}
-Alternatively, you can simply run the following from the command line:
+Alternatively, you can run the following from the command line:
composer global require squizlabs/php_codesniffer "~2.8"
composer require joomla/cms-coding-standards "~1.0"
+## Branching Strategy
+
+This repository presently contains two branches:
+
+* 1.x - Compatible with the Joomla! Coding Standards 2.x or 3.x, Joomla! 3.x, and PHP_CodeSniffer 2.x or 3.x
+* master (2.x) - Compatible with the Joomla! Coding Standards 2.x or 3.x, Joomla! 4.x, and PHP_CodeSniffer 2.x or 3.x
+
Running
-You can use the installed Joomla standard like:
+You can use the installed Joomla-CS standard like:
(Has a couple of minor formatting tweaks, main point is the "Branching Strategy" section added)
- [ ] Merge changes from new `1.x` branch forward to `master` then `4.0-dev`
```sh
git checkout master
git merge 1.x
git checkout 4.0-dev
git merge master
(Self-explanatory I hope on why to do this)
Merge the 4.0-dev branch into master and delete the 4.0-dev branch
Once complete, this will establish the 1.x branch as the 1.x version of the CMS coding standards (extending the main coding standards repo) as being compatible with the CMS' 3.x releases, and will establish the master branch as the 2.x version of the CMS coding standards (extending the main coding standards repo) as being compatible with the CMS' 4.x releases.
The text was updated successfully, but these errors were encountered:
The branching of this repository should be fixed.
1.x
branch from what is presently masterWith that done, the following diff should be applied to the
composer.json
file:(Explicitly lists supported PHP branches instead of allowing all versions arbitrarily, changes branch alias for 1.x versions)
This diff will suffice (someone with admin will need to copy the diff from the "edit issue" input because the GitHub parser is breaking at the first set of closing backticks, or just manually apply all changes):
-Alternatively, you can simply run the following from the command line:
+Alternatively, you can run the following from the command line:
+## Branching Strategy
+
+This repository presently contains two branches:
+
+*
1.x
- Compatible with the Joomla! Coding Standards 2.x or 3.x, Joomla! 3.x, and PHP_CodeSniffer 2.x or 3.x+*
master
(2.x) - Compatible with the Joomla! Coding Standards 2.x or 3.x, Joomla! 4.x, and PHP_CodeSniffer 2.x or 3.x+
Running
-You can use the installed Joomla standard like:
+You can use the installed Joomla-CS standard like:
+
sh +phpcs --standard=Joomla-CMS path/to/code +
Alternatively if it isn't installed you can still reference it by path like:
+
sh +phpcs --standard=path/to/joomla/cms-coding-standards path/to/code +
Selectively Applying Rules
(Self-explanatory I hope on why to do this)
4.0-dev
branch intomaster
and delete the4.0-dev
branch(This makes this repo's 2.x version the
master
branch)master
branch to be 2.xOnce complete, this will establish the
1.x
branch as the 1.x version of the CMS coding standards (extending the main coding standards repo) as being compatible with the CMS' 3.x releases, and will establish themaster
branch as the 2.x version of the CMS coding standards (extending the main coding standards repo) as being compatible with the CMS' 4.x releases.The text was updated successfully, but these errors were encountered: