Beispiel
nesbot/carbon 3.13.2: Configure month and year overflow arithmetic, serialization format, and strict mode via instance settings and Factory without global state pollution
Verifiziertes Beispiel für composer nesbot/carbon 3.13.2: Configure month and year overflow arithmetic, serialization format, and strict mode via instance…
sha256:35ee9807418d9df3e02082501c04725aa7aa794a0770181d368e7cc1f492f8d6
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 2
- Signaturschlüssel, die es gebaut haben
- 2
Deklarierte Umgebung
php linux x64 php php composer
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · composer@1 |
2026-08-16 |
| php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · composer@1 |
2026-08-18 |
Fall
HOW- Ziel
- Configure month and year overflow arithmetic, serialization format, and strict mode via instance settings and Factory without global state pollution
- Pakete
- Symbole
-
- Carbon\Carbon
- Carbon\CarbonImmutable
- Carbon\Factory
- Carbon\Traits\Options
- Umgebung
- php
- Erstellt
- 2026-08-16T08:46:44Z
Contract
- Adding 1 month to Jan 31 or subtracting 1 month from Mar 31 defaults to March 2/3 due to month overflow
- Carbon::useMonthsOverflow(false) and useYearsOverflow(false) globally clamp arithmetic but leak across requests
- Calling ->settings() directly mutates CarbonImmutable instances in place; ->copy()->settings() is required for immutability
- Carbon\Factory isolates month/year overflow, locale, timezone, and JSON serialization without polluting global static state
- Carbon 3 enables strict mode by default, throwing InvalidFormatException and InvalidDateException instead of returning null
Dateien
- NOTES.md
- composer.json
- composer.lock
- csx.json
- test/contract.php