Skip to content

Commit ecd7f84

Browse files
committed
Some updates in composer.json in order to respect semantic versioning
| Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR |
1 parent 0d64248 commit ecd7f84

2 files changed

Lines changed: 41 additions & 40 deletions

File tree

README.markdown

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ the following lines to your composer.json:
2727

2828
{
2929
"require": {
30-
"vmwarephp/vmwarephp": "dev-master"
30+
"vmwarephp/vmwarephp": "~0.1@dev"
3131
}
3232
}
33-
33+
3434
**Using Git / GitHub**
3535

3636
You can clone the latest development branch from its github repository:
@@ -41,10 +41,10 @@ Usage
4141
--------
4242

4343
Vmwarephp aims to provide the least boilerplate code possibile for handling vSphere objects. The ESX/vCenter on which
44-
the operations are performed is represented by a \Vmwarephp\Vhost object. A Vhost object provides two finder methods to
44+
the operations are performed is represented by a \Vmwarephp\Vhost object. A Vhost object provides two finder methods to
4545
obtain server side ManagedObjects. The following example describes a way to collect all virtual machines from a ESX/vCenter
4646
with their config status prefetched:
47-
47+
4848
$vhost = new \Vmwarephp\Vhost('vcenter:443', 'Admin', 'password');
4949
$virtualMachines = $vhost->findAllManagedObjects('VirtualMachine', array('configStatus'));
5050

@@ -63,39 +63,33 @@ A managed object can also be found by name:
6363

6464
$vhost = new \Vmwarephp\Vhost('vcenter:443', 'Admin', 'password');
6565
$datastore = $vhost->findManagedObjectByName('VirtualMachine', 'myvmname', array('configStatus'));
66-
66+
6767
Managed objects can be a generic managed object represented by \Vmwarephp\ManagedObject or a user defined extension of a
6868
managed object defined in Extensions directory. Each managed object depending on its managed object reference type ('VirtualMachine',
69-
'Datastore', etc.) can execute any of methods defined by the vSphere api on that reference type. For example taking a
69+
'Datastore', etc.) can execute any of methods defined by the vSphere api on that reference type. For example taking a
7070
virtual machine snapshot can be as easy as:
7171

7272
$vhost = new \Vmwarephp\Vhost('vcenter:443', 'Admin', 'password');
7373
$virtualMachine = $vhost->findOneManagedObject('VirtualMachine', 'vm-192', array());
7474
$snapshotTask = $virtualMachine->CreateSnapshot_Task(array('name' => 'snapshot_name', 'memory' => false, 'quiesce' => false));
75-
75+
7676
or considering that the VirtualMachine managed object type has a built in extension already:
7777

7878
$snapshotTask = $virtualMachine->takeSnapshot(array('name' => 'snapshot_name', 'memory' => false, 'quiesce' => false));
79-
80-
All managed object properties are defined as object accessors. You can pre-fetch all accessors when looking for the object or
79+
80+
All managed object properties are defined as object accessors. You can pre-fetch all accessors when looking for the object or
8181
you can query an object property on the fly (note that we are not pre-fetching the configStatus property):
8282

8383
$virtualMachine = $vhost->findOneManagedObject('VirtualMachine', 'vm-192', array());
8484
$configStatus = $virtualMachine->configStatus;
85-
85+
8686
Or prefetching the configStatus:
87-
87+
8888
$virtualMachine = $vhost->findOneManagedObject('VirtualMachine', 'vm-192', array('configStatus'));
89-
89+
9090
As you can see working with managed objects is extremely easy. Each method supported by a managed object on the server side
9191
is mapped to a method on \Vmwarephp\ManagedObject or an extension. Properties are exposed as simple accessor methods. All data
9292
object properties are also mapped to their respective types. A full list of defined types can be found in TypeDefinitions.inc file.
9393

94-
You can write your own extensions by extending the \Vmwarephp\ManagedObject and adding it to Extensions directory.
94+
You can write your own extensions by extending the \Vmwarephp\ManagedObject and adding it to Extensions directory.
9595
If you consider the extensions is really useful we can easily integrate it in the main branch. Enjoy!
96-
97-
98-
99-
100-
101-

composer.json

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
{
2-
"name":"vmwarephp/vmwarephp",
3-
"type":"library",
4-
"description":"Vmware vSphere bindings for PHP",
5-
"keywords":["vmware", "php", "vsphere", "bindings", "vsphere sdk", "vmware php"],
6-
"homepage":"https://github.com/vadimcomanescu/vmwarephp",
7-
"license":"BSD-3-Clause",
8-
"authors":[
9-
{
10-
"name":"Vadim Comanescu",
11-
"email":"vadim984@gmail.com",
12-
"homepage":"http://vadimcomanescu.wordpress.com"
13-
}
14-
],
15-
"require":{
16-
"php":">=5.3.2"
17-
},
18-
"require-dev":{
19-
"mockery/mockery":"dev-master"
20-
},
21-
"autoload": {
22-
"psr-0": { "Vmwarephp": "library" }
2+
"name": "vmwarephp/vmwarephp",
3+
"type": "library",
4+
"description": "Vmware vSphere bindings for PHP",
5+
"keywords": ["vmware", "php", "vsphere", "bindings", "vsphere sdk", "vmware php"],
6+
"homepage": "https://github.com/vadimcomanescu/vmwarephp",
7+
"license": "BSD-3-Clause",
8+
"authors": [
9+
{
10+
"name": "Vadim Comanescu",
11+
"email": "vadim984@gmail.com",
12+
"homepage": "http://vadimcomanescu.wordpress.com"
2313
}
14+
],
15+
"require": {
16+
"php": ">=5.3.2"
17+
},
18+
"require-dev": {
19+
"mockery/mockery": "~1.0@dev"
20+
},
21+
"autoload": {
22+
"psr-0": {
23+
"Vmwarephp": "library"
24+
}
25+
},
26+
"extra": {
27+
"branch-alias": {
28+
"dev-master": "0.1-dev"
29+
}
30+
}
2431
}

0 commit comments

Comments
 (0)