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

Update for PHP 7.2, 7.3 and 7.4 #15

Merged
merged 13 commits into from
Jul 13, 2021
Merged

Update for PHP 7.2, 7.3 and 7.4 #15

merged 13 commits into from
Jul 13, 2021

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Mar 17, 2021

Fixes issue #13
Includes #14

  • Add support for composer 2 installed.json format
  • Update Aura.Di version
  • Add PHPUnit as dev dependency

@kenjis kenjis marked this pull request as draft March 17, 2021 09:10
@kenjis kenjis marked this pull request as ready for review March 17, 2021 09:15
@kenjis
Copy link
Member Author

kenjis commented Apr 23, 2021

@pmjones @harikt Could you review this PR?

@harikt
Copy link
Member

harikt commented May 4, 2021

Hey @kenjis ,

Thank you for the PR. As far as I know we were restricting the php version changes. So not sure this can be merged in that sense.

But my take is this can be merged for php has moved a lot to 8.x . And I don't know if there will be another 3.x for Aura framework.

I will leave the decision to pmjones.

@kenjis
Copy link
Member Author

kenjis commented Jul 12, 2021

@pmjones @harikt @koriym
I hope this PR will be merged.

But this is for PHP 7.x. So it should be merged into 4.x.
See auraphp/Aura.Cli_Kernel#12 (comment)
Can you create 4.x branch?

@harikt
Copy link
Member

harikt commented Jul 12, 2021

4.x is created. Let me know if you need anything else.

@harikt harikt changed the base branch from 2.x to 4.x July 12, 2021 17:43
@kenjis kenjis changed the title Update for PHP 7.3 and 7.4 Update for PHP 7.2, 7.3 and 7.4 Jul 13, 2021
@kenjis
Copy link
Member Author

kenjis commented Jul 13, 2021

@pmjones @harikt @koriym
I've finished this PR. But Travis is gone and Scrutinizer raised error.

In my local environment, phpunit testing passed:

kenji:~/work/aura/Aura.Project_Kernel (3.x)$ /usr/local/opt/php\@7.2/bin/php vendor/bin/phpunit 
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

........S                                                           9 / 9 (100%)

Time: 116 ms, Memory: 4.00 MB

OK, but incomplete, skipped, or risky tests!
Tests: 9, Assertions: 9, Skipped: 1.
kenji:~/work/aura/Aura.Project_Kernel (3.x)$ /usr/local/opt/php\@7.3/bin/php vendor/bin/phpunit 
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

........S                                                           9 / 9 (100%)

Time: 59 ms, Memory: 4.00 MB

OK, but incomplete, skipped, or risky tests!
Tests: 9, Assertions: 9, Skipped: 1.
kenji:~/work/aura/Aura.Project_Kernel (3.x)$ /usr/local/opt/php\@7.4/bin/php vendor/bin/phpunit 
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

........S                                                           9 / 9 (100%)

Time: 53 ms, Memory: 4.00 MB

OK, but incomplete, skipped, or risky tests!
Tests: 9, Assertions: 9, Skipped: 1.

What shall we do?

@kenjis
Copy link
Member Author

kenjis commented Jul 13, 2021

kenji:~/work/aura/Aura.Project_Kernel (3.x)$ /usr/local/opt/php\@8.0/bin/php vendor/bin/phpunit 
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

........S                                                           9 / 9 (100%)

Time: 65 ms, Memory: 4.00 MB

OK, but incomplete, skipped, or risky tests!
Tests: 9, Assertions: 9, Skipped: 1.

@harikt
Copy link
Member

harikt commented Jul 13, 2021

I can look into the test issues in this weekend. You can merge the branches in 4.x for now. pmjones has already approved the travis.com , but due to some reason the builds are not ready.

@kenjis kenjis marked this pull request as draft July 13, 2021 07:26
@kenjis
Copy link
Member Author

kenjis commented Jul 13, 2021

phpunit 7 can't be installed on php8.

  Problem 1
    - phpunit/phpunit[7.0.0, ..., 7.5.20] require php ^7.1 -> your php version (8.0.8) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ~7 -> satisfiable by phpunit/phpunit[7.0.0, ..., 7.5.20].

I will update to phpunit 8.x. Because phpunit 8 requires php 7.2 or later and supports php8.
phpunit 9 requires php 7.3 or later.

@harikt
Copy link
Member

harikt commented Jul 13, 2021

I have updated the github workflow. You can try again.

@harikt harikt marked this pull request as ready for review July 13, 2021 07:38
@harikt
Copy link
Member

harikt commented Jul 13, 2021

@kenjis if this works you can make the necessary changes to all other repos also.

@harikt
Copy link
Member

harikt commented Jul 13, 2021

FYI : I have created #18 for testing. You can see the phpunit it complains is due to wrong code. So all seems well.

@harikt harikt merged commit 8bb036b into auraphp:4.x Jul 13, 2021
@harikt
Copy link
Member

harikt commented Jul 13, 2021

image

You can see the build. update the .github/actions/php.yml with the php version you need.

https://stackoverflow.com/questions/57965588/how-to-test-with-different-versions-of-php-in-a-github-action

@kenjis
Copy link
Member Author

kenjis commented Jul 13, 2021

@harikt Thanks!

#15 (comment)
I will send another PR for it.

@harikt
Copy link
Member

harikt commented Jul 13, 2021

Please refer composer.json and .github/workflows/php.yml for other repos you want the ci. I am moving on.

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.

None yet

3 participants