Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for PHP 8, update dependencies' versions #220

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

Merged
samdark merged 61 commits into yiisoft:master from arogachev:3.0
Nov 30, 2021
Merged

Add support for PHP 8, update dependencies' versions #220

samdark merged 61 commits into yiisoft:master from arogachev:3.0
Nov 30, 2021

Conversation

@arogachev
Copy link
Contributor

@arogachev arogachev commented Nov 3, 2021
edited
Loading

Q A
Is bugfix? ✔️/❌
New feature? ✔️/❌
Breaks BC? ✔️/❌
Fixed issues #203, #146, #213, #133, #155, #162, #179, #199, #148

Related:


TODO list (required):

  • Fix filling of type and types in other places, extract common logic.
  • Restore filling of endLine in BaseDoc.
  • Get rid of hard coded isReturnByReference in FunctionDoc.
  • Handle commented out code - $reflector->getNode()->default.
  • Fix tests.
  • Test larger codebases (Yii 2 framework).
  • Actualize docstrings.
  • Update changelog.
  • Figure out what's preventing PHPUnit to install when running composer install locally.

TODO list (optional):

  • Actualize tests in phpDocumentor/Reflection fork.
  • Rename reflector to element.

Improvements / acceptable additional changes:

  • Type and description are not shown (https://www.yiiframework.com/doc/api/2.0/yii-base-controller#bindInjectedParams()-detail).
  • callback -> callable.
  • mixed[] -> array.
  • Fixed broken links (including in @see tags).
  • Removed leading backslash in event name (\yii\db\Event - > yii\db\Event). This is also more consistent with other class names now.
  • \\ -> \ (inside of strings,'app\\controllers -> 'app\controllers'). Very few cases, not a big issue in my opinion.
  • More correct rendering of HEX numbers (1 -> 0x1). Previously they were displayed as integers (the beginning was cut off).
  • HEX colors are now in lower case (0xFFFFFF -> 0xffffff).
  • Short class name in agruments in method signature. Before: protected string formatMessage ( $message, $format = [\yii\helpers\Console::FG_RED, \yii\helpers\Console::BOLD] ) After: protected string formatMessage ( $message, $format = [Console::FG_RED, Console::BOLD] ).
  • Incomplete description: "Prepare select-subquery and field names for INSERT INTO ... SELECT SQL statement." (".. SELECT SQL statement." part was cut off).
  • Unified \Exception (\Throwable was redundant).
  • Removed redundant raw Markdown link wrap (https://www.yiiframework.com/doc/api/2.0/yii-web-urlnormalizerredirectexception#$scheme-detail).
  • Removed @see tags that refer to private properies and methods.
  • Fix typos in @see tags causing broken links.
  • Methods declared via @method tag are not rendered as inherited now (1 case only).
  • Fix method name and order accordingly (declared via @method tag) https://www.yiiframework.com/doc/api/2.0/yii-db-activerelationtrait#()-detail.
  • Backslashes in class names are not highlighted separately (begavior of highlight_string function was changed in PHP 8).

Thanks to @bizley for initial attempt and changes. 👏

samdark, bizley, and mamadza reacted with thumbs up emoji
@samdark samdark requested review from a team and bizley November 3, 2021 07:12
@arogachev arogachev changed the title (削除) Draft for 3.0 (削除ここまで) (追記) Add support for PHP 8 (追記ここまで) Nov 4, 2021
@samdark samdark added the type:enhancement Enhancement label Nov 4, 2021
@arogachev arogachev changed the title (削除) Add support for PHP 8 (削除ここまで) (追記) Add support for PHP 8, update dependencies' versions (追記ここまで) Nov 5, 2021
@arogachev arogachev self-assigned this Nov 5, 2021
@arogachev arogachev changed the title (削除) Add support for PHP 8, update dependencies' versions (削除ここまで) (追記) Add support for PHP 8, update dependencies' versions (fix #203, #146, #213) (追記ここまで) Nov 5, 2021
@arogachev arogachev changed the title (削除) Add support for PHP 8, update dependencies' versions (fix #203, #146, #213) (削除ここまで) (追記) Add support for PHP 8, update dependencies' versions (追記ここまで) Nov 5, 2021
"require-dev": {
"cweagans/composer-patches": "^1.7",
"phpunit/phpunit": "4.8.34"
"phpunit/phpunit": "*"
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to specify versions more explicitly.

Copy link
Contributor Author

@arogachev arogachev Nov 26, 2021
edited
Loading

Choose a reason for hiding this comment

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

That's how it was in @bizley's draft (initial commit). Maybe there is a reason for that? Different PHP versions I guess? 🤔 Anyway I agree with you, in terms of dependencies this is not safe. I'll take a look.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I did it like that because we usually don't have constraint on the PHP version. I can see now that since we have it limited we should also limit phpunit but still allowing all range of it for the given php versions.

Copy link
Contributor Author

@bizley You are probably busy now, but do you have time for review? 🤔

Copy link
Member

bizley commented Nov 29, 2021

Oh, sweet, is it ready? I'll find some time for sure.

Copy link
Contributor Author

Oh, sweet, is it ready? I'll find some time for sure.

That's great! 👍 Yes, it's ready for review.

# Conflicts:
#	CHANGELOG.md
@samdark samdark merged commit 3adbcd1 into yiisoft:master Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@samdark samdark samdark approved these changes

@bizley bizley Awaiting requested review from bizley

+1 more reviewer

@rob006 rob006 rob006 left review comments

Reviewers whose approvals may not affect merge requirements

Labels

type:enhancement Enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /