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

When I update PHP to 7.4. Slim reports an error. #278

Closed
zl939144892 opened this issue Jan 1, 2020 · 22 comments · Fixed by #333
Closed

When I update PHP to 7.4. Slim reports an error. #278

zl939144892 opened this issue Jan 1, 2020 · 22 comments · Fixed by #333
Labels

Comments

@zl939144892
Copy link

image

@markstory markstory added the bug label Jan 1, 2020
@markstory
Copy link
Member

Sounds like there is some work to do to upgrade to a newer version of slim that works with PHP7.4. For now you'll have to use PHP 7.3 or lower.

@zl939144892
Copy link
Author

Correct, I've already degraded PHP to 7.3. (7.4 discards too many functions)

@glensc
Copy link
Contributor

glensc commented Nov 4, 2020

you can mitigate the problem by removing deprecation from error reporting.

@zl939144892
Copy link
Author

thx

@glensc glensc pinned this issue Dec 15, 2020
@tomjn
Copy link
Contributor

tomjn commented Apr 13, 2021

@glensc what's the current blockers for upgrading Slim? Looking at the PRs from what I can see it's a test failure but I'm not super familiar with xhgui internals

@glensc
Copy link
Contributor

glensc commented Apr 14, 2021

@tomjn you can follow porting in this pr: #333

or maybe even try it, and report what you see broken

@kmgalanakis
Copy link

Having to use an older version of php in our environments just to have xhgui running properly, is a huge problem for us.

When should we expect an update?

@glensc
Copy link
Contributor

glensc commented Apr 29, 2021

if it's huge problem, why don't you do something about it, rather than complaining? it's not helping anyone, only showing your attitude that somebody must do something for you just like that?

however, you have several options:

  1. Use docker.
  2. Compile needed version yourself, for example with https://php-build.github.io/
  3. Disable deprecation logging: When I update PHP to 7.4. Slim reports an error. #278 (comment)

you can contribute back and test the development branch and report what's missing/broken.

I will not promise anything, I'm doing all of this in my free time.

@kmgalanakis
Copy link

@glensc first of all, I cannot speak in the name of everyone here but as far as I'm concern let me clarify I'm totally respecting both the work you are putting into this project as well as your free time. I'm sorry if I offended you but this was certainly not my intention.

We have our ways to bypass this limitation, but this doesn't stop it from being a huge problem.

The only reason I asked here was to show you that there are people out there needing this upgrade to PHP 7.4 and we will be happy to see it sometime in the future. I'm seeing an active effort for landing so I thought there might be a plan.

Again, I know how important free time is, and putting into a project that makes other people's work lives easier, makes it even more important.

Thank you.

@luzip665
Copy link
Contributor

Hi all.

At first thank you for developing this very nice and usefull tool!

We need to use it with PHP8. But because it seems quite difficult to upgrade to the current slim release, we just replaced the missing get_magic_quotes_gpc function by our own, that's just returning false.

May this be a way to get it working (just for now) on PHP8?

@glensc
Copy link
Contributor

glensc commented Jan 12, 2022

Use docker image, then doesn't affect what PHP version you use otherwise.

@luzip665
Copy link
Contributor

Unfortunately this is not possible because our whole application is already shipped in a docker container.
May be it is possible for us to support your effort to update to a current release of slim.

Is there anything open except the ci problems in #333?

@glensc
Copy link
Contributor

glensc commented Jan 12, 2022

if you're deploying xhgui (the gui part) in the same container as the application, you are doing it wrong.

in the application container should only use the collector library that submits to xhgui:

See the docs:

@luzip665
Copy link
Contributor

You are right, I think.
But, at least, we want xhgui to run on php8. For that I began to look for the tests and added PR 440.

First thing i figured out is the different handling of request and response in Slim3. So I edited the ImportTest to work with the new requests.

Please, can you enable the ci pipeline for this?

@glensc
Copy link
Contributor

glensc commented Jan 14, 2022

Please, can you enable the ci pipeline for this?

please explain.

@luzip665
Copy link
Contributor

I opened PR #440, where I edited the tests and some controllers, because the tests did'nt run locally.
Now I got only 4 errors and 4 failures locally and I'm interested if it helps for CI pass on github.

But the PR says "6 workflows awaiting approval".
So I need a maintainer to approve, I think.

@glensc
Copy link
Contributor

glensc commented Jan 14, 2022

Approved in #440, next time explain what "this" is, or just ask in the "this" itself.

also, you don't need to harass CI, to see PHPUnit test failures, run the tests locally.

@luzip665
Copy link
Contributor

Sorry for the inconvenience.

I asked for this, because last time I had to deal with an error that happened only on CI on github.

Thank you very much!

@glensc
Copy link
Contributor

glensc commented Jan 16, 2022

#333 CI passes now.

please test the application itself too.

@luzip665
Copy link
Contributor

luzip665 commented Jan 17, 2022

Flash messages don't work. Error in apache error log is Flash messages middleware failed. Session not found.
Does not fail if flash.storage is set to array. But then no flash message is shown.
Test with RunController::deleteAllSubmit

Additionally I changed TwigExtension to allow to run xhgui in a subdir in #450

@luzip665
Copy link
Contributor

Rework flash messages in PR #451 .

@luzip665
Copy link
Contributor

Thank you very much!
It works like a charm, even on PHP8!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants