Skip to content

[Form] fix support for years outside of the 32b range on x86 arch#41394

Merged
nicolas-grekas merged 1 commit intosymfony:4.4from
nicolas-grekas:fix32b
May 24, 2021
Merged

[Form] fix support for years outside of the 32b range on x86 arch#41394
nicolas-grekas merged 1 commit intosymfony:4.4from
nicolas-grekas:fix32b

Conversation

@nicolas-grekas
Copy link
Copy Markdown
Member

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

->method('loadTokenBySeries')
->with('series1')
->willReturn(new PersistentToken(InMemoryUser::class, 'wouter', 'series1', 'tokenvalue', new \DateTime('-'.(31536000 - 1).' years')));
->willReturn(new PersistentToken(InMemoryUser::class, 'wouter', 'series1', 'tokenvalue', new \DateTime('-'.(31536000 - 1).' months')));
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @wouterj WDYT?

Copy link
Copy Markdown
Member

@wouterj wouterj May 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, seems like we can even make this '-'.(31536000 + 1).' seconds'?

throw new MethodArgumentValueNotImplementedException(__METHOD__, 'timestamp', $timestamp, $message);
}

if (\is_string($timestamp) && $dt = \DateTime::createFromFormat('U', $timestamp)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be applied to the polyfills repo, right ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicolas-grekas nicolas-grekas changed the base branch from 6.0 to 4.4 May 24, 2021 10:23
@nicolas-grekas nicolas-grekas changed the title [Form] fix support for years in on x86 arch [Form] fix support for years outside of the 32b range on x86 arch May 24, 2021
@nicolas-grekas nicolas-grekas modified the milestones: 6.0, 4.4 May 24, 2021
@nicolas-grekas nicolas-grekas merged commit 7ccda8e into symfony:4.4 May 24, 2021
@nicolas-grekas nicolas-grekas deleted the fix32b branch May 24, 2021 10:32
This was referenced May 31, 2021
nicolas-grekas added a commit that referenced this pull request Jun 3, 2025
…86 arch on PHP 8.4 (nicolas-grekas)

This PR was merged into the 6.4 branch.

Discussion
----------

[Yaml] fix support for years outside of the 32b range on x86 arch on PHP 8.4

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Similar to #41394 but for PHP 8.4

Commits
-------

c2f9a7c [Yaml] fix support for years outside of the 32b range on x86 arch on PHP 8.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants