We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Global setters like setTestNow, serializeUsing, setTranslator etc. are not isolated when called from factories:
setTestNow
serializeUsing
setTranslator
CarbonImmutable::setTestNow('1990-07-31 23:59:59'); $libAFactory = new FactoryImmutable(); $libAFactory->setTestNow('2000-02-05 15:20:00'); $libBFactory = new FactoryImmutable(); $libBFactory->setTestNow('2050-12-01 00:00:00'); echo $libAFactory->now() . "\n"; // 2000-02-05 15:20:00 echo $libBFactory->now() . "\n"; // 2050-12-01 00:00:00 echo CarbonImmutable::now() . "\n"; // 1990-07-31 23:59:59
Carbon version: 2.84.1
PHP version: 8.0.0
Expected output:
2000-02-05 15:20:00 2050-12-01 00:00:00 1990-07-31 23:59:59
Current output:
2050-12-01 00:00:00 2050-12-01 00:00:00 2050-12-01 00:00:00
The text was updated successfully, but these errors were encountered:
kylekatarnls
No branches or pull requests
Global setters like
setTestNow
,serializeUsing
,setTranslator
etc. are not isolated when called from factories:Carbon version: 2.84.1
PHP version: 8.0.0
Expected output:
Current output:
The text was updated successfully, but these errors were encountered: