-
-
Notifications
You must be signed in to change notification settings - Fork 24
PHP8 Support #13
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
PHP8 Support #13
Conversation
d4435c3 to
5fb7fb2
Compare
Signed-off-by: andyo <[email protected]> Add php 7.3, 7.4, and 8.0 matrices, remove < 7.3 Signed-off-by: andyo <[email protected]> Add return types Signed-off-by: andyo <[email protected]> Use php 8 explicitly Signed-off-by: andyo <[email protected]> Clean up confusing class logic and ambiguous code Signed-off-by: andyo <[email protected]> Clean up doc blocks, add matching __set/__isset methods Signed-off-by: andyo <[email protected]> call new method Signed-off-by: andyo <[email protected]> call new method Signed-off-by: andyo <[email protected]> Update assertion calls Signed-off-by: andyo <[email protected]> update assert contains using string Signed-off-by: andyo <[email protected]> Implement ConfigProviderInterface and minor code cleanup Signed-off-by: andyo <[email protected]> Update string not contains assertions Signed-off-by: andyo <[email protected]> Fix method name Signed-off-by: andyo <[email protected]> require laminas/laminas-modulemanager Signed-off-by: andyo <[email protected]> Implement BootstrapListenerInterface Signed-off-by: andyo <[email protected]> Update onBootstrap signature to match interface Signed-off-by: andyo <[email protected]> Add return types Signed-off-by: andyo <[email protected]> Update ruleset path Signed-off-by: andyo <[email protected]> Fix rule path Signed-off-by: andyo <[email protected]> revert eventmanager constraint change Signed-off-by: andyo <[email protected]> Migrate phpunit.xml.dist schema Signed-off-by: andyo <[email protected]> use prophecy trait Signed-off-by: andyo <[email protected]> Update laminas/view to 2.11.3 and add phpspec/prophecy-phpunit to require-dev Signed-off-by: andyo <[email protected]> Clean up tests Signed-off-by: andyo <[email protected]> Revert set logic Signed-off-by: andyo <[email protected]> use ::class Signed-off-by: andyo <[email protected]> throw exception in default case Signed-off-by: andyo <[email protected]> Remove senseless breaks Signed-off-by: andyo <[email protected]> Add ApplicationInterface docblocks Signed-off-by: andyo <[email protected]> Add return types. Add JSON_THROW_ON_ERROR to jsonFlags Signed-off-by: andyo <[email protected]> Add phpunit result cache to .gitignore Signed-off-by: andyo <[email protected]> Add return types. Cleanup code. Signed-off-by: andyo <[email protected]> Variable alignment Signed-off-by: andyo <[email protected]> Revert setter changes Signed-off-by: andyo <[email protected]> Revert setter changes Signed-off-by: andyo <[email protected]> Add return types and minor code cleanup Signed-off-by: andyo <[email protected]> Add return types and minor code cleanup Signed-off-by: andyo <[email protected]> revert logic Signed-off-by: andyo <[email protected]> Implement FactoryInterface Signed-off-by: andyo <[email protected]> remove modulemanager Signed-off-by: andyo <[email protected]> revert formatting Signed-off-by: andyo <[email protected]> Add modulemanager to require-dev Signed-off-by: andyo <[email protected]>
Signed-off-by: andyo <[email protected]>
Signed-off-by: andyo <[email protected]>
Signed-off-by: andyo <[email protected]>
Signed-off-by: andyo <[email protected]>
| $normalized = strtolower($name); | ||
| if (in_array($normalized, array_keys($this->normalizedProperties))) { | ||
| $normalized = \strtolower($name); | ||
| if (\array_key_exists($normalized, $this->normalizedProperties)) { |
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.
logic change
| } | ||
|
|
||
| return 'Unknown Error'; | ||
| return $this->recommendedReasonPhrases[$this->statusCode] ?? 'Unknown Error'; |
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.
logic change
| 100 | ||
| ); | ||
|
|
||
| if ($sharedEvents) { |
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.
ensures shared event manager is setup before calling attach on it
| foreach ($this->acceptFilters as $type) { | ||
| $match = $accept->match($type); | ||
| if ($match && $match->getTypeString() != '*/*') { | ||
| if ($match && $match->getTypeString() !== '*/*') { |
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.
logic change
| * @return array | ||
| */ | ||
| public function toArray() | ||
| public function __set(string $name, $value) |
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.
__set and __isset satisfy magic requirements
| protected function getDetail() | ||
| { | ||
| if ($this->detail instanceof Throwable || $this->detail instanceof Exception) { | ||
| if ($this->detail instanceof Throwable) { |
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.
since we support only 7.3 and above, remove redundant instanceof Exception conditions
|
Closing in favor of #15 |
References #12 and targets the 1.4.x branch.
Issues with required libraries: