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

Require PHP 7.4 at least for running the build system #9519

Merged
merged 4 commits into from
Sep 10, 2022

Conversation

kocsismate
Copy link
Member

@kocsismate kocsismate commented Sep 10, 2022

Due to #9512 (comment). The target branch (PHP-8.2 vs master) can be under debate, but I chose the former for now.

I guess our Travis config should be adapted as well in order to use PHP 7.4, but I'm not sure yet how to do (will have time later to find it out)

build/gen_stub.php Outdated Show resolved Hide resolved
@iluuu1994
Copy link
Member

Pretty gross but this would work 😜

<?php

if (PHP_VERSION_ID < 70400) {
    throw new Exception("The build system requires PHP 7.4 at least.\n");
}

$file = file_get_contents(__FILE__);
eval(explode('__halt_compiler();', $file, 3)[2]);

__halt_compiler();

// Unsupported syntax

@kocsismate
Copy link
Member Author

Pretty gross but this would work

Ilija.... 😂 Actually, this is madly brilliant, but I hope that you won't be upset if I don't use it (?).

@iluuu1994
Copy link
Member

I'm incredibly disappointed but I'll be ok 😂

@kocsismate kocsismate merged commit 4af695e into php:PHP-8.2 Sep 10, 2022
@kocsismate kocsismate deleted the bump-build-version branch September 10, 2022 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants