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

v0.7.2: PHP 8 = requirement(?) #8

Open
sommer-gei opened this issue Jul 18, 2023 · 2 comments
Open

v0.7.2: PHP 8 = requirement(?) #8

sommer-gei opened this issue Jul 18, 2023 · 2 comments

Comments

@sommer-gei
Copy link
Contributor

sommer-gei commented Jul 18, 2023

Hey @danmichaelo + @S1SYPHOS !

Today I made a little update to one of my projects, where I'm glad to use php-sru-client, and mentioned composer updated this package from version 0.7.1 to 0.7.2. After that my script ended with the following error, while doing a SRU request:

"PHP message: PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /server/path/vendor/scriptotek/sru-client/src/Record.php on line 52"

After some investigation and code research I came up with the following 3 things:

  1. I don't know why composer only today updated to 0.7.2; I initiated the project only some weeks ago = when 0.7.2 was still out.
  2. I think the changes from 0.7.1 to 0.7.2 introduced PHP 8.0 as minimum PHP version.
    • This change is the cause of my/the error message with PHP 7.4
  3. The CHANGELOG.md misses the IMHO important change for 0.7.2 (see 2.).

My current fix is to pin this package (by composer) to 0.7.1, to use it with PHP 7.4.

I also will add some notes to CHANGELOG.md and make a PR.

Thanks for fixing in advance and KR!

sommer-gei added a commit to sommer-gei/php-sru-client that referenced this issue Jul 18, 2023
* + PHP 8 notes
* see scriptotek#8
@S1SYPHOS
Copy link
Contributor

Thanks for letting us know! I can't guarantee anything as I'm totally busy right now, but maybe I can take a look over the weekend 😉

danmichaelo pushed a commit that referenced this issue Mar 11, 2024
* + PHP 8 notes
* see #8
@danmichaelo
Copy link
Member

danmichaelo commented Mar 11, 2024

Sorry about that, @sommer-gei, I should have created a major release for this change! Pinning to 0.7.1 is the solution for PHP < 8 . I'll keep the issue open so it's easy for others to find

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

No branches or pull requests

3 participants