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

PHP 8.0.0 error due to incompatable dependency version #10

Closed
shaunfreeman opened this issue Dec 3, 2020 · 6 comments · Fixed by #11
Closed

PHP 8.0.0 error due to incompatable dependency version #10

shaunfreeman opened this issue Dec 3, 2020 · 6 comments · Fixed by #11
Labels
Bug Something isn't working
Milestone

Comments

@shaunfreeman
Copy link

shaunfreeman commented Dec 3, 2020

On PHP 8.0.0 an error is thrown. this is due to match becoming a reserved name this has been fixed bu the dependency author willdurand/negotiation. this composer JSON needs to reflect this to bump the version to ^3.0

Q A
Version(s) 1.2.0

Summary

In PHP 8.0.0 throws an unexpected error message

Current behavior

An unexpected error occurred; stack trace:

ParseError raised in file /home/cms/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php line 41:
Message: syntax error, unexpected token "match"
Stack Trace:

#0 /home/cms/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/home/cms/vendo...')
#1 /home/cms/vendor/mezzio/mezzio-problem-details/src/ProblemDetailsMiddleware.php(102):
Composer\Autoload\ClassLoader->loadClass('Negotiation\\Neg...')
#2 /home/cms/vendor/mezzio/mezzio-problem-details/src/ProblemDetailsMiddleware.php(54):
Mezzio\ProblemDetails\ProblemDetailsMiddleware->canActAsErrorHandler(Object(Laminas\Diactoros\ServerRequest))
#3 /home/cms/vendor/mezzio/mezzio/src/Middleware/LazyLoadingMiddleware.php(47):
Mezzio\ProblemDetails\ProblemDetailsMiddleware->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))
#4 /home/cms/vendor/laminas/laminas-stratigility/src/Next.php(61):
Mezzio\Middleware\LazyLoadingMiddleware->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))
#5 /home/cms/vendor/laminas/laminas-stratigility/src/Middleware/ErrorHandler.php(144):
Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#6 /home/cms/vendor/mezzio/mezzio/src/Middleware/LazyLoadingMiddleware.php(47):
Laminas\Stratigility\Middleware\ErrorHandler->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))
#7 /home/cms/vendor/laminas/laminas-stratigility/src/Next.php(61):
Mezzio\Middleware\LazyLoadingMiddleware->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))
#8 /home/cms/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84):
Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#9 /home/cms/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73):
Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\EmptyPipelineHandler))
#10 /home/cms/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96):
Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
#11 /home/cms/vendor/mezzio/mezzio/src/Application.php(82): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#12 /home/cms/public/index.php(28): Mezzio\Application->run()
#13 /home/cms/public/index.php(29): {closure}()
#14 {main}

How to reproduce

run on PHP 8.0.0

Expected behavior

no error message

@agustingomes
Copy link

This is not a direct issue in this library. I created the appropriate issue in the right library: willdurand/Negotiation#110

@froschdesign
Copy link
Member

@agustingomes
Have you checked the latest version of Negotiation? See: https://github.com/willdurand/Negotiation/releases/tag/3.0.0

@agustingomes
Copy link

@froschdesign ah nice, I missed that. then I'll go ahead and close that ticket in the negotiation package.

@weierophinney
Copy link
Contributor

Does this mean we need to add support for willdurand/negotiation 3.0 to this package?

@shaunfreeman
Copy link
Author

After manually installing willdurand/negotiation 3.0 the problem went away. So yes support for version 3.0 is required for this package.

@boesing
Copy link
Member

boesing commented Dec 4, 2020

Does this mean we need to add support for willdurand/negotiation 3.0 to this package?

And we have to add PHP 8.0 support at all as this package does not even support the constraint.
There is a reason why --ignore-platform-reqs should not be used for production.

This package is not PHP 8 ready, yet. But I'll add the willdurand/negotiation v3 information to the issue checklist.

@boesing boesing mentioned this issue Dec 4, 2020
@Xerkus Xerkus linked a pull request May 9, 2021 that will close this issue
@Xerkus Xerkus added this to the 1.3.0 milestone May 9, 2021
@Xerkus Xerkus closed this as completed May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants