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

Moving to 2.0.0 #215

Open
fightbulc opened this issue Jan 27, 2023 · 4 comments
Open

Moving to 2.0.0 #215

fightbulc opened this issue Jan 27, 2023 · 4 comments

Comments

@fightbulc
Copy link
Owner

@ConnerAiken lets have a discussion here to see what needs to be done to ship version 2.0.0. Looking forward.

@ConnerAiken
Copy link

ConnerAiken commented Feb 1, 2023

@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.

@ConnerAiken
Copy link

ConnerAiken commented Feb 2, 2023

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

@fightbulc
Copy link
Owner Author

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

@ConnerAiken
Copy link

ConnerAiken commented Feb 13, 2023

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"?

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

2 participants