Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clock component breaks preload #51180

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

Closed
andriusvo opened this issue Jul 31, 2023 · 1 comment
Closed

Clock component breaks preload #51180

andriusvo opened this issue Jul 31, 2023 · 1 comment

Comments

@andriusvo
Copy link

andriusvo commented Jul 31, 2023

Symfony version(s) affected

6.2 / 6.3

Description

While using Symfony Clock component and using preload, this raises an issue:

PHP message: PHP Fatal error: Cannot redeclare Symfony\Component\Clock\now() (previously declared in vendor/symfony/clock/Resources/now.php:22

How to reproduce

  1. Install symfony/clock component
  2. Use PHP opcache preload function
  3. Reload the page, check the error

Possible Solution

No response

Additional Context

No response

@xabbuh
Copy link
Member

xabbuh commented Jul 31, 2023

see #51190

derrabus added a commit that referenced this issue Jul 31, 2023
This PR was merged into the 6.3 branch.

Discussion
----------

[Clock] load function only if not loaded before

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #51180
| License       | MIT
| Doc PR        |

We do the same for functions defined in the String, Translation and VarDumper components.

Commits
-------

6b88ea7 load function only if not loaded before
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants