GithubHelp home page GithubHelp logo

Moving to 2.0.0 about moment.php HOT 4 OPEN

fightbulc avatar fightbulc commented on May 23, 2024
Moving to 2.0.0

from moment.php.

Comments (4)

fightbulc avatar fightbulc commented on May 23, 2024 1

Hey @ConnerAiken,

I would make a hard cut all versions before php 8. I would keep it around as a fixable version but I would put a hold on further development. Hence, lets branch away from master to create a php-8 branch and lets see what needs to be done to make it pass.

How much time do you have to work on this project?

Greetings
Tino

from moment.php.

ConnerAiken avatar ConnerAiken commented on May 23, 2024

@fightbulc As i've been documenting changes for our company's PHP7 -> PHP8 upgrade - it appears to me that we are fully compatible for PHP 7.4 and above. However, PHP 6 and below is not looking too great.

#209 introduces two major changes:

  • The use of #[\ReturnTypeWillChange] attribute
    • For PHP versions 8 and below, this get's parsed as a code comment and does not cause any syntax errors.
  • The use of return types (albeit with minimal accuracy)

I have not tested it yet, but I would think it would cause a syntax error for PHP 6 and below.

from moment.php.

ConnerAiken avatar ConnerAiken commented on May 23, 2024

One issue i've uncovered with PHP 8 compatibility, we may want to extend the valid checks (isValidDate()) of input to the package or default null parameters to 'now'.

DateTime: :__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in moment/src/Moment.php on line 196
<?php
var_dump(new DateTime(null));
?>

image

from moment.php.

ConnerAiken avatar ConnerAiken commented on May 23, 2024

Hey @ConnerAiken,

I would make a hard cut all versions before php 8. I would keep it around as a fixable version but I would put a hold on further development. Hence, lets branch away from master to create a php-8 branch and lets see what needs to be done to make it pass.

How much time do you have to work on this project?

Greetings

Tino

I have a few hours a week. Ok, all the changes should be php 7.4+ compatible but we could do that. If I understand right - master is "fixable"?

from moment.php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.