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

docs: fix PHPDoc and comments in Models #6822

Merged
merged 4 commits into from
Nov 7, 2022

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Nov 6, 2022

Description

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • [] User guide updated
  • Conforms to style guide

*
* @return mixed
* @return bool|string Returns a string if in test mode.
Copy link
Member

Choose a reason for hiding this comment

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

These are annoying to support. I would like to see in v5 some kind of Database Proxy that passes requests through to the driver for most cases but "captures" the actual SQL query for Test Mode. I think that would be a much better approach than trying to adjust all our return types.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the return types are not good, should be bool only.

*
* @param int|null $userData An optional PHP timestamp to be converted.
*
* @return mixed
* @return int|string
*
* @throws ModelException
*/
Copy link
Member

Choose a reason for hiding this comment

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

👇#6815

Copy link
Member Author

Choose a reason for hiding this comment

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

I sent a PR #6825

system/BaseModel.php Outdated Show resolved Hide resolved
Co-authored-by: MGatner <[email protected]>
@kenjis
Copy link
Member Author

kenjis commented Nov 6, 2022

What are these errors?

There were 479 errors:

1) CodeIgniter\Commands\CreateDatabaseTest::testCreateDatabase
CodeIgniter\Database\Exceptions\DatabaseException: Unable to connect to the database.
Main connection [SQLSRV]: Call to undefined function CodeIgniter\Database\SQLSRV\sqlsrv_configure()

/home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/BaseConnection.php:418
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/Database.php:79
/home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Commands/CreateDatabaseTest.php:48

https://github.com/codeigniter4/CodeIgniter4/actions/runs/3404234441/jobs/5664964160

@kenjis kenjis requested a review from MGatner November 6, 2022 23:22
@kenjis
Copy link
Member Author

kenjis commented Nov 7, 2022

@paulbalandan Do you know anything?

Run shivammathur/setup-php@v2
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh

==> Setup PHP
✓ PHP Installed PHP 8.2.0-dev (94f6a0c1dc8ab939b37e93b448bc2edce8c48206)

==> Setup Extensions
✓ imagick Enabled
✗ sqlsrv Could not install sqlsrv on PHP 8.2.0-dev
✓ gd Enabled
✓ sqlite3 Enabled
✓ redis Enabled
✓ memcached Enabled
✓ oci8 Installed and enabled
oci8 Click to read the oci8 related license information 
✓ pgsql Enabled

@paulbalandan
Copy link
Member

Not sure, but can you try changing the extension to sqlsrv-5.10.1?

@kenjis
Copy link
Member Author

kenjis commented Nov 7, 2022

@paulbalandan Passed!

@kenjis kenjis merged commit ae80474 into codeigniter4:develop Nov 7, 2022
@kenjis kenjis deleted the fix-phpdocs-models branch November 7, 2022 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants