-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RE: Added \ReturnTypeWillChange Attribute - (#120) #141
Changes from all commits
b99f9a6
f54a13d
04c1fa8
ef63603
ffee1e0
b2611ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"homepage": "http://framework.zend.com/", | ||
"license": "BSD-3-Clause", | ||
"require": { | ||
"zf1s/polyfill-php81": "^1.25", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but could you rearrange But after a short research, it might be that we don't need the polyfill at all? First two features are not used anywhere, if I'm not mistaken, and Maybe it would be needed for code analysis, running on php 8.0. Even in that case, it would be probably enough, if added to the main composer.json only. But we do not have any code analyzers running here, and if one dev would like to run it locally, why would they run it on php 8.0? Please check if those polyfills are really needed. thank you There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressing in #146 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Appears dependency update not needed, all composer changes can be dropped. so all left to do is to carry those attribute adding right? i will remove the root namespace qualifier in the process: |
||
"php": ">=5.3.3", | ||
"zf1s/zend-exception": "^1.15.0" | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,6 +161,7 @@ public function __set($name, $value) | |
* @param string $name | ||
* @return bool | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As ZF1 doesn't use namespaces, the root namespace qualifier can be dropped |
||
public function offsetExists($name) | ||
{ | ||
return isset($this->_fields[$name]); | ||
|
@@ -172,6 +173,7 @@ public function offsetExists($name) | |
* @param string $name | ||
* @return mixed | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function offsetGet($name) | ||
{ | ||
return $this->getField($name); | ||
|
@@ -184,6 +186,7 @@ public function offsetGet($name) | |
* @param mixed $value | ||
* @return void | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function offsetSet($name, $value) | ||
{ | ||
$this->setField($name, $value); | ||
|
@@ -195,6 +198,7 @@ public function offsetSet($name, $value) | |
* @param string $name | ||
* @return void | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function offsetUnset($name) | ||
{ | ||
if ($this->offsetExists($name)) { | ||
|
@@ -231,6 +235,7 @@ public function __call($name, $args) | |
* | ||
* @return int | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function count() | ||
{ | ||
return count($this->_fields); | ||
|
@@ -241,6 +246,7 @@ public function count() | |
* | ||
* @return Iterator | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function getIterator() | ||
{ | ||
return new ArrayIterator($this->_fields); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ class Zend_Cloud_Infrastructure_ImageList implements Countable, Iterator, ArrayA | |
|
||
/** | ||
* The Image adapter (if exists) | ||
* | ||
* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unnecessary whitespace change |
||
* @var object | ||
*/ | ||
protected $adapter; | ||
|
@@ -87,6 +87,7 @@ protected function addImage(Zend_Cloud_Infrastructure_Image $image) | |
* | ||
* @return int | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function count() | ||
{ | ||
return count($this->images); | ||
|
@@ -99,6 +100,7 @@ public function count() | |
* | ||
* @return Image | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function current() | ||
{ | ||
return $this->images[$this->iteratorKey]; | ||
|
@@ -111,6 +113,7 @@ public function current() | |
* | ||
* @return int | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function key() | ||
{ | ||
return $this->iteratorKey; | ||
|
@@ -123,6 +126,7 @@ public function key() | |
* | ||
* @return void | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function next() | ||
{ | ||
$this->iteratorKey++; | ||
|
@@ -135,6 +139,7 @@ public function next() | |
* | ||
* @return void | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function rewind() | ||
{ | ||
$this->iteratorKey = 0; | ||
|
@@ -147,6 +152,7 @@ public function rewind() | |
* | ||
* @return bool | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function valid() | ||
{ | ||
$numItems = $this->count(); | ||
|
@@ -164,6 +170,7 @@ public function valid() | |
* @param int $offset | ||
* @return bool | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function offsetExists($offset) | ||
{ | ||
return ($offset < $this->count()); | ||
|
@@ -178,6 +185,7 @@ public function offsetExists($offset) | |
* @throws Zend_Cloud_Infrastructure_Exception | ||
* @return Image | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function offsetGet($offset) | ||
{ | ||
if (!$this->offsetExists($offset)) { | ||
|
@@ -196,6 +204,7 @@ public function offsetGet($offset) | |
* @param string $value | ||
* @throws Zend_Cloud_Infrastructure_Exception | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function offsetSet($offset, $value) | ||
{ | ||
// require_once 'Zend/Cloud/Infrastructure/Exception.php'; | ||
|
@@ -210,6 +219,7 @@ public function offsetSet($offset, $value) | |
* @param int $offset | ||
* @throws Zend_Cloud_Infrastructure_Exception | ||
*/ | ||
#[\ReturnTypeWillChange] | ||
public function offsetUnset($offset) | ||
{ | ||
// require_once 'Zend/Cloud/Infrastructure/Exception.php'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need it here. BTW, I wonder, why it is not true by default, at least starting from composer v2 🤡
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed in #146