Uh oh!
There was an error while loading. Please reload this page.
Add PHP 8.2 to Unit Tests GHA - #6172
Conversation
kenjis
commented
Jun 22, 2022
There are too many dynamic properties!
|
samsonasik
commented
Jun 22, 2022
Rector can be used to transform AllowDynamicProperties if needed |
kenjis
commented
Jun 22, 2022
I think |
paulbalandan
commented
Jun 22, 2022
kenjis
commented
Jun 22, 2022
Yes, probably |
MGatner
left a comment
There was a problem hiding this comment.
Wow we passed! Very nice. How about adding to the PHPStan Action as well so we can catch deprecations?
MGatner
commented
Jun 22, 2022
Oh haha we didn't pass at all 🤦♂️ Result was ignored. Digging through these now... |
MGatner
commented
Jun 22, 2022
Okay this isn't so bad. Lots of the same culprits over and over. Some specifics...
This is a good opportunity to improve code quality/smells - I wish we already had some dynamic property rules in place beforehand! |
kenjis
commented
Jun 22, 2022
I don't know why Configs (or Registrars) need dynamic properties. |
MGatner
commented
Jun 22, 2022
Maybe |
kenjis
commented
Jun 22, 2022
I'm not convinced. In the Shield validation case, it seems property overriding is enough. |
MGatner
commented
Jun 23, 2022
I just went through all the Config files and I think the two I mentioned ( |
kenjis
commented
Jun 24, 2022
I don't understand the need to add dynamic properties to Database config. Like Validation config, I don't understand the need for it at all. |
MGatner
commented
Jun 24, 2022
I'm fine skipping it and then revisiting if the need arises. I certainly have never needed it before. My opinion was based on how these Config files work, which is different than other files. |
kenjis
commented
Jun 29, 2022
About 200 errors were reduced.
|
MGatner
commented
Jun 29, 2022
The vfsStream issue has been fixed but not released (bovigo/vfsStream@4928328). I'm not sure about Predis, that one still surprises me. |
MGatner
commented
Jun 29, 2022
Predis constructor straight up sets it's own property that doesn't exist 🤦♂️ https://github.com/predis/predis/blob/main/src/Connection/Parameters.php |
paulbalandan
commented
Jun 30, 2022
Patched in |
MGatner
commented
Jun 30, 2022
By our very own @paulbalandan! predis/predis#781 Thanks Paul; glad to see their quick response too. |
MGatner
commented
Jul 8, 2022
Since the 8.2 tests are exempt should we go ahead and merge this? It would make tracking the errors easier instead of rebasing this branch over and over. |
kenjis
commented
Jul 9, 2022
But there are still 133 errors. |
MGatner
commented
Jul 9, 2022
Right but because of this line: continue-on-error: ${{ matrix.php-versions == '8.2' }} # remove when PHP 8.2 is generally availableThe errors won't cause the pipeline to fail, so they are only there as information if you open up the job logs. Merging this PR will let us keep an eye on those errors, since many of them are issues upstream that we cannot control. It will also let us send PRs to fix those errors that will actually run the GitHub Actions (beneficial for me since I don't have an 8.2 environment yet). |
MGatner
commented
Oct 22, 2022
It seems that the deprecations a caused by an older structure of Faker factories; we may be able to identify those and replace them with different faked content (if you look at Chris' linked PR s/he did the same). |
c3fabd0 to
7976a07Comparepaulbalandan
commented
Oct 22, 2022
I used a temporary patch for Faker's troubled file. 7976a07 |
kenjis
commented
Oct 22, 2022
The last error is
|
kenjis
commented
Oct 23, 2022
@paulbalandan Applying patch on GA is not enough. |
paulbalandan
commented
Oct 23, 2022
I have never used Faker so I'm not confident my patch will cover all edge cases for faker tests. I'm not sure what you mean by "all users tests". If that would mean all consumers of Faker aside from us, then that is the least of my concern. Faker itself should provide the official patch. As I said, this addition is just a temporary hack. |
kenjis
commented
Oct 23, 2022
I mean all CI4 devs that use Faker. |
MGatner
commented
Oct 23, 2022
I'm fine with this to pass the framework. We don't actually offer any deprecated Faker usage directly: the Generator is available to users and may or may not be called. I am fine with this workaround (also: very cool use of |
kenjis
commented
Oct 24, 2022
This is the test result of Shield. Most of the errors caused by Faker. bash-3.2$ composer test
> phpunitPHPUnit 9.5.25 #StandWithUkraineRuntime: PHP 8.2.0-devConfiguration: /Users/kenji/work/codeigniter/official/codeigniter-shield/phpunit.xmlRandom Seed: 1666576446.................................................E....E.E...... 63 / 251 ( 25%)E.E.EE...E.........EE...EEE..............EE.............E.E...E 126 / 251 ( 50%)...EE.E..E......E.E......................E.E.....E.....EE.E...E 189 / 251 ( 75%)...........EE..........EE.E....................E..EEE.E.EEE... 251 / 251 (100%)Time: 00:10.122, Memory: 38.00 MBThere were 44 errors: |
kenjis
commented
Oct 25, 2022
|
kenjis
commented
Oct 26, 2022
I merged #6757 |
MGatner
commented
Oct 27, 2022
Looks like one more dynamic property issue in each of the driver-specific Result classes. E.g.: /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/OCI8/Result.php:109 |
Side note: scrolling through these test results over and over with all the "skips"... maybe we should tag database-specific tests as their own suites and run them per driver? Or maybe that is what Paul was already working on? |
paulbalandan
commented
Nov 1, 2022
🚀 |
kenjis
commented
Nov 1, 2022
I didn't know but it seems https://github.com/codeigniter4/CodeIgniter4/actions/runs/3368104698/jobs/5586268619 |
That's odd. Also: why don't we have Xdebug available? I thought setup-php added it. Edit: Oh right, we just made it conditional 🤪 |
See #6170
Checklist: