Skip to content

Commit b0c2a01

Browse files
committed
Merge pull request #5 from loadsys/cake-3.x
Support CakePHP 3.0
2 parents 16f2b81 + 1a46708 commit b0c2a01

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,36 @@
22

33
A CakePHP plugin that provides a Shell to read an app's Configure vars from the command line.
44

5-
* For the Cake 2.x version of this plugin, please use the repo's `master` branch.
6-
* For the Cake 1.3 version, use the `1.3` branch. (Note: we don't expect to actively maintain the 1.3 version. It's here because it started life as a 1.3 Shell.)
5+
6+
* This is the Cake 3.x version of the plugin, which exists on the `master` branch and is tracked by the `3.*` semver.
7+
* For the Cake 2.x version of this plugin, please use the repo's `cake-2.x` branch. (semver `2.*`)
8+
* For the Cake 1.3 version, use the `cake-1.3` branch. (semver `1.*`) **Note:** we don't expect to actively maintain the 1.3 version. It's here because the project started life as a 1.3 Shell.
79

810

911
## Requirements
1012

11-
* CakePHP 2.5.0+
13+
* CakePHP 3.0.0+
1214
* PHP 5.4.19+
1315

1416

1517
## Installation
1618

17-
`composer require loadsys/config-read:2.*`
18-
19-
or
19+
`composer require loadsys/config-read:~3.0`
2020

21-
`git submodule add https://github.com/loadsys/CakePHP-ConfigReadShell.git Plugin/ConfigRead`
2221

2322

2423
## Usage
2524

2625
```shell
2726
$ cd path/to/app/
28-
$ ./lib/Console/cake config_read.config_read Key.Name
27+
$ ./bin/cake ConfigRead Key.Name
2928
'foo'
3029
```
3130

3231
### Format as a bash variable definition
3332

3433
```shell
35-
$ ./lib/Console/cake config_read.config_read Key.Name Second.Key
34+
$ ./bin/cake ConfigRead Key.Name Second.Key
3635
KEY_NAME='foo'
3736
SECOND_KEY_FIRST='bar'
3837
SECOND_KEY_SECOND='baz'
@@ -42,7 +41,7 @@ SECOND_KEY_THIRD='42'
4241
Note that this format is automatically used whenever more than one key is returned. For example, if you request a key that contains an array, all values in the array will be returned sequentially. Alternatively, if you pass multiple keys on the command line, they will be returned. The format can also be forced using the `-b` or `--bash` command line switch:
4342

4443
```shell
45-
$ ./lib/Console/cake config_read.config_read -b Key.Name
44+
$ ./bin/cake ConfigRead -b Key.Name
4645
KEY_NAME='foo'
4746
```
4847

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
*
55
* @package App.Console.Command
66
*/
7+
namespace ConfigRead\Shell;
8+
9+
use Cake\Console\Shell;
10+
use Cake\Core\Configure;
711

8-
App::uses('Shell', 'Console');
912

1013
/**
1114
* ConfigReadShell class.
File renamed without changes.

0 commit comments

Comments
 (0)