PHP Parse error: syntax error, unexpected token "match" #93

Closed
opened 2023-04-07 12:59:45 +02:00 by SteffenK9 · 3 comments

I hadn't checked the webpage of my instance of the directory for some time. Today I noticed that the page is throwing a http error 500. All I get is an empty, white page.

https://dir.libranet.de/

The PHP log is empty. But I see this in the http.log of the directory:

PHP Parse error:  syntax error, unexpected token "match" in .../vendor/willdurand/negotiation/src/Negotiation/Negotiator.php on line 41

There are also a lot of errors in the cron.log and app.log.

Could it be that the directory doesn't work with PHP 8.1?

Directory version:
On branch stable. Your branch is up to date with 'origin/stable'.

Composer:
Nothing to install or update.
But I see a lot of deprecation notices.

PHP:
8.1.17

Apache:
2.4.56

Database:
MariaDB 10.6.12

I hadn't checked the webpage of my instance of the directory for some time. Today I noticed that the page is throwing a http error 500. All I get is an empty, white page. https://dir.libranet.de/ The PHP log is empty. But I see this in the `http.log` of the directory: ``` PHP Parse error: syntax error, unexpected token "match" in .../vendor/willdurand/negotiation/src/Negotiation/Negotiator.php on line 41 ``` There are also a lot of errors in the `cron.log` and `app.log`. Could it be that the directory doesn't work with PHP 8.1? Directory version: On branch stable. Your branch is up to date with 'origin/stable'. Composer: Nothing to install or update. But I see a lot of deprecation notices. PHP: 8.1.17 Apache: 2.4.56 Database: MariaDB 10.6.12
Owner

Looks like willdurand/negotiation 2.0 , which is required by gofabian/negotiation-middleware 0.1.3 from 'composer.json' doesn't support php 8, while willdurand/negotiation 3 does.

Looks like `willdurand/negotiation` 2.0 , which is required by `gofabian/negotiation-middleware` 0.1.3 from 'composer.json' doesn't support php 8, while `willdurand/negotiation` 3 does.
Owner

Hmm, a few things:

  • the gofabian/negotiation-middleware library doesn't seem to be maintained anymore.
  • the willdurand/negotiation version 3 is not recommended for production use.

The smallest footprint action we can take to fix this would be to fork the negotiation-middleware library over here and bump the willdurand/negotiation requirement to ^3.0 and cross our fingers?

Hmm, a few things: - the `gofabian/negotiation-middleware` library doesn't seem to be maintained anymore. - the `willdurand/negotiation` version 3 is not recommended for production use. The smallest footprint action we can take to fix this would be to fork the `negotiation-middleware` library over here and bump the `willdurand/negotiation` requirement to `^3.0` and cross our fingers?
Owner

Closed by #96

Closed by https://git.friendi.ca/friendica/friendica-directory/pulls/96
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: friendica/friendica-directory#93
No description provided.