Intelipost - Version 1.0.0.1

Version Notes

. Corrections on the quoting
- Added delivery estimated time

Download this release

Release Info

Developer Intelipost
Extension Intelipost
Version 1.0.0.1
Comparing to
See all releases


Code changes from version 0.8.5 to 1.0.0.1

app/code/local/Intelipost/Shipping/Model/Carrier/Intelipost.php CHANGED
@@ -1,240 +1,241 @@
1
- <?php
2
-
3
- require_once Mage::getBaseDir('code') . '/local/Intelipost/Shipping/Model/Resource/Quote.php';
4
- require_once Mage::getBaseDir('code') . '/local/Intelipost/Shipping/Model/Resource/Volume.php';
5
-
6
- class Intelipost_Shipping_Model_Carrier_Intelipost
7
- extends Mage_Shipping_Model_Carrier_Abstract
8
- implements Mage_Shipping_Model_Carrier_Interface
9
- {
10
- protected $_code = 'intelipost';
11
- protected $_helper = null;
12
-
13
- private $_zipCodeRegex = '/[0-9]{2}\.?[0-9]{3}-?[0-9]{3}/';
14
-
15
- /**
16
- * @param Mage_Shipping_Model_Rate_Request $request
17
- * @return bool|false|Mage_Core_Model_Abstract|Mage_Shipping_Model_Rate_Result|null
18
- */
19
- public function collectRates(Mage_Shipping_Model_Rate_Request $request)
20
- {
21
- $this->_helper = Mage::helper('intelipost');
22
-
23
- if (!$this->getConfigFlag('active')) {
24
- Mage::log('Intelipost is inactive', null, 'intelipost.log', true);
25
- return false;
26
- }
27
-
28
- $originZipCode = $this->getConfigData('zipcode');
29
- $destinationZipCode = $request->getDestPostcode();
30
-
31
- if (!preg_match($this->_zipCodeRegex, $originZipCode) || !preg_match($this->_zipCodeRegex, $destinationZipCode)) {
32
- Mage::log('Invalid zip code ' . $originZipCode . ' or ' . $destinationZipCode, null, 'intelipost.log', true);
33
- return false;
34
- }
35
-
36
- // only numbers allowed
37
- $originZipCode = preg_replace('/[^0-9]/', '', $originZipCode);
38
- $destinationZipCode = preg_replace('/[^0-9]/', '', $destinationZipCode);
39
-
40
- $weight = $request->getPackageWeight();
41
-
42
- if ($weight <= 0) {
43
- $this->_throwError('weightzeroerror', 'Weight zero', __LINE__);
44
- }
45
-
46
- // weight must be in Kg
47
- if($this->getConfigData('weight_type') == 'gr') {
48
- $weight = number_format($weight/1000, 2, '.', '');
49
- } else {
50
- $weight = number_format($weight, 2, '.', '');
51
- }
52
-
53
- $price = $request->getPackageValue();
54
-
55
- $encryption = Mage::getSingleton('core/encryption');
56
- $api_key = $encryption->decrypt($this->getConfigData('apikey'));
57
- $api_url = $encryption->decrypt($this->getConfigData('apiurl'));
58
-
59
- if(!isset($api_key) || !is_string($api_key)) {
60
- Mage::log('Intelipost not configured', null, 'intelipost.log', true);
61
- return false;
62
- }
63
-
64
- $item_list = Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();
65
- $productsCount = count($item_list);
66
-
67
- $quote = new Intelipost_Model_Request_Quote();
68
- $quote->origin_zip_code = $originZipCode;
69
- $quote->destination_zip_code = $destinationZipCode;
70
-
71
- if (!$request->getAllItems()) {
72
- Mage::log('Cart is empty', null, 'intelipost.log, true');
73
- return false;
74
- }
75
-
76
- // if notification is disabled we send the request anyways (changed on version 0.0.2)
77
- $dimension_check = $this->getConfigData('notification');
78
-
79
- $i=0;
80
- foreach ($item_list as $item) {
81
- $product = $item->getProduct();
82
-
83
- $volume = new Intelipost_Model_Request_Volume();
84
- $volume->volume_type = 'BOX';
85
-
86
- if (!$this->isDimensionSet($product)) {
87
- Mage::log('Product does not have dimensions set', null, 'intelipost.log', true);
88
-
89
- if ($dimension_check) {
90
- $this->notifyProductsDimension($item_list);
91
- return false;
92
- }
93
- } else {
94
- $volume->width = $product->getVolumeLargura();
95
- $volume->height = $product->getVolumeAltura();
96
- $volume->length = $product->getVolumeComprimento();
97
- }
98
-
99
- $volume->weight = number_format(floatval($item->getWeight()), 2, ',', '') * $item->getQty();
100
- $volume->cost_of_goods = number_format(floatval($item->getPrice()), 2, ',', '') * $item->getQty();
101
-
102
- array_push($quote->volumes, $volume);
103
- }
104
-
105
- $request = json_encode($quote);
106
-
107
- // INTELIPOST QUOTE
108
- $response = $this->intelipostRequest($api_url, $api_key, "/quote", $request);
109
-
110
- $result = Mage::getModel('shipping/rate_result');
111
-
112
- foreach ($response->content->delivery_options as $deliveryOption) {
113
- $method = Mage::getModel('shipping/rate_result_method');
114
-
115
- $method->setCarrier ('intelipost');
116
- $method->setCarrierTitle('Intelipost');
117
- $method->setMethod ($deliveryOption->description);
118
- $method->setMethodTitle ($deliveryOption->description);
119
- $method->setPrice ($deliveryOption->final_shipping_cost);
120
- $method->setCost ($deliveryOption->provider_shipping_cost);
121
-
122
- $result->append($method);
123
- }
124
-
125
- return $result;
126
- }
127
-
128
- /**
129
- * @return array
130
- */
131
- public function getAllowedMethods()
132
- {
133
- return array($this->_code => $this->getConfigData('name'));
134
- }
135
-
136
- /**
137
- * @param $product
138
- * @return bool
139
- */
140
- private function isDimensionSet($product)
141
- {
142
- $volume_altura = $product->getData('volume_altura');
143
- $volume_largura = $product->getData('volume_largura');
144
- $volume_comprimento = $product->getData('volume_comprimento');
145
-
146
- if ($volume_comprimento == '' || (int)$volume_comprimento == 0
147
- || $volume_largura == '' || (int)$volume_largura == 0
148
- || $volume_altura == '' || (int)$volume_altura == 0
149
- ) {
150
- return false;
151
- }
152
-
153
- return true;
154
- }
155
-
156
- /**
157
- * @param $item_list
158
- */
159
- private function notifyProductsDimension($item_list)
160
- {
161
- $notification = Mage::getSingleton('adminnotification/inbox');
162
- $message = $this->_helper->__('The following products do not have dimension set:');
163
-
164
- $message .= '<ul>';
165
- foreach ($item_list as $item) {
166
- $product = $item->getProduct();
167
-
168
- if (!$this->isDimensionSet($product)) {
169
- $message .= '<li>';
170
- $message .= sprintf(
171
- '<a href="%s">',
172
- Mage::helper('adminhtml')->getUrl(
173
- 'adminhtml/catalog_product/edit',
174
- array( 'id' => $product->getId())
175
- )
176
- );
177
- $message .= $item->getName();
178
- $message .= '</a>';
179
- $message .= '</li>';
180
- }
181
- }
182
- $message .= '</ul>';
183
-
184
- $message .= $this->_helper->__('<small>Disable these notifications in System > Configuration > Shipping Methods > Intelipost</small>');
185
-
186
- $notification->add(
187
- Mage_AdminNotification_Model_Inbox::SEVERITY_MINOR,
188
- $this->_helper->__('Product missing dimensions'),
189
- $message
190
- );
191
- }
192
-
193
- /**
194
- * @param $days
195
- * @return string
196
- */
197
- private function formatDeadline($days)
198
- {
199
- if ($days == 0) {
200
- return $this->_helper->__('(same day)');
201
- }
202
-
203
- if ($days == 1) {
204
- return $this->_helper->__('(1 day)');
205
- }
206
-
207
- if ($days == 101) {
208
- return $this->_helper->__('(On acknowledgment)');
209
- }
210
-
211
- return sprintf($this->_helper->__('(%s days)'), $days);
212
- }
213
-
214
- /**
215
- * @param $api_url
216
- * @param $api_key
217
- * @param bool $body
218
- * @return mixed
219
- */
220
- private function intelipostRequest($api_url, $api_key, $entity_action, $request=false)
221
- {
222
- $s = curl_init();
223
-
224
- curl_setopt($s, CURLOPT_TIMEOUT, 5000);
225
- curl_setopt($s, CURLOPT_URL, $api_url.$entity_action);
226
- curl_setopt($s, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Accept: application/json", "api_key: $api_key"));
227
- curl_setopt($s, CURLOPT_POST, true);
228
- curl_setopt($s, CURLOPT_ENCODING , "");
229
- curl_setopt($s, CURLOPT_RETURNTRANSFER, 1);
230
- curl_setopt($s, CURLOPT_POSTFIELDS, $request);
231
-
232
- $response = curl_exec($s);
233
-
234
- curl_close($s);
235
-
236
- return $response;
237
- }
238
-
239
- }
240
-
 
1
+ <?php
2
+
3
+ require_once Mage::getBaseDir('code') . '/local/Intelipost/Shipping/Model/Resource/Quote.php';
4
+ require_once Mage::getBaseDir('code') . '/local/Intelipost/Shipping/Model/Resource/Volume.php';
5
+
6
+ class Intelipost_Shipping_Model_Carrier_Intelipost
7
+ extends Mage_Shipping_Model_Carrier_Abstract
8
+ implements Mage_Shipping_Model_Carrier_Interface
9
+ {
10
+ protected $_code = 'intelipost';
11
+ protected $_helper = null;
12
+
13
+ private $_zipCodeRegex = '/[0-9]{2}\.?[0-9]{3}-?[0-9]{3}/';
14
+
15
+ /**
16
+ * @param Mage_Shipping_Model_Rate_Request $request
17
+ * @return bool|false|Mage_Core_Model_Abstract|Mage_Shipping_Model_Rate_Result|null
18
+ */
19
+ public function collectRates(Mage_Shipping_Model_Rate_Request $request)
20
+ {
21
+ $this->_helper = Mage::helper('intelipost');
22
+
23
+ if (!$this->getConfigFlag('active')) {
24
+ Mage::log('Intelipost is inactive', null, 'intelipost.log', true);
25
+ return false;
26
+ }
27
+
28
+ $originZipCode = $this->getConfigData('zipcode');
29
+ $destinationZipCode = $request->getDestPostcode();
30
+
31
+ if (!preg_match($this->_zipCodeRegex, $originZipCode) || !preg_match($this->_zipCodeRegex, $destinationZipCode)) {
32
+ Mage::log('Invalid zip code ' . $originZipCode . ' or ' . $destinationZipCode, null, 'intelipost.log', true);
33
+ return false;
34
+ }
35
+
36
+ // only numbers allowed
37
+ $originZipCode = preg_replace('/[^0-9]/', '', $originZipCode);
38
+ $destinationZipCode = preg_replace('/[^0-9]/', '', $destinationZipCode);
39
+
40
+ $weight = $request->getPackageWeight();
41
+
42
+ if ($weight <= 0) {
43
+ $this->_throwError('weightzeroerror', 'Weight zero', __LINE__);
44
+ }
45
+
46
+ // weight must be in Kg
47
+ if($this->getConfigData('weight_type') == 'gr') {
48
+ $weight = number_format($weight/1000, 2, '.', '');
49
+ } else {
50
+ $weight = number_format($weight, 2, '.', '');
51
+ }
52
+
53
+ $price = $request->getPackageValue();
54
+
55
+ $encryption = Mage::getSingleton('core/encryption');
56
+ $api_key = $encryption->decrypt($this->getConfigData('apikey'));
57
+ $api_url = $encryption->decrypt($this->getConfigData('apiurl'));
58
+
59
+ if(!isset($api_key) || !is_string($api_key)) {
60
+ Mage::log('Intelipost not configured', null, 'intelipost.log', true);
61
+ return false;
62
+ }
63
+
64
+ $item_list = Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();
65
+ $productsCount = count($item_list);
66
+
67
+ $quote = new Intelipost_Model_Request_Quote();
68
+ $quote->origin_zip_code = $originZipCode;
69
+ $quote->destination_zip_code = $destinationZipCode;
70
+
71
+ if (!$request->getAllItems()) {
72
+ Mage::log('Cart is empty', null, 'intelipost.log, true');
73
+ return false;
74
+ }
75
+
76
+ // if notification is disabled we send the request anyways (changed on version 0.0.2)
77
+ $dimension_check = $this->getConfigData('notification');
78
+
79
+ $i=0;
80
+ foreach ($item_list as $item) {
81
+ $product = $item->getProduct();
82
+
83
+ $volume = new Intelipost_Model_Request_Volume();
84
+ $volume->volume_type = 'BOX';
85
+
86
+ if (!$this->isDimensionSet($product)) {
87
+ Mage::log('Product does not have dimensions set', null, 'intelipost.log', true);
88
+
89
+ if ($dimension_check) {
90
+ $this->notifyProductsDimension($item_list);
91
+ return false;
92
+ }
93
+ } else {
94
+ $volume->width = $product->getVolumeLargura();
95
+ $volume->height = $product->getVolumeAltura();
96
+ $volume->length = $product->getVolumeComprimento();
97
+ }
98
+
99
+ $volume->weight = number_format(floatval($item->getWeight()), 2, ',', '') * $item->getQty();
100
+ $volume->cost_of_goods = number_format(floatval($item->getPrice()), 2, ',', '') * $item->getQty();
101
+
102
+ array_push($quote->volumes, $volume);
103
+ }
104
+
105
+ $request = json_encode($quote);
106
+
107
+ // INTELIPOST QUOTE
108
+ $responseBody = $this->intelipostRequest($api_url, $api_key, "/quote", $request);
109
+ $response = json_decode($responseBody);
110
+ $result = Mage::getModel('shipping/rate_result');
111
+
112
+ foreach ($response->content->delivery_options as $deliveryOption) {
113
+ $method = Mage::getModel('shipping/rate_result_method');
114
+ $method_deadline = $this->formatDeadline((int)$deliveryOption->delivery_estimate_business_days);
115
+ $method_description = $deliveryOption->description." ".$method_deadline;
116
+ $method->setCarrier ('intelipost');
117
+ $method->setCarrierTitle('Intelipost');
118
+ $method->setMethod ($deliveryOption->description);
119
+ $method->setMethodTitle ($method_description);
120
+ $method->setPrice ($deliveryOption->final_shipping_cost);
121
+ $method->setCost ($deliveryOption->provider_shipping_cost);
122
+
123
+ $result->append($method);
124
+ }
125
+
126
+ return $result;
127
+ }
128
+
129
+ /**
130
+ * @return array
131
+ */
132
+ public function getAllowedMethods()
133
+ {
134
+ return array($this->_code => $this->getConfigData('name'));
135
+ }
136
+
137
+ /**
138
+ * @param $product
139
+ * @return bool
140
+ */
141
+ private function isDimensionSet($product)
142
+ {
143
+ $volume_altura = $product->getData('volume_altura');
144
+ $volume_largura = $product->getData('volume_largura');
145
+ $volume_comprimento = $product->getData('volume_comprimento');
146
+
147
+ if ($volume_comprimento == '' || (int)$volume_comprimento == 0
148
+ || $volume_largura == '' || (int)$volume_largura == 0
149
+ || $volume_altura == '' || (int)$volume_altura == 0
150
+ ) {
151
+ return false;
152
+ }
153
+
154
+ return true;
155
+ }
156
+
157
+ /**
158
+ * @param $item_list
159
+ */
160
+ private function notifyProductsDimension($item_list)
161
+ {
162
+ $notification = Mage::getSingleton('adminnotification/inbox');
163
+ $message = $this->_helper->__('The following products do not have dimension set:');
164
+
165
+ $message .= '<ul>';
166
+ foreach ($item_list as $item) {
167
+ $product = $item->getProduct();
168
+
169
+ if (!$this->isDimensionSet($product)) {
170
+ $message .= '<li>';
171
+ $message .= sprintf(
172
+ '<a href="%s">',
173
+ Mage::helper('adminhtml')->getUrl(
174
+ 'adminhtml/catalog_product/edit',
175
+ array( 'id' => $product->getId())
176
+ )
177
+ );
178
+ $message .= $item->getName();
179
+ $message .= '</a>';
180
+ $message .= '</li>';
181
+ }
182
+ }
183
+ $message .= '</ul>';
184
+
185
+ $message .= $this->_helper->__('<small>Disable these notifications in System > Configuration > Shipping Methods > Intelipost</small>');
186
+
187
+ $notification->add(
188
+ Mage_AdminNotification_Model_Inbox::SEVERITY_MINOR,
189
+ $this->_helper->__('Product missing dimensions'),
190
+ $message
191
+ );
192
+ }
193
+
194
+ /**
195
+ * @param $days
196
+ * @return string
197
+ */
198
+ private function formatDeadline($days)
199
+ {
200
+ if ($days == 0) {
201
+ return $this->_helper->__('(same day)');
202
+ }
203
+
204
+ if ($days == 1) {
205
+ return $this->_helper->__('(1 day)');
206
+ }
207
+
208
+ if ($days == 101) {
209
+ return $this->_helper->__('(On acknowledgment)');
210
+ }
211
+
212
+ return sprintf($this->_helper->__('(%s days)'), $days);
213
+ }
214
+
215
+ /**
216
+ * @param $api_url
217
+ * @param $api_key
218
+ * @param bool $body
219
+ * @return mixed
220
+ */
221
+ private function intelipostRequest($api_url, $api_key, $entity_action, $request=false)
222
+ {
223
+ $s = curl_init();
224
+
225
+ curl_setopt($s, CURLOPT_TIMEOUT, 5000);
226
+ curl_setopt($s, CURLOPT_URL, $api_url.$entity_action);
227
+ curl_setopt($s, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Accept: application/json", "api_key: $api_key"));
228
+ curl_setopt($s, CURLOPT_POST, true);
229
+ curl_setopt($s, CURLOPT_ENCODING , "");
230
+ curl_setopt($s, CURLOPT_RETURNTRANSFER, 1);
231
+ curl_setopt($s, CURLOPT_POSTFIELDS, $request);
232
+
233
+ $response = curl_exec($s);
234
+
235
+ curl_close($s);
236
+
237
+ return $response;
238
+ }
239
+
240
+ }
241
+
package.xml CHANGED
@@ -1,21 +1,19 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Intelipost</name>
4
- <version>0.8.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License Version 2 (GPLv2)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Intelipost</summary>
10
- <description>Extens&amp;amp;#xE3;o para utilizar o servi&amp;amp;#xE7;o de cota&amp;amp;#xE7;&amp;amp;#xE3;o do intelipost.com.br</description>
11
- <notes>. Updated shipment_order calls&#xD;
12
- . Added quote examples&#xD;
13
- . Check for api_url / api_key right combination&#xD;
14
- . Added intelipost.log</notes>
15
- <authors><author><name>Intelipost</name><user>Intelipost</user><email>it@intelipost.com.br</email></author></authors>
16
- <date>2014-05-02</date>
17
- <time>10:59:46</time>
18
- <contents><target name="magelocal"><dir name="Intelipost"><dir name="Shipping"><dir name="Helper"><file name="Data.php" hash="7523e254d75d8ec6413164bdfc9484ce"/></dir><dir name="Model"><dir name="Carrier"><file name="Category.php" hash="9e3f8a5013f819dc65c9b84848182c8a"/><file name="Intelipost.php" hash="ed8c41c207e0a228814f98afb6672311"/></dir><dir name="Config"><file name="Apikey.php" hash="0df659e8eb4cbcc4dbbe634f654b88d6"/><file name="Apiurl.php" hash="4517960e32a1f0a92a84ce96ff40c6dd"/><file name="Password.php" hash="a3b0f867850520e637ed6d1561047093"/></dir><dir name="Resource"><file name="EndCustomer.php" hash="a2109babc9b4fc994ccc8bbc3890efe5"/><file name="Invoice.php" hash="f1f792ed019964038769f4950f8c49e3"/><file name="Quote.php" hash="74f2826810d61c8d584ad02a8c12e82d"/><file name="Setup.php" hash="8f10c3277be3454dbf61abb1fb0b06f4"/><file name="ShipmentOrder.php" hash="83c0a94ecd8c9f913a89b3c81798f653"/><file name="Volume.php" hash="0fc8222182fde7557ac85166855a0c4d"/></dir></dir><dir name="etc"><file name="config.xml" hash="5e5cf688524df28ee306b11424804363"/><file name="system.xml" hash="5e58a7b34773cc5f3264c6fb2d2318be"/></dir><dir name="sql"><dir name="intelipost_setup"><file name="mysql4-install-0.0.1.php" hash="7cbddb7bad3e35cba43d14d8e2308900"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Intelipost_Shipping.xml" hash="285e60144ae15077910cb9200038adb9"/></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Intelipost_Shipping.csv" hash="ae1e673344d004666d04b254556685c5"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.3.0</min><max>5.5.0</max></php></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Intelipost</name>
4
+ <version>1.0.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License Version 2 (GPLv2)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Intelipost</summary>
10
+ <description>Extens&#xE3;o para utilizar o servi&#xE7;o de cota&#xE7;&#xE3;o da intelipost.com.br</description>
11
+ <notes>. Corrections on the quoting&#xD;
12
+ - Added delivery estimated time</notes>
13
+ <authors><author><name>Intelipost</name><user>intelipost</user><email>it@intelipost.com.br</email></author></authors>
14
+ <date>2014-06-18</date>
15
+ <time>20:49:16</time>
16
+ <contents><target name="magelocal"><dir name="Intelipost"><dir name="Shipping"><dir name="Helper"><file name="Data.php" hash="7523e254d75d8ec6413164bdfc9484ce"/></dir><dir name="Model"><dir name="Carrier"><file name="Category.php" hash="9e3f8a5013f819dc65c9b84848182c8a"/><file name="Intelipost.php" hash="e83b6d5c63a143915cdb4feccd09ebc8"/></dir><dir name="Config"><file name="Apikey.php" hash="0df659e8eb4cbcc4dbbe634f654b88d6"/><file name="Apiurl.php" hash="4517960e32a1f0a92a84ce96ff40c6dd"/><file name="Password.php" hash="a3b0f867850520e637ed6d1561047093"/></dir><dir name="Resource"><file name="EndCustomer.php" hash="a2109babc9b4fc994ccc8bbc3890efe5"/><file name="Invoice.php" hash="f1f792ed019964038769f4950f8c49e3"/><file name="Quote.php" hash="74f2826810d61c8d584ad02a8c12e82d"/><file name="Setup.php" hash="8f10c3277be3454dbf61abb1fb0b06f4"/><file name="ShipmentOrder.php" hash="83c0a94ecd8c9f913a89b3c81798f653"/><file name="Volume.php" hash="0fc8222182fde7557ac85166855a0c4d"/></dir></dir><dir name="etc"><file name="config.xml" hash="5e5cf688524df28ee306b11424804363"/><file name="system.xml" hash="5e58a7b34773cc5f3264c6fb2d2318be"/></dir><dir name="sql"><dir name="intelipost_setup"><file name="mysql4-install-0.0.1.php" hash="7cbddb7bad3e35cba43d14d8e2308900"/></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="pt_BR"><file name="Intelipost_Shipping.csv" hash="ae1e673344d004666d04b254556685c5"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Intelipost_Shipping.xml" hash="285e60144ae15077910cb9200038adb9"/></dir></target></contents>
 
 
17
  <compatible/>
18
  <dependencies><required><php><min>5.3.0</min><max>5.5.0</max></php></required></dependencies>
19
  </package>