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

Latte 2.3 and 2.2 not compatible with PHP 7.2 #183

Open
phpbenchmarks opened this Issue Jul 7, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@phpbenchmarks

phpbenchmarks commented Jul 7, 2018

Version: 2.3.* and 2.2.* (maybe older versions too, 2.4.* works fine)

Bug Description

composer.json allows PHP 7.2, but with this version of PHP, Object is not allowed as class name :
Fatal error: Cannot use 'Object' as class name as it is reserved in /var/www/phpbenchmarks/benchmark/latte/vendor/latte/latte/src/Latte/Object.php on line 16

Steps To Reproduce

Hello World snippet to reproduce it :

$latte = (new Latte\Engine)
    ->setTempDirectory($cacheDir)
    ->setAutoRefresh(true);

$latte->render(__DIR__ . '/templates/hello-world.latte');

Expected Behavior

Don't allow PHP >= 7.2

Possible Solution

Change class name, but i think it could not be changed without BC ?

@phpbenchmarks phpbenchmarks changed the title from Latte 2.3 not compatible with PHP 7.2 to Latte 2.3 and 2.2 not compatible with PHP 7.2 Jul 7, 2018

@dg

This comment has been minimized.

Member

dg commented Jul 7, 2018

I do not know how to dont allow PHP 7.2 for versions that have already been released.

@phpbenchmarks

This comment has been minimized.

phpbenchmarks commented Jul 8, 2018

I think you can't, but you can add it now and create a new release ?

@dg

This comment has been minimized.

Member

dg commented Jul 8, 2018

But it does not prevent the Composer from installing with PHP 7.2 the previous version.

Or what is the intent?

@phpbenchmarks

This comment has been minimized.

phpbenchmarks commented Jul 10, 2018

Yes, older releases will allow PHP 7.2. You can just fix newer versions.

Calling composer require will not install new version if you have PHP 7.2, i think you can't hold that.

@dg

This comment has been minimized.

Member

dg commented Jul 10, 2018

It will add "latte/latte": "^2.3" into composer.json and install the last version which allowes PHP 7.2 (i.e. the existing 2.3.13) so releasing new 2.3.14 is really not a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment