flightphp / core

An extensible micro-framework for PHP
https://docs.flightphp.com
MIT License
2.63k stars 409 forks source link

Compatibility issue with PHP 8.1-8.2 #481

Closed david-prv closed 9 months ago

david-prv commented 1 year ago

Hey everyone,

I just checked if the latest FlightPHP Version is ready to be used on an up-to-date PHP system. And there is actually one error clashing with PHP 8.1 and PHP 8.2.

PHP Codesniffers "PHPCompatibility Standard" explains:

FILE: .\flight-master\flight\Flight.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 75 | ERROR | Visibility for magic method __destruct must be public.
    |       | Found: private
----------------------------------------------------------------------

FlightPHP version used: 2.0.1 How to reproduce:

git clone https://github.com/mikecao/flight.git
cd flight\flight
phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 8.1 -v
david-prv commented 1 year ago

Is Flight abandoned?

MisterAnmar commented 1 year ago

Is Flight abandoned?

Im wandering as well.,

magikstm commented 1 year ago

That doesn't seem to be an error with flightphp.

It seems to be an issue with PHP Codesniffers.

https://www.php.net/manual/en/language.oop5.magic.php

Warning

All magic methods, with the exception of __construct(), __destruct(), and __clone(), must be declared as public, otherwise an E_WARNING is emitted. Prior to PHP 8.0.0, no diagnostic was emitted for the magic methods __sleep(), __wakeup(), __serialize(), __unserialize(), and __set_state().

magikstm commented 1 year ago

Reported: https://github.com/PHPCompatibility/PHPCompatibility/issues/1542

Fixed: https://github.com/PHPCompatibility/PHPCompatibility/pull/1543

magikstm commented 1 year ago

Is Flight abandoned?

I'm not the author of flightphp, but I've followed it for a few years. I'll share my thoughts on it's status.

It isn't abandoned, but it's not in active development.

krmu commented 9 months ago

Tested with PHP 8.3.1. works fine. Can be closed. @n0nag0n

n0nag0n commented 9 months ago

Thank you @krmu! That was on my list!