Skip to content

Commit

Permalink
bumping some package dependencies to fix some php 7.4 issues (#29)
Browse files Browse the repository at this point in the history
* bumping some package dependencies to fix some php 7.4 issues

* fixing some local php 7.4 issues

* more local fixes and a few package update tests

* stripping hash off front of color value for hexdec

* more package tests

* more external package updates

* local fixes, external package fix

* another rackspace fix

* testing more updates

* moving another dep to dev-master

* testing php 7.4 with dev-master packages

* fixing some deps

* Some composer updates for php 7.4 tests to pass

* Location of file changed

* final composer.json change for php 7.4

* maybe the real last composer update?

* upgrading phpstan, setting to level 8 with a generated baseline file

* having travis run same phpstan command
  • Loading branch information
jaydiablo authored Feb 5, 2020
1 parent a1d0476 commit 7614377
Show file tree
Hide file tree
Showing 23 changed files with 25,470 additions and 301 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ bin/phpunit
bin/phpcov
bin/php-parse
bin/phpstan
bin/phpstan.phar
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ script:
jobs:
fast_finish: true
allow_failures:
- php: 7.4snapshot
- php: nightly
include:
- php: 7.1
Expand All @@ -63,10 +62,9 @@ jobs:
- php: 7.3
env: COMPOSER_ARGS="--prefer-lowest"
- php: 7.3
- php: 7.4snapshot
env: COMPOSER_ARGS="--ignore-platform-reqs --prefer-lowest"
- php: 7.4snapshot
env: COMPOSER_ARGS="--ignore-platform-reqs"
- php: 7.4
env: COMPOSER_ARGS="--prefer-lowest"
- php: 7.4
- php: nightly
env: COMPOSER_ARGS="--ignore-platform-reqs --prefer-lowest"
- php: nightly
Expand All @@ -76,7 +74,7 @@ jobs:
php: 7.2
env: TMPDIR=/tmp USE_XDEBUG=false
script:
- ./bin/phpstan analyse -l 4 --autoload-file=vendor/autoload.php --memory-limit=1024M -c phpstan.neon ./library
- composer phpstan

- stage: test with coverage
php: 7.2
Expand Down
59 changes: 25 additions & 34 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,83 +8,82 @@
],
"homepage": "http://framework.zend.com/",
"license": "BSD-3-Clause",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"diablomedia/zendframework1-acl": "^1.0.0",
"diablomedia/zendframework1-application": "^1.0.0",
"diablomedia/zendframework1-auth": "^1.0.0",
"diablomedia/zendframework1-auth": "^1.0.2",
"diablomedia/zendframework1-auth-adapter-dbtable": "^1.0.0",
"diablomedia/zendframework1-auth-adapter-http": "^1.0.0",
"diablomedia/zendframework1-auth-adapter-ldap": "^1.0.0",
"diablomedia/zendframework1-auth-adapter-openid": "^1.0.0",
"diablomedia/zendframework1-cache": "^1.0.0",
"diablomedia/zendframework1-captcha": "^1.0.0",
"diablomedia/zendframework1-config": "^1.0.1",
"diablomedia/zendframework1-controller": "^1.0.0",
"diablomedia/zendframework1-config": "^1.0.2 || ^2.0.0",
"diablomedia/zendframework1-controller": "^1.0.3",
"diablomedia/zendframework1-controller-action-helper-ajaxcontext": "^1.0.0",
"diablomedia/zendframework1-controller-action-helper-autocomplete": "^1.0.0",
"diablomedia/zendframework1-controller-action-helper-contextswitch": "^1.0.0",
"diablomedia/zendframework1-controller-action-helper-contextswitch": "^1.0.3",
"diablomedia/zendframework1-controller-action-helper-json": "^1.0.0",
"diablomedia/zendframework1-crypt": "^1.0.0",
"diablomedia/zendframework1-crypt": "^1.0.3",
"diablomedia/zendframework1-currency": "^1.0.0",
"diablomedia/zendframework1-date": "^1.0.0",
"diablomedia/zendframework1-db": "^1.0.1",
"diablomedia/zendframework1-db": "^1.0.3",
"diablomedia/zendframework1-dojo": "^1.0.0",
"diablomedia/zendframework1-dom": "^1.0.0",
"diablomedia/zendframework1-eventmanager": "^1.0.0",
"diablomedia/zendframework1-exception": "^1.0.2",
"diablomedia/zendframework1-exception": "^1.0.4",
"diablomedia/zendframework1-file": "^1.0.0",
"diablomedia/zendframework1-filter": "^1.0.0",
"diablomedia/zendframework1-filter": "^1.0.3",
"diablomedia/zendframework1-filter-input": "^1.0.0",
"diablomedia/zendframework1-form": "^1.0.3",
"diablomedia/zendframework1-http": "^1.0.1",
"diablomedia/zendframework1-json": "^1.0.0",
"diablomedia/zendframework1-layout": "^1.0.0",
"diablomedia/zendframework1-ldap": "^1.0.1",
"diablomedia/zendframework1-loader": "^1.0.1",
"diablomedia/zendframework1-locale": "^1.0.0",
"diablomedia/zendframework1-json": "^1.0.3",
"diablomedia/zendframework1-layout": "^1.0.3",
"diablomedia/zendframework1-ldap": "^1.0.3",
"diablomedia/zendframework1-loader": "^1.0.3",
"diablomedia/zendframework1-locale": "^1.0.3",
"diablomedia/zendframework1-log": "^1.0.0",
"diablomedia/zendframework1-log-writer-db": "^1.0.0",
"diablomedia/zendframework1-log-writer-firebug": "^1.0.0",
"diablomedia/zendframework1-log-writer-mail": "^1.0.0",
"diablomedia/zendframework1-mail": "^1.0.1",
"diablomedia/zendframework1-mail": "^1.0.3",
"diablomedia/zendframework1-mime": "^1.0.0",
"diablomedia/zendframework1-navigation": "^1.0.0",
"diablomedia/zendframework1-oauth": "^1.0.0",
"diablomedia/zendframework1-openid": "^1.0.0",
"diablomedia/zendframework1-paginator": "^1.0.0",
"diablomedia/zendframework1-progressbar": "^1.0.0",
"diablomedia/zendframework1-registry": "^1.0.0",
"diablomedia/zendframework1-registry": "^1.0.2",
"diablomedia/zendframework1-rest": "^1.0.0",
"diablomedia/zendframework1-server": "^1.0.0",
"diablomedia/zendframework1-server": "^1.0.3",
"diablomedia/zendframework1-service": "^1.0.0",
"diablomedia/zendframework1-service-amazon": "^1.0.0",
"diablomedia/zendframework1-service-recaptcha": "^1.0.0",
"diablomedia/zendframework1-session": "^1.0.2",
"diablomedia/zendframework1-session-savehandler-dbtable": "^1.0.0",
"diablomedia/zendframework1-soap": "^1.0.0",
"diablomedia/zendframework1-stdlib": "^1.0.0",
"diablomedia/zendframework1-test": "^1.0.2|^2.0.1",
"diablomedia/zendframework1-test": "^1.0.2 || ^2.0.1",
"diablomedia/zendframework1-text": "^1.0.0",
"diablomedia/zendframework1-translate": "^1.0.0",
"diablomedia/zendframework1-uri": "^1.0.0",
"diablomedia/zendframework1-validate": "^1.0.0",
"diablomedia/zendframework1-validate": "^1.0.3",
"diablomedia/zendframework1-validate-db": "^1.0.0",
"diablomedia/zendframework1-validate-file": "^1.0.2",
"diablomedia/zendframework1-validate-ldap": "^1.0.0",
"diablomedia/zendframework1-validate-sitemap": "^1.0.0",
"diablomedia/zendframework1-view": "^1.0.2",
"diablomedia/zendframework1-view": "^1.0.3",
"diablomedia/zendframework1-view-helper-action": "^1.0.0",
"diablomedia/zendframework1-view-helper-baseurl": "^1.0.0",
"diablomedia/zendframework1-view-helper-json": "^1.0.0",
"diablomedia/zendframework1-view-helper-layout": "^1.0.0",
"diablomedia/zendframework1-view-helper-navigation": "^1.0.0",
"diablomedia/zendframework1-view-helper-navigation": "^1.0.3",
"diablomedia/zendframework1-view-helper-paginationcontrol": "^1.0.0",
"diablomedia/zendframework1-view-helper-partial": "^1.0.0",
"diablomedia/zendframework1-view-helper-url": "^1.0.0",
"diablomedia/zendframework1-wildfire": "^1.0.0",
"diablomedia/zendframework1-xml": "^1.0.0",
"diablomedia/zendframework1-wildfire": "^1.0.3",
"diablomedia/zendframework1-xml": "^1.0.2",
"php": ">=7.0.0"
},
"autoload": {
Expand Down Expand Up @@ -153,19 +152,11 @@
"config": {
"bin-dir": "bin"
},
"repositories": [
{
"type": "vcs",
"no-api": true,
"url": "https://github.com/diablomedia/phpstorm-stubs"
}
],
"require-dev": {
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^7.5.15",
"phpunit/dbunit": "^4.0",
"phpunit/phpcov": "^5.0",
"phpstan/phpstan": "^0.9.2",
"jetbrains/phpstorm-stubs": "dev-phpstan"
"phpstan/phpstan": "0.12.4"
},
"archive": {
"exclude": ["/demos", "/documentation", "/tests"]
Expand All @@ -174,6 +165,6 @@
"zendframework/zendframework1": ">=1.12.20"
},
"scripts": {
"phpstan": "phpstan analyse -l 4 --autoload-file=vendor/autoload.php --memory-limit=1024M -c phpstan.neon ./library/"
"phpstan": "phpstan analyse --memory-limit=1024M -c phpstan.neon --ansi"
}
}
1 change: 1 addition & 0 deletions library/Zend/Amf/Parse/Amf0/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ public function writeObject($object)
{
// Loop each element and write the name of the property.
foreach ($object as $key => &$value) {
$key = (string) $key;
// skip variables starting with an _ private transient
if( $key[0] == "_") continue;
$this->_stream->writeUtf($key);
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Amf/Util/BinaryStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function readByte()
);
}

return ord($this->_stream{$this->_needle++});
return ord($this->_stream[$this->_needle++]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Code25.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function getChecksum($text)
$checksum = 0;

for ($i = strlen($text); $i > 0; $i --) {
$checksum += intval($text{$i - 1}) * $factor;
$checksum += intval($text[$i - 1]) * $factor;
$factor = 4 - $factor;
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Barcode/Object/Ean13.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function getChecksum($text)
$checksum = 0;

for ($i = strlen($text); $i > 0; $i --) {
$checksum += intval($text{$i - 1}) * $factor;
$checksum += intval($text[$i - 1]) * $factor;
$factor = 4 - $factor;
}

Expand Down Expand Up @@ -186,7 +186,7 @@ protected function _drawEan13Text()
$leftPosition = $this->getQuietZone() - $characterWidth;
for ($i = 0; $i < $this->_barcodeLength; $i ++) {
$this->_addText(
$text{$i},
$text[$i],
$this->_fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Ean5.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function getChecksum($text)
$checksum = 0;

for ($i = 0 ; $i < $this->_barcodeLength; $i ++) {
$checksum += intval($text{$i}) * ($i % 2 ? 9 : 3);
$checksum += intval($text[$i]) * ($i % 2 ? 9 : 3);
}

return ($checksum % 10);
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Ean8.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function _drawText()
$leftPosition = $this->getQuietZone() + (3 * $this->_barThinWidth) * $this->_factor;
for ($i = 0; $i < $this->_barcodeLength; $i ++) {
$this->_addText(
$text{$i},
$text[$i],
$this->_fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Identcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function getChecksum($text)
$checksum = 0;

for ($i = strlen($text); $i > 0; $i --) {
$checksum += intval($text{$i - 1}) * (($i % 2) ? 4 : 9);
$checksum += intval($text[$i - 1]) * (($i % 2) ? 4 : 9);
}

$checksum = (10 - ($checksum % 10)) % 10;
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Barcode/Object/ObjectAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public function getFactor()
public function setForeColor($value)
{
if (preg_match('`\#[0-9A-F]{6}`', $value)) {
$this->_foreColor = hexdec($value);
$this->_foreColor = hexdec(substr($value, 1));
} elseif (is_numeric($value) && $value >= 0 && $value <= 16777125) {
$this->_foreColor = intval($value);
} else {
Expand Down Expand Up @@ -488,7 +488,7 @@ public function getForeColor()
public function setBackgroundColor($value)
{
if (preg_match('`\#[0-9A-F]{6}`', $value)) {
$this->_backgroundColor = hexdec($value);
$this->_backgroundColor = hexdec(substr($value, 1));
} elseif (is_numeric($value) && $value >= 0 && $value <= 16777125) {
$this->_backgroundColor = intval($value);
} else {
Expand Down Expand Up @@ -1310,7 +1310,7 @@ protected function _drawText()
for ($i = 0; $i < $textLength; $i ++) {
$leftPosition = $this->getQuietZone() + $space * ($i + 0.5);
$this->_addText(
$text{$i},
$text[$i],
$this->_fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Upca.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected function _drawText()
$fontSize *= 0.8;
}
$this->_addText(
$text{$i},
$text[$i],
$fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down
10 changes: 5 additions & 5 deletions library/Zend/Barcode/Object/Upce.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ protected function _getDefaultOptions()
public function getText()
{
$text = parent::getText();
if ($text{0} != 1) {
$text{0} = 0;
if ($text[0] != 1) {
$text[0] = 0;
}
return $text;
}
Expand Down Expand Up @@ -148,7 +148,7 @@ protected function _drawText()
$fontSize *= 0.8;
}
$this->_addText(
$text{$i},
$text[$i],
$fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down Expand Up @@ -208,8 +208,8 @@ protected function _validateText($value, $options = array())
public function getChecksum($text)
{
$text = $this->_addLeadingZeros($text, true);
if ($text{0} != 1) {
$text{0} = 0;
if ($text[0] != 1) {
$text[0] = 0;
}
return parent::getChecksum($text);
}
Expand Down
11 changes: 8 additions & 3 deletions library/Zend/Cloud/Infrastructure/Adapter/Rackspace.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Zend_Cloud_Infrastructure_Adapter_Rackspace extends Zend_Cloud_Infrastruct
*
* @var array
*/
protected $flavors;
protected $flavors = array();
/**
* Map array between Rackspace and Infrastructure status
*
Expand Down Expand Up @@ -157,8 +157,13 @@ protected function convertAttributes($attr)
} else {
$result[Zend_Cloud_Infrastructure_Instance::INSTANCE_ZONE] = self::RACKSPACE_ZONE_UK;
}
$result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = $this->flavors[$attr['flavorId']]['ram'];
$result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = $this->flavors[$attr['flavorId']]['disk'];
if (isset($this->flavors[$attr['flavorId']])) {
$result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = $this->flavors[$attr['flavorId']]['ram'];
$result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = $this->flavors[$attr['flavorId']]['disk'];
} else {
$result[Zend_Cloud_Infrastructure_Instance::INSTANCE_RAM] = null;
$result[Zend_Cloud_Infrastructure_Instance::INSTANCE_STORAGE] = null;
}
}
return $result;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/CodeGenerator/Php/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static function fromReflection(Zend_Reflection_File $reflectionFile)
}
}
$body = implode("\n", $bodyReturn);
unset($bodyLines, $bodyReturn, $classStartLine, $classEndLine);
unset($bodyLines, $bodyReturn);
}

$file->setBody($body);
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Service/StrikeIron.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct($options = array())
* Factory method to return a preconfigured Zend_Service_StrikeIron_*
* instance.
*
* @param null|string $options Service options
* @param array $options Service options
* @return object Zend_Service_StrikeIron_* instance
* @throws Zend_Service_StrikeIron_Exception
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function addStringItem($key, $value, $section = 'production', $quoteValue
$newLines[] = $contentLine;
if ($insideSection) {
// if its blank, or a section heading
if (isset($contentLines[$contentLineIndex + 1]{0}) && $contentLines[$contentLineIndex + 1]{0} == '[') {
if (isset($contentLines[$contentLineIndex + 1][0]) && $contentLines[$contentLineIndex + 1][0] == '[') {
$newLines[] = $key . ' = ' . $value;
$insideSection = null;
} else if (!isset($contentLines[$contentLineIndex + 1])){
Expand Down
Loading

0 comments on commit 7614377

Please sign in to comment.