-
Notifications
You must be signed in to change notification settings - Fork 16
Fix/php81 #44
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
Open
Donatello-za
wants to merge
15
commits into
vanilla:master
Choose a base branch
from
Donatello-za:fix/php81
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix/php81 #44
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
222dda3
Initial PHP 8.1 compatibility fixes.
Donatello-za 391f32f
Fixed compatibility return type for OptSchema::jsonSerialize().
Donatello-za 64f659b
PHP 8.1 upgrades for Cli and Args classes.
Donatello-za e0c70e9
PHP 8.1 upgrades for StreamLogger, Table and TaskLogger classes.
Donatello-za b1e03a5
PHP 8.1 upgrades for CliApplication and Identifier classes.
Donatello-za 6e204e5
PHP 8.1 upgrades for CommandSchema, MetaTrait and OptSchema classes.
Donatello-za 5e118eb
PHP 8.1 Fixed various failed test cases.
Donatello-za 32a7136
PHP 8.1 Fixed various Psalm warnings.
Donatello-za f8b9a41
PHP 8.1 Removed deprecated LogFormatter class and tests.
Donatello-za 0473b47
PHP 8.1 Updated README.md for upgrade tips.
Donatello-za 574ca32
PHP 8.1 Minor README.md formatting fixes.
Donatello-za 6f3de61
Update psr/log to ^2.0
thisispiers f462ec6
Merge pull request #1 from thisispiers/fix/php81
Donatello-za eee661f
PHP 8.1 Composer update together with psalm fixes.
Donatello-za d822cc0
PHP 8.1 Fixed error when both global and command descriptions supplied.
Donatello-za File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,7 @@ | ||
| language: php | ||
|
|
||
| php: | ||
| - 7.2 | ||
| - 7.3 | ||
| - 7.4 | ||
| - 8.1 | ||
| - nightly | ||
|
|
||
| sudo: false | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to use a require for "php 7.4" as the code is basically compatible with 7.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @blacktek, unfortunately it is not backwards compatible with PHP 7.4 due to keywords such
mixedbeing used as parameters or return types amongst other things.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently using it on 7.4 too and is working. 7.4 doesn't support multiple union return types (e.g. string | bool), that I remember were not used. Are you sure that those are currently used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed there would be problems since the psalm test fails but if these warnings/errors can be fixed quickly in order to return composer.json to 7.4 it may be worth it. I will look into it when I have some time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a quick look but I'm guessing you are not using my
Fix/php81fork in PHP 7.4. My fork uses things like themixedkeyword as function parameters and function return types. Manyswitchstatements were replaced bymatchstatements. Many methods returns thestatickeyword. Thethrow newstatement is used. Union types are used as function arguments, and so on.My fork is strictly for PHP 8.1 which is why I asked the repository owner whether two separate branches can be released, i.e. a new 4.x branch alongside the 3.x branch.
Alternatively they could just resurrect their repository but it seems the primary contributor is no longer available and active on Github and have not been for a year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's possible that you're right. I'm struggling a bit using your Fix/php81 on php8.1 and probably you're right that I use the old dev-master on php7.4
tnx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are struggling to set up my fork in
composer.jsonhere is an extract you can use:{ "require": { "php": "^8.1", "vanilla/garden-cli": "dev-fix/php81" }, "repositories": [ { "type": "vcs", "url": "https://github.com/donatello-za/garden-cli" } ] }There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tnx a lot :) this is exactly what I was using.