-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Open
Labels
breaking changeChanges that break backwards compatibility of the public API.Changes that break backwards compatibility of the public API.
Milestone
Description
The current version of the initializer
modifier includes some logic for backwards compatibility that was added in #3450, which was in fact a simplification of the backwards compatibility code introduced in #3344.
We should consider further simplifications that break backwards compatibility for 5.0.
Haven't thought about this yet but it would probably come down to making initializer
exactly equivalent to reinitializer(1)
. This means that instead of:
openzeppelin-contracts/contracts/proxy/utils/Initializable.sol
Lines 85 to 88 in d59306b
require( | |
(isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1), | |
"Initializable: contract is already initialized" | |
); |
the code should look more like:
require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); |
Metadata
Metadata
Assignees
Labels
breaking changeChanges that break backwards compatibility of the public API.Changes that break backwards compatibility of the public API.