Skip to content
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

refactor: replace deprecated Faker property access #620

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Feb 2, 2023

E.g. ErrorException: Since fakerphp/faker 1.14: Accessing property "userName" is deprecated, use "userName()" instead.

Try:

$ CODEIGNITER_SCREAM_DEPRECATIONS=true composer test

@kenjis kenjis added the refactor Pull requests that refactor code label Feb 2, 2023
Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New to me :

ErrorException: Since fakerphp/faker 1.14: Accessing property "userName" is deprecated, use "userName()" instead.
@kenjis kenjis force-pushed the update-faker-accessing-property branch from d1584a3 to 54be9f0 Compare February 3, 2023 04:39
@kenjis
Copy link
Member Author

kenjis commented Feb 3, 2023

Rebased.

$ CODEIGNITER_SCREAM_DEPRECATIONS=true composer test
> phpunit
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.13
Configuration: /Users/kenji/work/codeigniter/official/codeigniter-shield/phpunit.xml
Random Seed:   1675399200

...............................................................  63 / 290 ( 21%)
............................................................... 126 / 290 ( 43%)
............................................................... 189 / 290 ( 65%)
............................................................... 252 / 290 ( 86%)
......................................                          290 / 290 (100%)

Nexus\PHPUnit\Extension\Tachycardia identified these 8 slow tests:
+---------------------------------------------------------------------------------+---------------+-------------+
| Test Case                                                                       | Time Consumed | Time Limit  |
+---------------------------------------------------------------------------------+---------------+-------------+
| Tests\\Authentication\\ForcePasswordResetTest::testForceGlobalPasswordReset     | 00:00:04.36   | 00:00:00.50 |
| Tests\\Unit\\DictionaryValidatorTest::testCheckTrueOnNotFound                   | 00:00:01.78   | 00:00:00.50 |
| Tests\\Controllers\\RegisterTest::testRegisteredButNotActivatedAndRegisterAgain | 00:00:01.28   | 00:00:00.50 |
| Tests\\Controllers\\RegisterTest::testRegisterRedirectsToActionIfDefined        | 00:00:01.28   | 00:00:00.50 |
| Tests\\Controllers\\RegisterTest::testRegisteredAndSessionExpiredAndLogin       | 00:00:01.25   | 00:00:00.50 |
| Tests\\Controllers\\RegisterTest::testRegisteredButNotActivatedAndLogin         | 00:00:01.24   | 00:00:00.50 |
| Tests\\Controllers\\RegisterTest::testRegisterActionSuccess                     | 00:00:01.20   | 00:00:00.50 |
| Tests\\Unit\\UserIdentityModelTest::testForceMultiplePasswordReset              | 00:00:00.93   | 00:00:00.50 |
+---------------------------------------------------------------------------------+---------------+-------------+


Time: 00:31.441, Memory: 44.00 MB

OK (290 tests, 647 assertions)

@kenjis
Copy link
Member Author

kenjis commented Feb 3, 2023

@paulbalandan I just noticed why the \ is doubled in the classname?
Tests\\Authentication\\ForcePasswordResetTest::testForceGlobalPasswordReset

@paulbalandan
Copy link
Member

@kenjis so that you can just copy paste them when using the --filter option of phpunit.

@kenjis kenjis merged commit f437832 into codeigniter4:develop Feb 3, 2023
@kenjis kenjis deleted the update-faker-accessing-property branch February 3, 2023 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Pull requests that refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants