laminas / laminas-developer-tools

Module for developer and debug tools for use with laminas-mvc applications.
BSD 3-Clause "New" or "Revised" License
24 stars 13 forks source link

Provide php 8.1 support #40

Closed samsonasik closed 2 years ago

samsonasik commented 3 years ago
Q A
QA yes

Description

samsonasik commented 3 years ago

There is error:

PHP Fatal error:  During inheritance of Countable: Uncaught Return type of Laminas\View\Model\ViewModel::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

EEE.

Fatal error: During inheritance of Countable: Uncaught Return type of Laminas\View\Model\ViewModel::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

it seems we need to have laminas-view support php 8.1 first ?

froschdesign commented 3 years ago

Related to https://github.com/laminas/laminas-view/issues/79

froschdesign commented 2 years ago

@samsonasik Version 2.13.0 of laminas-view with PHP 8.1 support is released.

samsonasik commented 2 years ago

@froschdesign updated, what correct command to generate composer.lock? I used composer update --prefer-lowest, is that correct?

samsonasik commented 2 years ago

as it require laminas-servicemanager, and laminas-servicemanager that support php 8.1 use php 7.4 as requirement, it needs php 7.4 as requirement as well.

samsonasik commented 2 years ago

I tweaked with exclude PHPUnit on PHP 8.1 with lowest dependencies in .laminas-ci.json

samsonasik commented 2 years ago

it seems laminas-coding-standard needs to be updated :

Running ./vendor/bin/phpcs -q --report=checkstyle | cs2pr
249
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /github/workspace/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php on line 1763
250
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /github/workspace/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php on line 2846
251
Error: Start tag expected, '<' not found on line 2, column 
froschdesign commented 2 years ago

@samsonasik

it seems laminas-coding-standard needs to be updated

This package still use version 1 of laminas-coding-standard:

https://github.com/laminas/laminas-developer-tools/blob/be61c31c77124720032ad94a7588e8c731f557a8/composer.json#L39

samsonasik commented 2 years ago

@froschdesign I regenerated composer.lock from php 7.3, All green 🎉

samsonasik commented 2 years ago

I am merging it ;)